Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The approach looks right: it adds permission.asked and question form.created handling next to the existing idle and error alerts, using the same open-tab rule (#52204), the same coordinator dedupe and the same auto-approve check the session dock uses. I couldn't check it end to end, since that needs a desktop or browser session with real notifications and sound. The new tests pass here, and 7 of them fail on the base. tsgo -b passes.
Public API: unchanged (only adds the English string notification.question.title).
Two points:
- Questions use two different setting groups: the sound follows Permissions and the system notification follows Agent (see inline).
- The new test is a 14-case table with about 150 lines of setup for one handler.
packages/app/AGENTS.mdasks each test to pay for its upkeep. Could you cut it down to the core contracts: a permission alert, a question alert, no alert when auto-approve is on, no alert once the request is resolved while queued, and the child-request/root-tab case? The per-channel on/off and "other form" rows can go.
|
Opened #60358 building on your request-alert handling, with credit here and a Co-authored-by trailer in the commit. It adds independent Questions notification/sound settings for agent questions and MCP elicitation; permission requests and web search setup stay under Permissions. Thanks for the original fix! |
Issue for this PR
Closes #51507
Related: #37120, #48801
Type of change
What does this PR do?
The OpenCode V2 notification handler in WebUI only covered for Agent and Errors events. Permissions events never creates system notification or plays sound effects (this includes permission required and question asked by agents events).
Affected notification events in settings:
This PR adds handlers for permission.asked and question events. Both request types use the Permissions sound effect setting.
How did you verify your code works?
Tested manually via running
bun dev serve --port 9001in anix developshell. After the fix, the WebUI plays sound effects and delivers system notification on 2 affected events.System notifications delivered:


Added regression tests in server-notification-state.test.ts.
All tests in
packages/appwere passed locally.bun run --cwd packages/app test.Screenshots / recordings
No changes in UI itself.
Checklist
Added by the opencode bot (AI-generated).
Fixes #49371
Related: #47479, #45530, #48579