Skip to content

fix(tui): spinner vanished whenever the status area was occupied - #171

Merged
stippi merged 2 commits into
mainfrom
fix/tui-spinner-hidden-by-status-area
Jul 26, 2026
Merged

fix(tui): spinner vanished whenever the status area was occupied#171
stippi merged 2 commits into
mainfrom
fix/tui-spinner-hidden-by-status-area

Conversation

@stippi

@stippi stippi commented Jul 26, 2026

Copy link
Copy Markdown
Owner

The status area (plan, multi-line info, pending user message) is its own layout region between the content area and the composer, but paint() also subtracted its height from the scratch buffer's cursor. Since the viewport is sized to exactly desired_viewport_height(), the content area shrank by status_height while the composed content simultaneously moved up by status_height — the bottom-aligned copy then had room for nothing but the reserved blank rows, and the spinner (plus the top of the live message) fell out of the viewport. A displayed plan made the progress spinner disappear entirely.

Budget the status height against its own status_budget (the rows the layout can actually hand out) and leave cursor_y to the spinner and the live message. Cap a single entry at 20 rows like measure_status_height does, so paint never reserves more than the viewport height that was requested.

Also retire a finished plan when the user submits the next message: it stays up for the whole turn and past the agent's closing answer, but a plan whose items are all completed belongs to the request that is over. A plan with open items survives — the new message usually continues it.

stippi added 2 commits July 26, 2026 18:30
The status area (plan, multi-line info, pending user message) is its own
layout region between the content area and the composer, but `paint()`
*also* subtracted its height from the scratch buffer's cursor. Since the
viewport is sized to exactly `desired_viewport_height()`, the content
area shrank by `status_height` while the composed content simultaneously
moved up by `status_height` — the bottom-aligned copy then had room for
nothing but the reserved blank rows, and the spinner (plus the top of
the live message) fell out of the viewport. A displayed plan made the
progress spinner disappear entirely.

Budget the status height against its own `status_budget` (the rows the
layout can actually hand out) and leave `cursor_y` to the spinner and
the live message. Cap a single entry at 20 rows like
`measure_status_height` does, so paint never reserves more than the
viewport height that was requested.

Also retire a finished plan when the user submits the next message: it
stays up for the whole turn and past the agent's closing answer, but a
plan whose items are all completed belongs to the request that is over.
A plan with open items survives — the new message usually continues it.
@stippi
stippi merged commit 20327e7 into main Jul 26, 2026
9 of 10 checks passed
@stippi
stippi deleted the fix/tui-spinner-hidden-by-status-area branch July 26, 2026 21:20
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