Skip to content

mecatui: bound /worktrees picker #2172

Closed

Description

@jbeda

Scope

Migrate the filterable /worktrees picker in cmd/mecatui/ui/worktrees.go to a height-bounded selectable list. renderWorktreesPanel currently ignores its offered height and renders every filtered worktree, allowing a long list to extend beyond the available conversation region. Keep the post-selection confirmation card out of scope.

Required outcome

  • Budget title, explanatory text, filter, and footer before sizing the rows. Use bounded.List with stable worktree identities (not filtered indices), and presentListRow for standard cursor presentation; keep list rows and overflow within the offered width/height, including a compact fallback.
  • Keep cursor and visible anchor stable on filtering/refresh when the same worktree remains; reveal the selected row and bound navigation. Preserve safe label/branch rendering, the filter, Enter confirmation, and the existing session handoff.
  • Preserve current key semantics unless a new affordance is explicitly justified and tested.

Verification

Scenario-first tests: many worktrees at short heights, a filtered/updated inventory, resize, selection visibility and correct confirmation identity, safe untrusted labels, empty/error/loading states. Run focused UI and bounded tests.

Relates to #1742 and #1589.

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