Repository navigation
feat(tui): approve via focus-gated card menu, suspend composer - #284
Merged
Merged
Conversation
Approval decisions now flow through a boxed card that claims focus when an
approval arrives. Up/Down select, Enter confirms, Esc cancels (= deny). The
composer is suspended behind a waiting border with pre-typed text preserved.
Typed answers ("yes"/"no"/"remember") and deny-with-feedback are removed.
- Add FocusBlock::Approval to the Tab cycle; menu keys only route while the
card holds focus, so operators can Tab away mid-approval.
- Composer shows waiting_border and dims while an approval is pending.
- New palette tokens waiting_border/approval_accent across all 5 shipped
themes, with config-side fallbacks for older theme files.
- Tests: menu-driven approval flow, Tab-away gating, card render in every
shipped theme, long-command wrapping, call_id menu-selection reset.
mohitranka
added a commit
that referenced
this pull request
Aug 21, 2026
Approval decisions now flow through a boxed card that claims focus when an
approval arrives. Up/Down select, Enter confirms, Esc cancels (= deny). The
composer is suspended behind a waiting border with pre-typed text preserved.
Typed answers ("yes"/"no"/"remember") and deny-with-feedback are removed.
- Add FocusBlock::Approval to the Tab cycle; menu keys only route while the
card holds focus, so operators can Tab away mid-approval.
- Composer shows waiting_border and dims while an approval is pending.
- New palette tokens waiting_border/approval_accent across all 5 shipped
themes, with config-side fallbacks for older theme files.
- Tests: menu-driven approval flow, Tab-away gating, card render in every
shipped theme, long-command wrapping, call_id menu-selection reset.
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
Approval decisions now flow through a boxed card that claims focus when an
approval arrives. Up/Down select, Enter confirms, Esc cancels (= deny). The
composer is suspended behind a waiting border with pre-typed text preserved.
Typed answers ("yes"/"no"/"remember") and deny-with-feedback are removed.
- Add FocusBlock::Approval to the Tab cycle; menu keys only route while the
card holds focus, so operators can Tab away mid-approval.
- Composer shows waiting_border and dims while an approval is pending.
- New palette tokens waiting_border/approval_accent across all 5 shipped
themes, with config-side fallbacks for older theme files.
- Tests: menu-driven approval flow, Tab-away gating, card render in every
shipped theme, long-command wrapping, call_id menu-selection reset.
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
Approval decisions now flow through a boxed card that claims focus when an
approval arrives. Up/Down select, Enter confirms, Esc cancels (= deny). The
composer is suspended behind a waiting border with pre-typed text preserved.
Typed answers ("yes"/"no"/"remember") and deny-with-feedback are removed.
- Add FocusBlock::Approval to the Tab cycle; menu keys only route while the
card holds focus, so operators can Tab away mid-approval.
- Composer shows waiting_border and dims while an approval is pending.
- New palette tokens waiting_border/approval_accent across all 5 shipped
themes, with config-side fallbacks for older theme files.
- Tests: menu-driven approval flow, Tab-away gating, card render in every
shipped theme, long-command wrapping, call_id menu-selection reset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Approval decisions now flow through a boxed approval card that claims focus when a HITL request arrives. Up/Down select an option, Enter confirms, Esc cancels (= deny). The composer is suspended behind a
waiting_borderwhile the approval is pending, and pre-typed text is preserved in place. Typed answers (yes/no/remember) and deny-with-feedback are removed.Decisions locked in the design grill session:
Cancel=Esc=Deny(no new action)FocusBlock::Approvaladded to the Tab cycle; menu keys only route while the card holds focus, so the operator can Tab away mid-approval (file navigation, panels) and returnChanges
FocusBlock::Approvalin the cycle;sync_approval_focusclaims focus once per new approval (runs from the event loop, never render, so Tab-away isn't re-grabbed)focus.block == Approval;type_to_composeblocked while pending; stale typed submissions preserve text and show the card hint┌─ ⏸ APPROVAL REQUIRED ─┐, wrapped command, menu rows, and hint↑↓ select · Enter confirm · Esc cancel; focused border usesapproval_accentwaitingstate renderswaiting_border+ dim, hides the placeholder hint, keeps typed textwaiting_border+approval_accentadded to forge-config palette model with fallbacks, and to solarized-dark/light, kanagawa-wave, gruvbox-dark, catppuccin-mochaparse_approval_line/ApprovalAction/InputRoute::ResolveApproval,ApprovalMenuPhase,ApprovalMenuKind::DenyWithNote,ConversationRenderKey::approval_menu_deny_feedbackTests
call_id) resets menu selection; same-id sync doesn'tValidation
cargo fmt --all -- --checkcleancargo clippy --workspace --all-targets --locked -- -D warningscleancargo test --workspace --all-targets --lockedgreen except 3 pre-existingforge-config::permissionsfailures caused by this machine's real~/Library/Application Support/forge/permissions.toml(confirmed failing on base commit5b67c9b, unrelated to this PR)forge --versionOK