Skip to content

fix(tui): the spotlight card floats over the room, never rearranges it [spec 10] - #128

Merged
wine-fall merged 1 commit into
mainfrom
zachg-0812--tui-card-overlay
Aug 12, 2026
Merged

fix(tui): the spotlight card floats over the room, never rearranges it [spec 10]#128
wine-fall merged 1 commit into
mainfrom
zachg-0812--tui-card-overlay

Conversation

@wine-fall

Copy link
Copy Markdown
Owner

Implements specs/spec10/10-tui.md §3.2-B / §3.3 (overlay amendment, 2026-08-12).

What

The spotlight card was a flex sibling in the root column: mounting it took ~20 real rows from the layout, and on borderline terminal heights the scene-yield guard (cardTop > 3 + sceneRows) collapsed the entire sky band — the figure vanished and the wordmark ident jumped to the top of the frame on every pre-broadcast check (user report, 2026-08-12).

The card is a mask, not a sibling. It is now absolutely positioned over the room (yoga position: absolute + zIndex, anchored a gap row above the bottom rule, centered): it takes no rows, so the room dims (hush) but never rearranges. sceneShown drops its card clause — the band stays whenever the settings pane is closed. The raster layers' yield contract is unchanged: kitty images composite above text cells, so stagePlan / waveRowsFor still clip or delete the figure/ripple only where the card's own rows reach (all pure modules and their tests untouched).

One yoga finding locked into a comment: absolute insets anchor to the parent's border box, not the padding box, so the ultrawide gutter (>184 cols) must be added back into left to keep the card centered.

Evidence (real-frame A/B, 200x60 pty + pyte replay)

Fake engine sends the pre-broadcast checklist ask; real TUI client under a ghostty-env pty; final grid asserted:

  • main: wordmark_row=2 — scene band collapsed, wordmark at the top of the frame (the reported bug); viz stream ~28KB (wave off stage).
  • this branch: scene band on stage (char wave rows 18–36, stream ~556KB), card floating at rows 40–57, left col 49 (centered), log dimmed behind it, identity + rule keep the bottom.

Tests

  • pnpm test 780 passed, pnpm run typecheck, oxlint, and tui tsc all green.
  • No pure-module logic changed; the seam tests (stagePlan, waveRowsFor, cardTopRow) already pin the raster-yield contract. The layout change itself is JSX-only and was verified by the real-frame harness above; the border-box gutter finding is not unit-testable headlessly (yoga layout), recorded in the code comment instead.

Peer review (codex gpt-5.5 xhigh): 0 findings.

AI coding brief

  • Original request: the user reported that opening the pre-broadcast check card made the logo/figure UI vanish — they expected a mask that leaves the shown UI alone — then asked "does it have to push the layout? can't it float?" and, once floating was confirmed feasible, said ship it.
  • Manual interventions: the user supplied two screenshots (fresh boot vs card open) that pinned the symptom to the scene band unmounting; no mid-build redirections after the direction was agreed.
  • Retro: the root-cause trace (flex sibling + scene-yield guard, not a rendering bug) came straight from reading app.tsx before proposing fixes — starting from the two screenshots' diff kept the investigation to one file. Checking OpenTUI's type surface for position/zIndex before promising the overlay avoided a dead-end design; the pty A/B harness caught the border-box centering bug that no unit gate could.

🤖 Generated with Claude Code

…ts rows [spec 10]

The card was a flex sibling: mounting it took ~20 rows from the layout,
and on borderline heights the scene-yield guard collapsed the whole sky
band, throwing the wordmark to the top of the frame (user report). The
card is a mask, not a sibling — it is now absolutely positioned over the
room (yoga absolute, zIndex above the text layer), anchored a gap row
above the bottom rule, so the room dims but never rearranges. The scene
band stays whenever the pane is closed; the raster layers still yield
where the card's rows reach (stagePlan / waveRowsFor, unchanged). Yoga
anchors absolute insets to the parent's border box, so the ultrawide
gutter is added back to keep the card centered.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wine-fall
wine-fall merged commit 3cbc297 into main Aug 12, 2026
3 checks passed
@wine-fall
wine-fall deleted the zachg-0812--tui-card-overlay branch August 12, 2026 10:51
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