Skip to content

feat(cli): one-line disc grammar for tool cards and thinking chrome - #1056

Merged
Astro-Han merged 2 commits into
mainfrom
feat/cli-tui-tool-grammar
Jul 16, 2026
Merged

Astro-Han merged 2 commits into
mainfrom
feat/cli-tui-tool-grammar

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Seam 2 of #1053 - the one-line disc grammar for tool cards and thinking chrome. Stacked on #1054 (seam 1, which adds the disc() primitive).

Compact tool cards collapse from 1–2 lines to a single disc-grammar row:

● Name  primary  ·  duration  ·  summary ›
  • A status disc replaces the Tool label and wordy status text: muted ● = done, accent ● = running, danger ● = error/aborted.
  • Duration shows integer seconds (5s, running 12s) instead of Nms.
  • A dim trailing › replaces the (Ctrl+O) hint.
  • Live output and the "Ask Maka to stop" hint move to the expanded card, so collapse never grows a second line (no height jitter).
  • The expanded header reuses the same disc grammar (● Name · duration).

Thinking chrome switches to English (Thinking… / Thinking) and drops the inline Ctrl+T hint.

Verification

  • npm test --workspace maka-agent - 364 tests pass.
  • Running-card live-output and stop-guidance assertions now verify the expanded card (compact no longer carries them by design).
  • Added a regression assertion that an aborted background task uses the red danger disc.

Stacked on #1054; rebase to main once it merges. Refs #1053.

f07b7bd354faf42672651cef49acba74

Seam 2 of #1053. Compact tool cards collapse to a single disc-grammar
row `● Name  primary  ·  duration  ·  summary ›`: a status disc
(muted = done, accent = running, danger = error/aborted) replaces the
"Tool" label and wordy status text, duration shows integer seconds,
and a dim trailing `›` replaces the `(Ctrl+O)` hint. Live output and
stop hints move to the expanded card so collapse never grows a second
line (no height jitter). The expanded header reuses the same disc
grammar.

Thinking chrome switches to English (`Thinking…` / `Thinking`) and
drops the inline Ctrl+T hint.

Test assertions updated to the new single-line shape; running-card
live-output and stop-guidance checks now verify the expanded card.
364 tests pass.

Refs #1053.
@Astro-Han
Astro-Han force-pushed the feat/cli-tui-tool-grammar branch from c445886 to ca8d2d3 Compare July 16, 2026 02:44
@Astro-Han
Astro-Han changed the base branch from feat/cli-tui-semantic-color-slots to main July 16, 2026 02:44
… on overflow

Address Codex + Claude Opus review findings on #1056:

- toolDisc now maps `failed` (background shell_run failed/timed_out/
  orphaned) to the danger disc alongside error/aborted, instead of the
  muted done disc. The disc is the sole status carrier on the collapsed
  row, so a failed run was previously indistinguishable from success.
- renderCompactToolBlock now allocates width so the disc, name, duration,
  and `›` are always preserved; only the input and summary text truncate
  on overflow. A long command previously hid elapsed time and the expand
  marker - a regression from the single-line reorder, which moved duration
  from before the input to after it.

Adds regression tests for the failed danger disc and for duration/`›`
surviving a width overflow. 366 tests pass.
@Astro-Han
Astro-Han merged commit a94db86 into main Jul 16, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the feat/cli-tui-tool-grammar branch July 16, 2026 03:18
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