Skip to content

TUI scan viewport height goes negative on terminals shorter than 9 rows #37

Closed

Description

@TMHSDigital

Why it matters

On a terminal shorter than 9 rows (a tmux split, a small IDE terminal), the scan-view viewport height goes negative, and rendering breaks. This is ROADMAP N6.

Evidence

  • internal/tui/scan_view.go:65: m.viewport.Height = msg.Height - 8, with no clamp.
  • The initial size in newScanViewModel should be checked for the same pattern.

Suggested approach

Clamp to max(1, msg.Height-8), and the width likewise. Optionally show a "terminal too small" notice below a minimum size.

Done when

A scan_view_test.go case sends tea.WindowSizeMsg{Height: 3} and the view renders without a negative height or a panic.

Activity

  1. added
    bug
    priority: low
    area: tui
    on Oct 4, 2026
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

    area: tuibugpriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions