Skip to content

fix(ui): clear permission after response#26905

Open
donicrosby wants to merge 4 commits into
anomalyco:devfrom
donicrosby:fix/web-permission-response
Open

fix(ui): clear permission after response#26905
donicrosby wants to merge 4 commits into
anomalyco:devfrom
donicrosby:fix/web-permission-response

Conversation

@donicrosby
Copy link
Copy Markdown

@donicrosby donicrosby commented May 11, 2026

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

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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?

  • Reproduced the stale child-session permission prompt with Chrome DevTools MCP.
  • Verified the prompt clears after clicking "Allow once" with this fix applied.
  • bun typecheck from packages/app
  • bun run build from packages/app
  • bun test --preload ./happydom.ts ./src/context/global-sync/event-reducer.test.ts
  • Push hook: bun turbo typecheck
    Note: session-composer-state.test.ts fails on clean HEAD with 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
opencode-permission-before-fix-stale
After this change, the confirmed permission response clears the prompt from the composer:
Permission prompt cleared after fix
opencode-permission-after-fix-current

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

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>
@donicrosby donicrosby requested a review from adamdotdevin as a code owner May 11, 2026 16:17
@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 11, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 11, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

fix(app): permission prompt remains stuck after approving child session request

1 participant