Skip to content

os/v3/puppy: a console-TUI confirmation loses the row that says how to answer it - no hint at all at 40x11, half a hint at 40x12 #1027

Closed

Description

@bong-water-water-bong

Found while sweeping the fifth "no half blocks" case (#1012 → #1014, #1015 → #1026). Different block, same payer: the
confirmation dialog.

draw() sizes the modal box to its body and clamps it to the frame (bh = (body.len() + 2).min(area.height)), then
draws the body with Paragraph, so when the body does not fit, ratatui clips its end - and the last line of every
dialog is the hint, the only row that says how to answer.

Measured on the shipped static binary (main 434db3d2's build, 0edbe573…), real ptys, TERM=linux, key 1 on a
blank-key box (API key / Require one from now on? … / y mints one and restarts Lemonade, n cancels):

size the hint on screen
80x25, 60x12 y mints one and restarts Lemonade, n cancels - intact
40x12 y mints one and restarts - half
40x11, 40x10, 30x12, 24x12 absent entirely

The same clamp applies to every dialog, and the text is worse for the destructive ones: Modal::Confirm { yes: Yes::Reboot } carries y reboots the box, n cancels, and Modal::Power carries r reboots, p powers off, any other key cancels. So in a 40x11 ssh window the screen shows the question and no visible way to answer it, while y still
does what the question says. Not reachable from the gates (80x25 / 240x67 have the rows), so no gate impact - but it
is the one place where a key the screen does not explain changes the box.

The fix belongs to the same family as #1014/#1015: the hint is the block's last row but the most load-bearing, so a
frame too short for the whole box should lose the question rows first (whole rows at a time), then the title, and
never the hint. PR follows.

Activity

  1. added 2 commits that reference this issue on Nov 4, 2026
    463ad87
    7ba4e7f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions