Skip to content

feat(tui): pin the last message trailer and shed busy footer hints - #155

Merged
quickbeard merged 2 commits into
mainfrom
footer-trailer-layout
Aug 2, 2026
Merged

quickbeard merged 2 commits into
mainfrom
footer-trailer-layout

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Two layout changes to the block above the prompt.

Pinned message trailer

Baked for <duration> used to live at the bottom of the transcript, which put the todo panel between it and the input box and made it scroll away as soon as you moved back through history.

The trailer is extracted from AssistantMessage into an exported MessageTrailer (it owns the model/final/duration/suppressed/aborted memos, which moved with it). AssistantMessage renders it inline only for history; Session renders the last message's copy in the pinned block, between the todo panel and the prompt slot:

     All good.

     [✓] wire the resolver
     [•] backfill the tests
     ✺ 1 of 3 finished · ctrl+b to show full TODO

     Baked for 1.6s

   ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

Spacing moved with it: the todo panel takes over the blank row that used to come from the trailer's marginTop, and the pinned trailer adds its own top gap only when no panel precedes it (spaced prop, driven by a new todoActive predicate shared with TodoPanel). Verified in all four combinations — both visible, trailer only, panel only, neither.

Side effect worth flagging: the pinned trailer no longer scrolls away.

Width-tiered busy footer

While a turn runs the row carries the spinner, the interrupt hint, the modified-file count and context/cost. As the terminal narrows, flexbox first squeezes the gaps to single spaces, and below ~85 columns the row wraps to two lines and clips the cost:

   ▰▰▱▱▱▱▱  esc            ctrl+b 12 modified     1.2M (98%) · $123.4
            interrupt      files

It now sheds by value instead:

Width Shed
≥ 108 nothing
88–107 ctrl+p commands
< 88 + the modified-file count

The spinner and interrupt hint always stay. Measured at 120/100/90/80/70 — all render on one line (118, 98, 88, 78, 68 columns used).

Notes

  • DIVERGENCES.md: two new rows, plus edits to the two existing rows this touches (the trailer-dedup row and the busy-arm hint row).
  • CHANGELOG.md: an entry for each change.
  • New footer-width.view.test.tsx (3 tests across widths) and a pinned-position test added to message-trailer.view.test.tsx.
  • Full TUI suite: 262 pass, 1 fail. The failure (@ mention popup lists files before references and agents) is pre-existing and unrelated — it fails identically on a clean main checkout with ENOENT /tmp/opencode/state/kv.json.

🤖 Generated with Claude Code

Two layout changes above the prompt.

The last assistant message's trailer is extracted into an exported
MessageTrailer and hoisted out of the transcript into the pinned block
below the todo panel, so "Baked for <duration>" sits directly above the
prompt and stays there when you scroll back through history. History
keeps its trailers inline. Spacing moves with it: the todo panel takes
over the blank row that separated the pinned block from the transcript,
and the pinned trailer only adds its own top gap when no panel precedes
it.

The busy footer carries spinner, interrupt hint, modified-file count and
context/cost. As the terminal narrows flexbox runs the gaps to zero and
below ~85 columns the row wraps and clips the cost. It now sheds by
value instead: the palette hint below 108 columns, the modified-file
count below 88. The spinner and interrupt hint always stay.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard force-pushed the footer-trailer-layout branch from 2dce3f6 to bb8f655 Compare August 2, 2026 10:35
@quickbeard
quickbeard merged commit dfc1f36 into main Aug 2, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the footer-trailer-layout branch August 2, 2026 11:13
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