fix(desktop): replay pending approvals after reconnect - #82087
Open
konsisumer wants to merge 1 commit into
Open
Conversation
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.
What changed and why
Per the reporter's clarification on 2026-08-05, a Desktop approval can remain queued after its original WebSocket delivery is lost.
session.resumeandsession.activatenow return the oldest unresolved approval using the existing session-scoped approval queue. Desktop restores that prompt only after its runtime session is bound, so the existing approval controls can respond normally without re-running the tool or extending the timeout.Addressing maintainer feedback
How to test
pytest tests/tui_gateway/test_protocol.py -q -x --timeout=60(43 passed).pytest tests/tools/test_approval.py::TestApprovalTimeoutIsNotConsent -q -x --timeout=60(4 passed).tests/tools/test_approval.py::TestDetectDangerousRm::test_nonrecursive_verification_artifact_cleanup_is_not_dangerousassertion.What platforms tested on
apps/desktop/node_modulesis unavailable in this worker environment; no manual Desktop run was performed.Refs #53839