Skip to content

Ctrl+A agents overlay can panic on narrow terminals #478

@EdwardTang

Description

@EdwardTang

When AutoDrive has just started and you press Ctrl+A to open the Agents overlay, the TUI can panic with "assertion failed: min <= max" (core::cmp).
Repro (narrow terminal):

  1. Resize terminal to ~31-53 columns wide.
  2. Start AutoDrive.
  3. Press Ctrl+A to open Agents overlay.
    • Actual: panic at core/src/cmp.rs:1082.
    • Expected: overlay renders without crashing.

Root cause: sidebar width uses desired_sidebar.clamp(24, max_allowed) where max_allowed can be < 24 for narrow widths.

Suggested fix: guard when max_allowed < 24 and skip the clamp (use max_allowed directly).

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