Repository navigation
fix(ui): keep Home context current after dock reconnection - #139059
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 5, 2026, 8:40 AM ET / 12:40 UTC. ClawSweeper reviewWhat this changesRestores Home’s context updates after dock reconnection and consolidates subscription cleanup across Home and Ask OpenClaw. Merge readiness⛔ Blocked before merge - 2 items remain The defect remains on current main, and the prior unused-field finding is resolved. No new actionable correctness defects were found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI’s Home dock builds a working reference from the selected page, session roster, and agent workspace. That reference appears beside the conversation and accompanies the next message. flowchart LR
A[Dock connects or disconnects] --> B[Subscription lifecycle controller]
C[Session and agent updates] --> B
B --> D[Rebuild working reference]
D --> E[Home context display]
D --> F[Next chat message]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -39, Tests +18. Total -21 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep subscription ownership in the existing lifecycle controller while preserving the shared conversation store, visibility-triggered history refresh, and bounded working reference. Do we have a high-confidence way to reproduce the issue? Yes: detach and reattach the same Home dock with an unchanged context, then update the session title or agent workspace. Current-main source establishes the missing resubscription; execution results are contributor-reported, not independently rerun here. Is this the best way to solve the issue? The shared controller is the best-supported repair: it handles reconnect and source replacement across all three presentations, whereas another manual reconnect branch would retain duplicate lifecycle logic. Direct upstream Lit verification remains unavailable. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5300e70956c7. 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)
|
|
Final review and proof are complete for the final head. Exact-head CI run 33966375794 is successful. The three unread controller fields identified by review are replaced with the existing constructor-registration pattern. Pinned The latest ClawSweeper review confirms the type finding is resolved and identifies no new correctness defect. Its remaining items concern reviewer access to the Lit source and screenshots. We directly inspected the pinned This remains a latent lifecycle repair and subscription deduplication. The test directly detaches and reattaches the same Home element with the same context; an ordinary current UI action that triggers that exact sequence has not been established. Chromium uses a synthetic Gateway WebSocket, not a real Gateway transport. Pre-fix evidence observes stale display; stale-send impact is source-backed inference through the same cached reference. The fixed browser test separately verifies the renamed title in the next outgoing message. Production delta is −39 lines; tests +18. Shared conversation ownership, once-per-page-subscription idle refresh, visibility-triggered dock refresh, and alert deduplication remain intact. Full commands and before/after images are in the PR body. Ready for native prepare/merge validation. |
|
Merged via squash.
|
…139059) * fix(ui): refresh Home context after dock reconnection * fix(ui): register subscription controllers during construction
Closes #139054
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.
What Problem This Solves
Repairs a latent lifecycle bug: after the same Home panel is detached and reattached with the same context, subsequent roster updates can leave its displayed working reference stale. Direct component and bundled-browser tests reproduce this sequence. An ordinary current UI action that triggers the same-node reattachment has not been established.
Why This Change Was Made
Home removed its context subscriptions on disconnect and restored them only when the context object changed. Reconnecting to the same context therefore left its listeners inactive. Home and both Ask OpenClaw presentations now use the existing subscription lifecycle controller, removing three duplicate store-subscription loops and the separate context cleanup path.
The conversation store remains the shared owner across the page and dock. The page still refreshes idle history once per subscription, and the dock still refreshes it only when shown. This removes 39 production lines; the existing regression tests grow by 18 lines. No configuration, database, or protocol changes.
User Impact
Reattached Home panels keep their working reference current, and all three presentations share the established subscription lifecycle owner. This is a latent lifecycle repair and deduplication under the maintainer cleanup request, with existing Home and Ask OpenClaw behavior covered by regression tests.
Evidence
Both directly exercised lifecycle regressions failed before the production change and pass after it:
Before the fix, component and browser tests reproduced stale displayed context after explicit DOM detachment/reattachment. Stale-send impact is source-backed inference because the send path consumes the same cached reference; no pre-fix stale send was observed. After the fix, the browser test also verifies that the next message carries the updated title. This is bundled Chromium proof with a synthetic Gateway WebSocket, not real-Gateway transport proof or an observed ordinary-user regression.
All 125 focused component, Custodian lifecycle, history, onboarding, nudge, transcript-status, alert-store, and subscription-controller tests pass. The five alert-store cases cover once-per-presentation delivery, rearming recurring incidents, listener updates, retired authority, and visible alerts without unavailable chat sends. All five bundled Home/Ask OpenClaw E2E scenarios pass, including saved workspace/dashboard layouts, palette opening, and history restoration after reload. Fresh Codex autoreview found no actionable P0–P2 findings. The declared Oxfmt 0.65.0 formatting check passes.
Focused verification commands
The native checkout now has its own frozen dependencies. Its pinned UI typecheck reproduced the three unread controller fields reported by review; replacing them with the existing constructor-registration pattern makes
pnpm tsgo:uipass. All 125 focused unit tests and five bundled-browser scenarios also pass after that correction. The full changed gate and complete build pass in that checkout. Fresh P2 autoreview of the complete candidate and a separate direct read-only review of the final pushed head are clean. CI run 33966375794 passed on the exact final head.Validated final head:
9a1d2de908ccf22d88559c22826c032a521cabe0. The final ClawSweeper review explicitly resolves the constructor/type finding and reports no new actionable correctness findings. Its remaining reviewer-access questions are covered by direct maintainer inspection of the pinned Lit lifecycle source and the complete before/after captures. The existing uploaded after screenshot remains equivalent for the asserted renamed-context state.