Skip to content

Open worktree, Open pull request, Compare to revision and Go to symbol show their keys on buttons, and F1 lists the rest #573

Open

Description

@a-team-app

Context

Part of #560: the second half. Open worktree (ow), Open pull request (opr), Compare to revision and Go to symbol (gs) still end in a hint row, and F1 doesn't list their keys. They move onto MentalDesk.Tui's PickerDialog, as the first task (#572) moves the others. They can't move yet because PickerDialog (as of 0.3.12) lacks four things they need. It takes a fixed list of rows, it has no column header, no loading or failed state inside the list, and no inline error that keeps the picker open.

Waits on a tui-style-guide release with those four, and on #572. The Dev can't open the library PR. The stakeholder, or the tui-style-guide team's Lead, files the issue below there. This task is held with blocked until a MentalDesk.Tui release has it.

Draft issue for mentaldesk/tui-style-guide

Title: A picker whose rows load slowly, have columns, or can fail to open still has to build its own list, so its keys end up in a hint row

Opportunity. PickerDialog covers a picker whose rows are known up front. TuiCode has four that aren't like that, so they can't use it, and they keep hint rows the guide forbids:

  • Rows that arrive later, or fail to. Open pull request, Compare to revision and Go to symbol fetch their rows. They show Loading… inside the list, then the rows, or a failure with a retry, as the guide's loading rule says (TuiCode#525). PickerDialog takes its rows in the constructor.
  • A column header. Open worktree lists branch, folder and status in aligned columns under a dimmed header that fits the width.
  • An error that keeps the picker open. When Open pull request can't check out the chosen PR, it says why inside the picker and stays open, so the user can pick another.

Ask. PickerDialog gains: rows set after it opens, with loading and failed states inside the list area (reusing LoadStateView, with the pick button dimmed while not loaded), an optional header line above the list, and a way to show an error line and stay open after a pick fails. The guide's picker section says how each looks.

Acceptance criteria

All four pickers

  • The filter field says a dimmed Type to filter until I type.
  • At the foot are two buttons and no hint row. The pick button is ▓ Enter Open ▓ in Open worktree, ▓ Enter Check out ▓ in Open pull request, ▓ Enter Compare ▓ in Compare to revision and ▓ Enter Go to ▓ in Go to symbol, each beside ▓ Esc Cancel ▓.
  • When the filter matches nothing, the list says (no matches) and the pick button dims.
  • F1 opens Help headed with the picker's title, listing every key it binds. Esc returns to the picker as it was.

Each one's own behaviour, unchanged

  • Open worktree still shows its column header, aligned with the rows at any width.
  • Open pull request, Compare to revision and Go to symbol still show loading inside the list, then the rows, or a failure I can retry. The pick button is dimmed until rows arrive.
  • When a PR can't be checked out, Open pull request says why and stays open.
  • Every key works as before.

Tests

  • Per picker: placeholder, button labels, no hint row, (no matches) with the button disabled, and F1 sheet contents.
  • Loading → loaded, loading → failed → retry, for the three pickers that fetch.
  • Worktree header alignment at a narrow and a wide width.
  • PR checkout failure keeps the picker open with the message shown.
  • Remove the TuiCode-side picker code these no longer need.

Out of scope

  • Open (Ctrl+O) and PathPromptView: tui-style-guide#60.
  • Building the missing pieces in TuiCode instead of the library.
  • Any new key.

Activity

  1. a-team-app commented on Oct 17, 2026

    @a-team-app
    ContributorAuthor

    Blocked by #572: Same move onto PickerDialog, in the same views and helpers as #572

  2. a-team-app commented on Oct 17, 2026

    @a-team-app
    ContributorAuthor

    Held as blocked until a MentalDesk.Tui release lets PickerDialog take rows after it opens (with loading and failed states), show a column header, and show an error while staying open. The draft issue for tui-style-guide is in the body, ready for you or that team's Lead to file. Remove the label once a release has it.

  3. added
    a-team:devClaimed by the a-team Dev
    and removed
    blockedWaiting on another issue
    on Oct 20, 2026
  4. a-team-app commented on Oct 23, 2026

    @a-team-app
    ContributorAuthor

    The PickerDialog additions this needs are up as a draft: mentaldesk/tui-style-guide#110 (rows that load, a column header, a pick that fails and stays open). Please review and release it. This task waits on that release and picks up from there.

  5. added
    a-team:upstreamWaiting on a change in another repo; frees itself once that's closed or released
    on Oct 23, 2026
  6. a-team-app commented on Oct 23, 2026

    @a-team-app
    ContributorAuthor

    Blocked by mentaldesk/tui-style-guide#110, until released: PickerDialog needs to load rows, show a header and stay open on a failed pick

    GitHub can't link mentaldesk/tui-style-guide#110 as a dependency, so the wait is recorded here.

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

    a-team:devClaimed by the a-team Deva-team:upstreamWaiting on a change in another repo; frees itself once that's closed or released

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions