Repository navigation
fix(client): preserve live permission updates during list refresh - #52074
LeoParkerOu wants to merge 3 commits into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Related to #51223
Type of change
What does this PR do?
A delayed permission-list response can overwrite a newer permission.asked event, hiding the prompt, or restore a request already resolved by permission.replied. Merge events received during each list request into its snapshot before publishing it. This fixes the demonstrated client race; it does not establish that the race explains every case in #51223.
How did you verify your code works?
Client: 35 tests passed; core permission/MCP: 109 passed; TUI permission/transport: 83 passed. Real Code Mode → stdio MCP → server/SSE → TUI → HTTP approval tests cover live, pre-existing, delayed-list and parallel asks. With the client fix removed, the delayed-list case fails and the other three pass; with the fix all four pass. Root
bun run checkpassed. The integration test imports an outer tool transcript and starts at Tool.execute; it does not use an LLM or exercise the full SessionRunner. The reporter’s Linux/plugin/legacy-session environment is not fully reproduced.Tested locally on macOS with Bun 1.3.14 (the repository declares 1.4.2); remote CI has not run. The three independent patches also passed combined checks on v2 b30c4d0.
Screenshots / recordings
No new UI is introduced. The regression asserts the actual rendered permission prompt and successful completion after keyboard approval.
Checklist