fix(ui): clear permission after response#26905
Conversation
Remove the accepted permission from the local sync cache after the server confirms the response so child-session permission prompts do not remain stuck in the composer. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
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. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
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. |
Remove the accepted permission from the local sync cache after the server confirms the response so child-session permission prompts do not remain stuck in the composer.
Ultraworked with Sisyphus
Issue for this PR
Closes #26907
Type of change
What does this PR do?
When a child session permission response succeeds, remove that permission from the local sync cache. The server already accepts the response, but the composer can keep rendering the stale permission prompt until another sync event arrives.
This keeps the UI state aligned with the confirmed server response so the prompt clears immediately after approval.
How did you verify your code works?
bun typecheckfrompackages/appbun run buildfrompackages/appbun test --preload ./happydom.ts ./src/context/global-sync/event-reducer.test.tsbun turbo typecheckNote:
session-composer-state.test.tsfails on cleanHEADwith a Solid router client-only import error before running tests, so that failure is pre-existing.Screenshots / recordings
Before, after clicking "Allow once", the permission prompt could remain stuck in the composer:


Permission prompt stuck before fix
After this change, the confirmed permission response clears the prompt from the composer:
Permission prompt cleared after fix
Checklist
If you do not follow this template your PR will be automatically rejected.