Conversation
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the ownership or scope check is wrong, a user could receive activity notifications for another WebChat session, and any such disclosure cannot be recalled by reverting. Client-side failures would otherwise be ordinary stale-history or redundant-refresh bugs that reverting fully removes.
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.
Fixes #10097.
An idle WebChat window does not see scheduled or other proactive messages until history is reloaded. After a normal chat run ends, there is no generation queue for
send_by_sessionto deliver to, so it only persists the message.This adds an authenticated, owner-checked session SSE endpoint for history invalidations. Rejected subscriptions return a generic error rather than exception details. Proactive persistence notifies viewers only after the database write succeeds. These subscriptions are separate from generation queues, so multiple viewers do not cause duplicate persistence or keep a chat run alive. Each subscriber buffers at most one invalidation; connections send keepalives and release their queues on disconnect.
Both dashboard chat views use the shared message composable to subscribe while idle. Connection/reconnection refreshes history to recover missed notifications, existing loaded pages are retained, and updates arriving during a refresh trigger another read. Starting a run or switching sessions closes the subscription and prevents an in-flight refresh from overwriting live messages. The OpenAPI spec and generated client are updated.
This does not create LLM checkpoints for proactive messages or change scheduled-agent execution.
Validation (Windows, Python 3.12.13):
git diff --checkpassed.AI assistance: Codex assisted with investigation, implementation, and tests. The original adapter's proactive-send path was compared with the modified path locally: both persisted once; only the modified path emitted a history notification. No external model calls were used for these regression tests.