Repository navigation
Conversation
3 of 6 tasks
4 of 6 tasks
Member
Author
|
Folded into #58508, which now holds the whole /goal stack (idle hook, settled notifications, /goal, TUI and desktop) in one PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Stacked on #58508, which adds
SessionBackground.outstanding. Merge that first; this PR then retargets todev.Type of change
What does this PR do?
Desktop and the TUI play the "done" sound and show "Response ready" on every
session.execution.succeeded. That event only means one execution ended. A Session waiting on background subagents ends an execution when its turn ends, and again each time a subagent's result wakes it. So it beeps while the subagents are still working, and again for each one.This adds an ephemeral
session.settledevent.SessionExecutionpublishes it right aftersucceededwhen no background subagent of the Session or its descendants is still running. While one is running, nothing is published. When it finishes, its notice wakes the Session, that execution succeeds with nothing outstanding, andsettledfollows. Clients don't poll and nothing extra wakes up.shell/notifications/notification.tsx) and the TUI notifications plugin now notify "done" onsession.settledinstead ofsession.execution.succeeded.session.execution.failed. Failed and interrupted executions never settle.bun devnever notifies. A Session waiting on a background build still gets a second notification after the build reports; that is the current behaviour.bun run generate).Not included:
packages/app/src/voice/call.tslistens for the deprecatedsession.idle, which nothing publishes. Voice probably wants every reply rather than settled, so I left it for a separate change.How did you verify your code works?
packages/core/test/session-execution.test.ts:settled. After the subagent finishes and the Session runs again,settledfollowssucceeded, even though the shell is still running.packages/tui/test/cli/cmd/tui/notifications.test.ts: a turn that ends while a subagent runs doesn't notify; the later settled execution notifies once. Existing tests now emitsettled.packages/app/test-browser/server-notification-state.test.ts: the "Response ready" alert now followssession.settled.bun run checkpasses. The core runner, execution, subagent and bus routing suites pass (299 tests), along with theschemaandclienttest suites.Visual
A looping animation for the desktop app's "What's new" dialog. GitHub only shows its source.
SVG source
Screenshots / recordings
N/A, notification timing only.
Checklist