Repository navigation
fix(ui): surface session sharing errors without leaking across chats - #118135
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 3:07 PM ET / 19:07 UTC. ClawSweeper reviewWhat this changesThe branch makes rejected session-sharing changes visible after the sharing dropdown closes while preserving per-session errors and preventing a failure from chat A from appearing after navigation to chat B. Merge readinessKeep this PR open for explicit maintainer handling. The patch appears correct: it records each sharing failure with its owning session, exposes the failure through the active chat header only when that session is still selected, and makes the inline error visible for visibility-only gateways; the Priority: P2 Review scores
Verification
How this fits togetherControl UI session sharing sends visibility or membership mutations to the connected Gateway for the selected chat. The chat pane owns both the session-local sharing menu state and the global header alert, so asynchronous failures must be retained for the originating session but published globally only for the still-active chat. flowchart LR
A[Selected chat session] --> B[Sharing menu]
B --> C[Gateway sharing mutation]
C --> D{Mutation result}
D -->|Failure| E[Session-local sharing error]
E --> F{Originating chat still active?}
F -->|Yes| G[Chat header alert]
F -->|No| H[Error retained only for that session]
Decision needed
Why: The patch has no supported correctness finding, but the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +123. Total +129 across 7 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh this focused UI repair onto current Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with high confidence: current behavior retains a rejected sharing mutation only in the session menu, while the PR’s focused browser test drives a closed-dropdown rejection and asserts the missing visible outcome. The supplied context also reports an after-fix real Chromium/Gateway run, though this read-only review did not rerun it. Is this the best way to solve the issue? Yes. Routing the error through the existing chat-header owner while retaining the session-local state is the narrowest coherent fix: it solves the silent failure without introducing a second global error path or allowing stale async work to affect another selected session. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1e10c444748a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer exact-head review completed at 22d16f7. Root cause: visibility-only session-sharing failures disappeared when Web Awesome auto-closed the menu, and unconditional global publication could leak a stale chat-A error into active chat B. One canonical session owner now retains the originating error, publishes the existing header alert only while that session remains selected, and renders the inline error after reopening; production delta +6. Hosted Blacksmith owner suites: 73/73. Actual Playwright Chromium + Vite + websocket Gateway: visible role=alert after menu auto-close AND originating inline error after reopen, 1/1 passed. Exact-head CI https://github.com/openclaw/openclaw/actions/runs/30762505759 including all four hosted Chromium shards; Workflow Sanity https://github.com/openclaw/openclaw/actions/runs/30762456009 ; Real behavior proof https://github.com/openclaw/openclaw/actions/runs/30762724949 all green. Sol/high full review clean .96. I read complete latest ClawSweeper review: no substantive rank-up exists and formerly pending checks are green. Its automated persistent-cache/schema/vector note is a false positive: this patch changes only process-local UI Map state and browser tests; no SQLite, persistence, schema, migrations, embeddings, config, auth or protocol surfaces change. |
|
Merged via squash.
|
Summary
Root cause and owner boundary
The visibility-only sharing component discarded its error state, and successful connection-scope checks did not establish that the affected session was still the currently selected chat. Sharing failures now flow through one canonical owner that always caches the originating session's error but publishes the global chat header error only when that session remains active. The existing current-connection/current-row guards are preserved. Production delta: +6 lines across the owning chat header/sharing surfaces; no config, protocol, persistence, authorization, or security changes.
Test plan / real behavior evidence
node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-session-sharing.test.ts ui/src/pages/chat/chat-pane-sharing.test.ts ui/src/pages/chat/chat-pane.test.ts— 3 suites, 73/73 passing, including both visibility and member failures after switching from chat A to chat B on the same live connection.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-ownership.e2e.test.ts -t 'keeps rejected visibility-only sharing changes visible after the menu closes'— 1/1 passing. The browser selects visibility, waits for Web Awesome to close the menu, rejects the actual deferred sharing request, asserts the global[role=alert]is visible, reopens the menu, and asserts the originating session's inline sharing error is visible.gpt-5.6-sol, high-reasoning, P1-threshold structured review: clean, confidence 0.96.git diff --check: clean.No public-channel message or live credentials are used or required.