Repository navigation
Conversation
…uis-CFM#857) When the island's ack misses the 800 ms window (or nobody answers within 108 s), pipe.rs drops the request and the terminal takes over, but the island kept the card for its own 110 s. Clicks did nothing, and every other PermissionRequest in that time was declined by the one-card rule. Rust now emits `approval-expired` with the request id when it gives up without a decision; the island drops the card if it is that request's and cancels its 110 s timer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes #857.
When the island's ack misses the 800 ms window (a busy or throttled webview), or nobody answers within 108 s,
pipe.rsdrops the request and Claude Code asks in the terminal. The island wasn't told, so it kept the card until its own 110 s timer. During that time clicking did nothing ("no pending request"), and every other permission request was handed back to the terminal by the one-card rule.Change
pipe.rs: whenwait_for_decisionreturns no decision, emitapproval-expiredwith the request id.island/hooks.ts: onapproval-expired, if the card on screen belongs to that request, drop it and cancel its 110 s timer. Any other id is ignored.Events reach the island in order, so a card that comes up after the ack window still goes. #849 and #869 touch the same files but not these lines.
Tests
tests/hooks.test.mjs: another request's expiry leaves the card alone; its own expiry takes it down; the next request gets its card, and the old 110 s timer doesn't take it down.pipe.rsandhooks.tsas main): A's ack misses the 800 ms window, A's card comes up anyway and stays; B is declined at once (decline id=…,not shown — terminal takes over).npm test(467 passed),cargo test --lib(516 passed),tsc --noEmitclean, on Windows 11.🤖 Generated with Claude Code