lablup / lablup/backend.ai-webui
Show kernel progress as a ring in the session status badge for multi-node sessions
- Dominant language
- TypeScript
- Stars
- 133
- Forks
- 81
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 344
Description
## Goal
For multi-node sessions, the session status badge in the session list should show **how far the creating / terminating phase has progressed** — how many kernels have reached `RUNNING` (creating phase) or `TERMINATED` (terminating phase) — instead of only an indeterminate spinner.
Design decision (chosen from the proposal page linked in the Teams thread): variant **A — ring icon**. The spinning `LoaderCircle` in `SessionStatusTag` is replaced by a small determinate SVG ring whose filled arc is `done / cluster_size`. The ring keeps **rotating slowly (~2.4s per turn)** so the badge still reads as "in progress"; an indeterminate ring (short arc, 1s spin — the current look) is used when the count is unknown or the session is single-node. **No number inside the badge** — the exact `done / total` and per-status breakdown belong to the popover (follow-up issue).
## Scope
- New BUI primitive (e.g. `BAIProgressRing`) in `packages/backend.ai-ui`: `percent` (0–100) or indeterminate, `size="1em"`, `currentColor` stroke, slow rotation with `prefers-reduced-motion` respected. Ships with `.doc.ts`, a story and a unit test.
- `SessionStatusTag` fragment adds `cluster_size` and `kernel_nodes { edges { node { id status } } `} and computes:
- creating phase (`PREPARING` / `PREPARED` / `PULLING` / `CREATING`): `RUNNING` kernels / `cluster_size`
- terminating phase (`TERMINATING`): `TERMINATED` kernels / `cluster_size`
- other transitional statuses (`PENDING`, `SCHEDULED`, `RESTARTING`) and `cluster_size <= 1`: keep the indeterminate ring.
- Both code paths in `SessionStatusTag` (with and without `session-scheduling-history` support) use the ring.
## Acceptance
- A 120-node `TERMINATING` session with 119 reclaimed kernels shows a ring that is ~99% filled and still rotating.
- Single-node sessions look the same as today (indeterminate spinner).
- `bash scripts/verify.sh` and `node scripts/migration-gates/astryx-token-gate.mjs --strict` (no new findings) pass.
JIRA Issue: FR-3923
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in packages/backend.ai-ui with SessionStatusTag and the new BUI progress-ring primitive described in the issue. Read the primitive’s .doc.ts, story, and unit-test requirements, then trace both SessionStatusTag code paths and the kernel status data. Done means determinate rings show the required progress for multi-node creating and terminating sessions, while single-node and unknown-count cases retain the indeterminate spinner; run the listed verification commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100