Skip to content

fix(ui): clear permission after response#26905

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

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

Conversation

@donicrosby

@donicrosby donicrosby commented May 11, 2026

Copy link
Copy Markdown

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 github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels May 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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 github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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