Skip to content

Make shared TUI popups usable on narrow and short terminals #116

Description

@coderabbitai

Summary

Improve shared TUI popup layouts so Settings instructions, contextual help, and confirmation popups remain readable and usable on narrow and short terminals.

This follow-up is separate from the session-restoration implementation. The restore-session menu row exposed a pre-existing limitation in shared popup renderers.

Required changes

  • Add a compact, scrollable, or paged layout for the Settings instructions popup and applicable help popups.
  • Update the shared confirmation-popup renderer so its prompt and controls remain reachable on constrained terminal sizes.
  • Preserve essential content, including menu entries, confirmation controls, and close hints.
  • Add deterministic rendering regression tests with ratatui::backend::TestBackend at 40×12 and 40×24.

Affected areas

  • src/ui/help_popup.rs
  • Shared confirmation-popup rendering in src/ui/draw.rs
  • Related TUI rendering tests

Rationale

The TUI layout guidance requires panels to degrade gracefully on narrow and short terminals. Existing full-height wrapped popups can still clip content when the terminal height is limited. The session-restore entry makes this limitation more visible, but the behavior is shared by existing popup content.

Excluded work

OperationResult popup layout is excluded. The related half of the original finding is already fixed in commit 81b38ce.

Acceptance criteria

  • At 40×12 and 40×24, users can access the required Settings/help content, close hint, confirmation prompt, and controls without unreadable clipping.
  • The implementation uses a compact, scrollable, or paged behavior when viewport space is constrained.
  • TestBackend tests verify the constrained layouts deterministically.

Backlinks

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