Repository navigation
fix(ui): preserve session identity across gateway snapshots - #113322
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 24, 2026, 8:38 AM ET / 12:38 UTC. ClawSweeper reviewWhat this changesThe PR stops ordinary Gateway snapshots from replacing the active Control UI session’s assistant identity with the configured fallback, while retaining fallback reset when the logical connection changes. Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain Keep this PR open for a normal maintainer review. The proposed change is a focused Control UI state-preservation fix, but the supplied manual-verification statement is not inspectable after-fix evidence, and the changed reset condition needs proof that both ordinary snapshots and logical connection/session changes retain the intended identity behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI receives Gateway snapshots and stores connection state plus the assistant identity displayed for the active chat session. Session-specific identity is loaded separately, and this snapshot handler decides when the UI should preserve it or revert to configured identity defaults. flowchart LR
A[Gateway snapshot] --> B[Control UI chat pane]
C[Session identity loader] --> B
B --> D{Logical connection changed?}
D -->|No| E[Keep session assistant identity]
D -->|Yes| F[Use configured fallback identity]
E --> G[Chat header and messages]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +17. Total +23 across 2 files. View PR surface stats
Review metricsNone. Mantis proof suggestionA short Control UI chat proof of split-view session creation and an ordinary Gateway snapshot would directly demonstrate the user-visible state change. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep session identity as the authoritative UI value across ordinary snapshots, reset it only at the verified connection boundary, and add visible split-view evidence plus focused coverage for both preserve and reset/reload paths. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was independently established. The supplied diff and focused regression test make the ordinary-snapshot path source-reproducible, but the actual split-view flow and reset/reload boundaries still need observable verification. Is this the best way to solve the issue? Unclear. Guarding the configured fallback assignment with the existing logical-connection change condition is a narrow solution, but it is only the best fix if session switches on an unchanged connection reliably refresh the active session identity afterward. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d2200f64af53. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
@openclaw-mantis web UI chat proof: reproduce split-view session creation, capture an ordinary Gateway snapshot update, and verify the active session-specific assistant identity remains visible. |
3ab73f7 to
5417904
Compare
Co-authored-by: openclaw-repo-broker[bot] <285669409+openclaw-repo-broker[bot]@users.noreply.github.com>
Co-authored-by: openclaw-repo-broker[bot] <285669409+openclaw-repo-broker[bot]@users.noreply.github.com>
5417904 to
64f6a97
Compare
|
Merged via squash.
|
…#113322) * fix(ui): preserve session identity across gateway snapshots Co-authored-by: openclaw-repo-broker[bot] <285669409+openclaw-repo-broker[bot]@users.noreply.github.com> * test(ui): cover session identity transitions Co-authored-by: openclaw-repo-broker[bot] <285669409+openclaw-repo-broker[bot]@users.noreply.github.com> * test(ui): model identity reconnect snapshot accurately * style(ui): format session identity test import * test(ui): isolate assistant identity snapshot coverage --------- Co-authored-by: openclaw-repo-broker[bot] <285669409+openclaw-repo-broker[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
Related: #98742
What Problem This Solves
Fixes an issue where users creating a new Control UI session from a split view could see the assistant identity revert to the generic "Assistant" label after ordinary Gateway snapshots, even after a session-specific identity had loaded.
Why This Change Was Made
The Control UI now preserves the identity loaded for the active session across ordinary Gateway snapshots. It resets to the configured fallback only when the logical connection changes, while the existing startup path reloads the active session identity.
This is a separate Control UI state-preservation path from the gateway session-title fallback addressed by #98841.
The maintainer takeover rebased the contributor commits onto current main, corrected the logical-connection regression fixture to use an actual reconnecting snapshot, and moved the new pane coverage into a dedicated isolated test module so the change does not extend or suppress the grandfathered oversized chat-pane test file.
User Impact
Creating or switching to a session from split view no longer loses the session-specific assistant identity during normal Gateway updates.
Evidence
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-isolated.config.ts --configLoader runner— 8 files and 88 tests passed.node scripts/run-vitest.mjs ui/src/pages/chat/chat-state.test.ts— 45 tests passed.node scripts/check-changed.mjs -- test/vitest/vitest.ui.config.ts ui/src/pages/chat/chat-pane-identity.test.ts ui/src/pages/chat/chat-pane.ts ui/src/pages/chat/chat-state.test.ts— passed on Blacksmith Testbox run https://github.com/openclaw/openclaw/actions/runs/30116354182, including max-lines, formatting, i18n, three typecheck lanes, repository lint, and script guards..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean on the final rebased head.git diff --check— clean.ClawSweeper proof note
The requested transition coverage is now complete and the contributor reported a manual split-view reproduction. A screenshot or static recording is not attached because it cannot independently prove that an ordinary internal Gateway snapshot occurred; the focused state-transition tests deterministically exercise that exact event plus both reset/reload boundaries. The final head was refreshed against current main and passed the full hosted changed gate.