Skip to content

BACK-683 - Render TUI acceptance-criteria progress as a pie glyph - #996

Open
MrLesk wants to merge 3 commits into
mainfrom
tasks/back-683-pie-progress
Open

BACK-683 - Render TUI acceptance-criteria progress as a pie glyph#996
MrLesk wants to merge 3 commits into
mainfrom
tasks/back-683-pie-progress

Conversation

@MrLesk

@MrLesk MrLesk commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

The TUI showed acceptance-criteria progress as an ASCII bar, [###--] 3/5. That caution was
aimed 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 sat
before the task id on In Progress rows only, so ids never lined up across rows.

  • One pie glyph plus the live checked/total count replaces the bar: nothing checked,
    up to a third, up to two thirds, above that, only when every criterion is
    checked. It mirrors the ring the web shows and costs one cell.
  • Colors are unchanged: green complete, yellow underway, red at a third or fewer. The glyph
    and the color share the same thirds, so / are red, / yellow, green.
  • Column reservation moved to src/ui/task-row-prefix.ts, which sizes the prefix per
    render
    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.
  • The wide/compact variants collapse into one form, taking the availableWidth plumbing
    behind 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/100 fits, every id starts at one column:

lq Tasks (8) qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x                                                           x
x ◒ In Progress ◔ 2/9     TASK-1 - Render progress as a     x
x ◒ In Progress ○ 0/4     TASK-2 - Fail closed on           x
x ◒ In Progress ● 100/100 TASK-3 - Audit every generated    x
x ◒ In Progress           TASK-4 - In progress without      x
x ○ Waiting               TASK-5 - Waiting on the design    x
x ○ Ready                 TASK-6 - Ready to pick up         x
x ○ To Do                 TASK-7 - A plain queued task      x
x ✔ Done                  TASK-8 - A finished task          x

Board — the In Progress column reserves for ● 100/100; the other four columns have no row
with progress, so they spend no prefix width at all:

lq ○ To Do (1) qqqqqqqqqqqqqqklq ○ Ready (1) qqqqqqqqqqqqqqklq ◒ In Progress (4) qqqqqqqqklq ○ Waiting (1) qqqqqqqqqqqqklq ✔ Done (1) qqqqqqqqqqqqqqqk
x                            xx                            xx                            xx                            xx                            x
x TASK-7 - A plain queued    xx TASK-6 - Ready to pick up   xx ◔ 2/9     TASK-1 - Render  xx TASK-5 - Waiting on the    xx TASK-8 - A finished task   x
x                            xx                            xx ○ 0/4     TASK-2 - Fail    xx                            xx                            x
x                            xx                            xx ● 100/100 TASK-3 - Audit   xx                            xx                            x
x                            xx                            xx           TASK-4 - In      xx                            xx                            x

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. getStatusStyle maps six statuses, so every
custom 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 a
full attribute reset (Element.prototype._parseTags), so the indicator's own close tag used
to 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.strWidth in the patched neo-neo-bblessed reports 1 for each, and none matches
the 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 strWidth rather
than 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.detectUnicode
reads LANG/LC_ALL). That already applies to the shipped ◒ ○ ✔ status icons, so the pies
add no new exposure.

Testing

  • bunx tsc --noEmit
  • bun run check .
  • bun run test — 2860 pass / 8 skip / 1 fail; a clean origin/main worktree run gives
    2859 / 8 / 1, failing the same ContentStore test. Local-only flake, green on CI.
  • PTY QA with expect at 150x40 on board and task list, against a project configured
    with To Do / Ready / In Progress / Waiting / Done and a 100-criterion task

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T23:03:02.838867Z e656730 New commits
🔒 Security Review Completed 2026-09-02T22:42:09.314810Z 11fad08 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/ui/task-viewer-with-search.ts Outdated
// 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread src/ui/acceptance-criteria-progress.ts Outdated
Comment on lines +65 to +66
// 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));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@MrLesk

MrLesk commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 97c1e31c1e

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant