Skip to content

TUI: answer the refine keys from the queue, not the triage menu - #108

Merged
MJohnson459 merged 2 commits into
mainfrom
worktree-cockpit-refine-keys
Aug 1, 2026
Merged

TUI: answer the refine keys from the queue, not the triage menu#108
MJohnson459 merged 2 commits into
mainfrom
worktree-cockpit-refine-keys

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Refine is deliberately not a triage verdict — a proposal that goes through it
is still proposed — so filing it behind the verdict menu put it under a
decision it does not make, and hid it one keypress behind the very menu whose
three bad options it exists to escape. The operator notices a sub-standard body
while reading it in the queue, which is where r and R now answer.

What changed

  • r (note-driven) and R (interactive) act on a selected proposal from both
    the cockpit and the tasks browser, via a new refine_selected gated on
    TaskState::Proposed. Anything else is a no-op that says why on the status
    line, matching w and !.
  • Refresh moves to ctrl-r, freeing the letter.
  • The triage menu keeps its own r/R pair, so a refine decided mid-verdict
    costs no escape. Both paths keep the guard refusing anything but a proposal.
  • The key hint line gains r/R refine on a proposal. This is what surfaced the
    whole thing: refine had no hint anywhere, because key_hints is computed per
    screen and the menu that owned the keys is a mode.
  • DESIGN.md §6 updated — it specified the triage-menu placement, and now
    carries the reasoning for the move plus the ctrl-r rebind. The two CLI
    error strings that pointed at the triage menu now point at R over a
    proposal.

Note for the reviewer

r is a breaking rebind for anyone with refresh in muscle memory. CHANGELOG.md
is untouched, following the convention of the last six commits, but this is
arguably a Changed entry.

From the cockpit a proposal still needs Enter to fold its project's digest open
before r/R reach it (proposals collapse into a per-project digest,
DESIGN.md §7), so it is two keys there rather than one; the tasks browser,
where proposals are ordinary rows, is the single-keypress case.

Two pre-existing defects were found and deliberately left alone:

  1. The note-driven refine spawns a stray agent session literally named
    voro-{task_id}spawn_expansion (dispatch.rs:500) substitutes only
    PROMPT_FILE_PLACEHOLDER, where the real dispatch path
    (dispatch.rs:884-885) substitutes TASK_ID_PLACEHOLDER too. Underneath
    that, refine() borrows agent.dispatch_command(), whose built-in claude
    template carries --bg --name, so refine launches a backgrounded named
    session at all — contradicting DESIGN.md §6's "it is not a dispatch".
  2. key_hints ignores app.mode, so any open modal still shows the underlying
    screen's keys.

Verification

cargo test --workspace 273 passed / 0 failed.
cargo clippy --workspace --all-targets -- -D warnings clean.
cargo fmt --all applied.

MJohnson459 and others added 2 commits August 1, 2026 18:30
Refine is deliberately not a triage verdict — a proposal that goes
through it is still `proposed` — so filing it behind the verdict menu
put it under a decision it does not make, and hid it one keypress
behind the very menu whose three bad options it exists to escape. The
operator notices a sub-standard body while reading it in the queue,
which is where `r` and `R` now answer.

Refresh moves to `ctrl-r` to free the letter. The triage menu keeps its
own pair, so a refine decided mid-verdict costs no escape, and both
paths keep the guard that refuses anything but a proposal.

The key hint line gains `r/R refine` on a proposal, which is what
surfaced this: refine had no hint anywhere, because the hints are
computed per screen and the menu that owned the keys is a mode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QUiy1Y4sr5kXmKrYqjaTU
Leaving `r`/`R` in the verdict menu as well as the queue kept the claim
the move exists to retract: that refine is something triage does. One
key in one place, and the guard refusing anything but a proposal lives
in the single entry point.

The two triage-menu tests go with it. The note-submission path they
covered folds into the queue-level test; nothing replaces the rest,
since a test that a keybinding is absent pins behaviour that was never
a requirement.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QUiy1Y4sr5kXmKrYqjaTU
@MJohnson459
MJohnson459 merged commit d321552 into main Aug 1, 2026
6 checks passed
@MJohnson459
MJohnson459 deleted the worktree-cockpit-refine-keys branch August 1, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant