Skip to content

fix(fleet-tui): fix empty kill confirmation modal box - #451

Merged
Jason Robert (jrob5756) merged 2 commits into
mainfrom
fix/449-fleet-tui-kill-modal-empty-box
Aug 16, 2026
Merged

fix(fleet-tui): fix empty kill confirmation modal box#451
Jason Robert (jrob5756) merged 2 commits into
mainfrom
fix/449-fleet-tui-kill-modal-empty-box

Conversation

@jrob5756

Copy link
Copy Markdown
Collaborator

Summary

#confirm-dialog was a Vertical with width: auto, and both its Static children fell back to Textual's base 1fr width (Static.DEFAULT_CSS only sets height: auto). An auto-width container whose children are all 1fr resolves to 0, so the dialog collapsed to 0x0 and painted as nothing but its border: thick $error — an empty red box.

Changes

  • Give #confirm-dialog a fixed width (60, capped at max-width: 90% for small terminals) instead of auto.
  • Wrap the confirm message in a VerticalScroll (#confirm-message-scroll) capped at max-height: 100% so a long message scrolls instead of overflowing or being silently truncated.
  • Dock the #confirm-hint widget to the bottom so it can't be pushed off screen by a long message.
  • Add regression tests asserting painted geometry/text, not just the string passed to ConfirmKillModal.__init__.

Closes#449

Jason Robertand others added 2 commits August 16, 2026 11:13
`#confirm-dialog` was a Vertical with `width: auto`, and both its Static
children fell back to Textual's base `1fr` width (Static.DEFAULT_CSS only
sets height: auto). An auto-width container whose children are all 1fr
resolves to 0, so the dialog collapsed to 0x0 and painted as nothing but
its `border: thick $error` -- an empty red box.
Give #confirm-dialog a fixed width (capped at 90% for small terminals),
wrap the message in a VerticalScroll capped at max-height so long
messages scroll instead of overflowing or truncating silently, and dock
the hint to the bottom so it can't be pushed off screen.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dering
PR #451 review: no test asserted on the confirm-kill dialog's fixed
60-width/max-width:90% CSS, so the fix could be reverted to width:auto
with the suite still green. Add dialog-width and inset assertions to
test_the_dialog_paints_its_message, a new wrapping regression test for
the ~100-char foreground warning line, and a new narrow-terminal test
pinning the max-width:90% branch at 40x12.
test_the_hint_stays_on_screen_with_many_foreground_runs never queried
#confirm-hint or #confirm-message-scroll and its named assertion passed
against the pre-fix 0-height dialog; it now checks the hint's own
region, that it actually painted, and that it doesn't overlap the
scroll viewport.
Also apply reviewer recommendations: scope the foreground-warning test
to the message widget's own region instead of a full-screen substring
match that incidentally matches the RunsScreen table underneath;
support an optional clip_to region on _painted_within for widgets whose
content overflows their scroll viewport, and delete the now-unused
full-screen _painted helper; document why ConfirmKillModal's
VerticalScroll is left focusable (no OptionList competing for focus,
unlike GateOptionsModal); explicit size=(80, 24) on tests that relied
on Textual's default terminal size; and correct docstring claims that
overstated what two focus-forwarding tests actually assert.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jrob5756
Jason Robert (jrob5756) marked this pull request as ready for review August 16, 2026 17:46
@jrob5756
Jason Robert (jrob5756) merged commit 80d16cd into mainAug 16, 2026
12 checks passed
@jrob5756
Jason Robert (jrob5756) deleted the fix/449-fleet-tui-kill-modal-empty-box branch August 16, 2026 17:48
Sign up for freeto 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.

fleet TUI: kill confirmation modal renders as an empty red box (Static children collapse an auto-width container)

1 participant

@jrob5756