Skip to content

CL-8792: allow-once no longer stalls a second destructive command without re-prompt - #1173

Open
TheGreatAxios wants to merge 3 commits into
mainfrom
cl-8792-allow-once-can-stall-a-second-destructive-command-without-re
Open

TheGreatAxios wants to merge 3 commits into
mainfrom
cl-8792-allow-once-can-stall-a-second-destructive-command-without-re

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Implements CL-8792 on the single-slot overlay host.

What changes:

  • Settling allow-once resolves exactly once and frees the host, draining pending so the next gate opens.
  • A replaceable command surface (help/settings/MCP/etc.) on screen yields to a newly raised decision gate and returns after that gate settles.
  • A queued card takes the host before a deferred slash/settings/MCP surface; its auto-deny timer arms only on display.
  • Inline popups (mentions, palette, pickers) keep their stacking contracts; a slash requested while a live gate holds the host still waits.
  • A pending tool row does not advance elapsed while a decision gate is outstanding but hidden.
  • Allow Once still persists nothing; Allow Always / Reject ranking unchanged. Fail-closed preserved (unknown to deny, no-listener emit to deny, Esc to deny). mintGrant, grant reconciliation, and auto-mode rules untouched.

Verification:

  • bun run typecheck: exit 0
  • bun test src/permission src/tui/gate-wire.test.ts src/tui/request-approval.test.ts: 606 pass, 0 fail, exit 0
  • bun test ./src ./tests ./evals ./scripts --randomize --seed 424242: 8036 pass, 0 fail, exit 0
  • bun run lint: exit 0
  • Red run failed first (9 allow-once-reprompt tests, overlay never reopened / evaluations hung); green passes after the fix.

Flagging warden review: this touches the permission-gate overlay path (gate-wire, overlay host suspend/resume). Do not merge without warden review.

Fixes CL-8792

Allow-once settles exactly once and frees the single-slot overlay host, so an already-queued or newly raised card paints before any deferred slash/settings/MCP surface. Command surfaces suspend and return after the gate settles; inline popups keep their stacking contracts.
@linear-code

linear-code Bot commented Sep 25, 2026

Copy link
Copy Markdown

CL-8792

Suspend was a dismiss: it ran onCancel/onDispose and destroyed the
list, so restore painted a dead widget and MCP could steal the host
from the arriving gate. The preemptable-kind set also used command
aliases, so /model and /connect never yielded.
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