BACK-683 - Render TUI acceptance-criteria progress as a pie glyph - #996
BACK-683 - Render TUI acceptance-criteria progress as a pie glyph#996MrLesk wants to merge 3 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11fad08f4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // The status icon stays a single cell so it and the reserved progress column form a | ||
| // fixed-width prefix and task ids line up down the list. Its shape still distinguishes | ||
| // active work from the terminal-status checkmark. | ||
| const status = getStatusIcon(task.status); |
There was a problem hiding this comment.
Preserve labels for unmapped custom statuses
When a configured workflow uses statuses outside the six hard-coded values in getStatusStyle, every such task now receives the same default ○ icon and color, so rows with statuses such as Ready and Waiting are indistinguishable in the mixed task list. Before this change, formatStatusWithIcon retained the literal status name; keep that identifying text or provide a mapping for every configured status.
Useful? React with 👍 / 👎.
| // Pad on the rendered text, not the tagged string, and always keep one separator column. | ||
| const padding = " ".repeat(Math.max(1, PROGRESS_COLUMN_WIDTH - `${glyph} ${count}`.length)); |
There was a problem hiding this comment.
Size the progress column for three-digit criterion counts
For an In Progress task with a three-digit total, the formatted field can exceed the eight spaces reserved on other rows: for example, 10/100 produces a nine-cell field and 100/100 produces ten cells because padding is forced to at least one. Since acceptance-criteria counts are not capped below 100, those rows shift their task IDs right and break the alignment this change is intended to guarantee.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
The TUI showed acceptance-criteria progress as an ASCII bar,
[###--] 3/5. That caution wasaimed at Block Elements, but it was applied to the whole indicator even though the TUI
already renders Geometric Shapes (
● ○ ◒ ✔) on every supported terminal. The bar also satbefore the task id on In Progress rows only, so ids never lined up across rows.
○nothing checked,◔up to a third,◑up to two thirds,◕above that,●only when every criterion ischecked. It mirrors the ring the web shows and costs one cell.
and the color share the same thirds, so
○/◔are red,◑/◕yellow,●green.src/ui/task-row-prefix.ts, which sizes the prefix perrender from the rows actually on screen: a status segment (task list only — board columns
already name the status) then the progress cell, each padded to the widest of its kind.
Ids line up, and a render pays only for columns something on it fills.
availableWidthplumbingbehind them with it.
Which rows show progress is unchanged: In Progress tasks with criteria. Plain and MCP list
output (
(ac: 1/3)) is untouched.Rendered
Task list — custom statuses keep their labels,
100/100fits, every id starts at one column:Board — the In Progress column reserves for
● 100/100; the other four columns have no rowwith progress, so they spend no prefix width at all:
Notes for review
The status word stays. An earlier revision of this branch reduced the task list to an
icon-only status to buy a fixed-width prefix.
getStatusStylemaps six statuses, so everycustom status —
Ready,Waiting,Blocked on review— collapsed to the same default○and color, making those rows indistinguishable. Per-render sizing gets the alignment without
that trade, so the list shows icon + word on every row again, unconditionally.
The prefix is emitted before the row-level color tags. blessed treats a bare
{/}as afull attribute reset (
Element.prototype._parseTags), so the indicator's own close tag usedto cancel the magenta move highlight and the gray cross-branch dim for the rest of the row.
Keeping the prefix outside those tags fixes that, and holds the reserved columns still while
a task moves — the
►marker now sits between the prefix and the id.Board rows carry no status segment. The column header already names the status and every
row in a column shares it, so a per-row icon would cost a column for no information. Easy to
add if you'd rather have it.
Width
The five glyphs are East Asian Width "ambiguous", the same class as the
●already in use.unicode.strWidthin the patched neo-neo-bblessed reports 1 for each, and none matchesthe wide-layout regex, so they occupy one cell exactly like the existing status icons. No
Block Elements are introduced. The prefix builder measures with that same
strWidthratherthan string length, so a non-ASCII status label still pads to the right number of cells.
blessed degrades non-ASCII to
?only when the locale is not UTF-8 (Tput.detectUnicodereads
LANG/LC_ALL). That already applies to the shipped◒ ○ ✔status icons, so the piesadd no new exposure.
Testing
bunx tsc --noEmitbun run check .bun run test— 2860 pass / 8 skip / 1 fail; a cleanorigin/mainworktree run gives2859 / 8 / 1, failing the same
ContentStoretest. Local-only flake, green on CI.expectat 150x40 onboardandtask list, against a project configuredwith
To Do / Ready / In Progress / Waiting / Doneand a 100-criterion task