Repository navigation
fix(ui): keep pinned sidebar pages visible during reconnect - #129517
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
1ae00f4 to
1489543
Compare
|
Maintainer takeover-rebase onto current This fix (gateway-owned |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 6:44 PM ET / 22:44 UTC. ClawSweeper reviewWhat this changesThe PR retains sidebar session entries across replacement Gateway socket clients for one endpoint/credential set, while clearing them when that logical Gateway connection changes. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for protected-label maintainer review. Current main still clears sidebar state when a reconnect rotates the socket client; this branch adds a logical-connection boundary that preserves it until the next canonical list arrives. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Control UI Gateway store owns endpoint, credential, and socket-client lifecycle. Its session-data controller consumes that state to decide when sidebar session snapshots remain visible or are replaced by canonical Gateway results. flowchart LR
A[Gateway endpoint and credentials] --> B[Gateway connection store]
B --> C[Logical connection revision]
B --> D[Replaceable socket client]
C --> E[Sidebar session-data controller]
D --> E
E --> F[Canonical session list]
F --> G[Visible pinned sidebar entries]
Decision needed
Why: The maintainer label requires human handling, and the change intentionally alters when session state is allowed to remain visible during reconnect. Before merge
Agent review detailsSecurityNone. PR surfaceSource +66, Tests +34. Total +100 across 16 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one Gateway-owned logical-connection revision, retain sidebar state only across replacement clients for that revision, and clear it before a different endpoint or credential set can render old rows. Do we have a high-confidence way to reproduce the issue? Yes: current main’s same-client check becomes false when a reconnect replaces the socket, allowing the null session snapshot to publish; the branch’s focused browser and boundary tests exercise that transition. Is this the best way to solve the issue? Yes: recording the connection identity at the Gateway owner and consuming it in the sidebar is narrower and safer than teaching the sidebar to infer connection identity from socket objects. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b6a2366f6431. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready. Exact head My verification on the rebased head: gateway-store, sidebar-management e2e, and app-sidebar suites green locally (the single local failure — transient-menus attention-panel — reproduces identically on clean Complementary to #129150 (landed) and #129558 (landed): three distinct mechanisms behind the team.openclaw.ai sidebar flicker, no shared production files. ClawSweeper's review worker stalled twice at the placeholder (leases expired unpublished); no findings or rank-up moves exist, and a late re-review refreshes the rating post-merge. |
|
Merged via squash.
|
Co-authored-by: roboclaw-bot <[email protected]>
What Problem This Solves
Fixes an issue where users with pinned sidebar pages would see every pinned page disappear and then reappear when the Control UI replaced its Gateway client during an offline retry or reconnect.
Why This Change Was Made
The Gateway now exposes an opaque connection revision that advances only when its endpoint or credentials change. The sidebar session-data owner retains its paired session snapshot across replaceable socket clients for the same logical Gateway, waits for the next canonical list revision, and still clears immediately for a different Gateway connection or session capability. This PR is AI-assisted.
User Impact
Pinned pages and the rest of the sidebar session list remain visible while a reconnect is in progress. Once the fresh authoritative session list arrives, real changes such as an unpin are applied normally.
Evidence
pnpm test ui/src/components/app-sidebar.test.tsfailed because client replacement changed the cached result tonulland removed the pinned DOM entry.pnpm test ui/src/app/gateway-store.test.ts ui/src/components/app-sidebar.test.ts— 350 tests passed.node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-management.sidebar.e2e.test.ts -t 'transport and client replacement reconnects'— exact browser reconnect regression passed.pnpm check:changed— formatting, guards, dead-export scans, UI/core-test typechecks, and lint passed..agents/skills/autoreview/scripts/autoreview --mode uncommitted— clean; no accepted/actionable findings.