Keep Direct Chat controls scoped to the selected session - #929
Draft
Y1fe1Zh0u wants to merge 1 commit into
Draft
Conversation
Direct Chat kept both per-session runtime caches and component-wide active state. Project controls through the selected session identity and keep delayed background sends from mutating the visible conversation. Constraint: Preserve background Session execution and WebSocket delivery Rejected: Close the previous Session socket on navigation | long-running Sessions must continue after the user switches away Confidence: high Scope-risk: narrow Reversibility: clean Directive: Never let background Session events update the visible composer without matching Agent and Session identities Tested: Frontend node tests 90 passed; TypeScript and Vite production build passed Not-tested: Live backend-connected multi-Session browser flow
Collaborator
Author
|
Drone build 486 now clones and builds the upstream-head commit successfully. The remaining failure is in the current main migration baseline, before any frontend code is exercised: Alembic has two f061 heads, and fresh DB upgrade fails in f061_enterprise_info_tenant_id with DuplicateColumnError because enterprise_info.tenant_id already exists. This PR changes only four frontend files. The blocker is recorded in the v1.11.4 regression gate and should be cleared by a separate main migration repair. |
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.
What changed
Why
When one Session was still running, switching to another Session could retain the first Session's blocked-input state and stop button. The component had both per-Session runtime caches and a component-wide
activeRun, so stale or delayed state could leak across the selection boundary.After this change, background Sessions continue running, but only the selected Agent/Session pair may update the visible chat controls.
Validation
cd frontend && npm test— 90 passedcd frontend && npm run build— passedgit diff --check— passedNot tested