Repository navigation
fix(ui): retain automation inventory across reconnects - #184483
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR retains the automation inventory across physical session-row changes while resetting disclosure and reveal presentation separately. Example: Reconnect restores the physical row for agent:main:arrival while its replacement-client automation request is pending.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: the reconnect fix is useful, but CI exposes an introduced reveal-count reset that needs a focused repair. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherChat Details supplies session and Gateway facts to the automation inventory, which loads scoped cron pages and renders automation links. flowchart LR
A[Gateway connection facts] --> C[Automation inventory]
B[Logical session identity] --> C
C --> D[Scoped cron list request]
D --> E[Automation rows]
F[Physical session identity] --> G[Disclosure and reveal state]
G --> E
Technical reviewBest possible solution: Keep the inventory mounted and equality-filter presentationIdentity through a memo before using it to reset the reveal count. Do we have a high-confidence way to reproduce the issue? Source shows physical-row restoration remounting the inventory, and the body records a failing baseline regression; this review ran no target code. Is this the best way to solve the issue? Separating inventory lifetime from presentation lifetime uses the existing owners appropriately, but the new reset dependency needs equality filtering. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2e836131ee20. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +11, Tests +238. Total +249 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 6:50 AM ET / 10:50 UTC. |
|
Merged via squash.
|
* fix(ui): retain automation inventory across reconnect row restoration * fix(ui): retain revealed automations across unrelated updates
What Problem This Solves
Reconnect can briefly clear a chat's physical session row and restore the same row after history arrives. The desktop Automations section keyed its entire subtree to that physical ID, destroying an inventory that had already admitted the replacement connection's request. Restoring the row could issue a second identical
cron.listrequest before the first completed. This is a focused follow-up to #184386.Keep the existing automation inventory mounted across physical-row changes. Its existing owner still retires requests on Gateway, connection, logical session/agent, and read-access changes. A separate presentation identity preserves disclosure and “Show more” resets, including controlled disclosure preferences. Pending reveal/retry focus work checks the latest identity before reading props held by an asynchronous frame, so an old click cannot change the replacement presentation. This adds no cache, effect, dependency, or request owner; the mobile and CI automation owners are unchanged.
Evidence
accepts one replacement-client page while its physical session row is restoredfails: two replacement-client requests, expected onechat-summary-automations.test.tsxandchat-details-arrival.test.tsx, including logical-session retirement, controlled/local disclosure, reveal-count resets, client replacement, and pending paginationpnpm tsgo:uiThe structural trial uses the existing
scripts/bench-control-ui-reconnect.tswith--pairs 1 --scenarios brief-drop --panes 1,10 --aa-control --thread-cpu-time --first-pair-screenshots, run separately with--rtt 0 --asset-latency-ms 0and--rtt 100 --asset-latency-ms 100. Base is the built candidate from #184386; head adds this automation fix. All cases retained the fully-live witnesses: reconciled history in every pane, current sidebar/presence, enabled composers, and the unsent draft. The inspected candidate captures retain 10 rendered automation rows with one pane and 100 with ten panes.Counts below cover only matching session-scoped compact
cron.listpages (limit: 50,offset: 0, name order) started during restoration-to-readiness. Bytes are their delivered response bytes in that interval, not all reconnect traffic.The localhost ten-pane control already avoids duplication: the defect depends on arrival order. The deterministic regression test establishes the broken boundary; these single-triplet trials show the duplicate disappears in the exercised production renderer. They do not establish a latency/CPU improvement, a global 50% traffic reduction, or performance across sleep/restart/update scenarios. Transport, HTTP delay, session history, and roster data are synthetic; there is no real Gateway/provider or bandwidth/loss simulation in this trial.
The final published patch is
2c050625ba2on main92415c1e5fe; the initial CI head wase446661e0d2. Its three reviewed source preimages are unchanged from the measured baseline; structural proof is retained at its original provenance. CI found that an absent optionalpresentationIdentityprop could track replacement of the whole props object, resetting 25 revealed jobs to 10 after onlyonNavigatechanged. The existing regression fails on that head and passes after an equality-preserving memo around the presentation identity. Both coupled files (40 tests), UI types, scoped format and lint pass on this correction.The same CI run timed out in
Control UI image lightbox > opens transcript and sidebar images in one accessible modaland failed row removal inControl UI cloud workers settings mocked Gateway E2E > config.set preserves Advanced edits after class removal and deletes project defaults. Both exact tests pass in scheduled main run40302156926and in a bounded replay against the frozen clean base92415c1e5fe. A replay against the frozen published head stopped during canonical worker-cache preparation at the 120-second no-output watchdog, before either test executed. These failures are not classified as inherited, and the memo correction is not claimed to fix them. Full PR CI 40312454935 passed on the corrected head after one targeted retry of the failed UI job. Its first attempt passed the reveal regression but failed collection ofapp-shell-view.test.tswith a duplicateopenclaw-agent-selectregistration, before any test body ran. All 18 shell tests pass independently on this exact head and its exact base; the same suite also passed the initial PR run. The shared-worker collection-isolation failure remains an unresolved test-harness flake; a passing retry is not claimed to fix it. All full-run UI E2E and real-Gateway shards pass. The PR evidence check also required the explicit problem/evidence headings now present in this body.Size and ownership
The static Solid census changes from 16 to 17 memos; 5 signals, and 5 existing
onSettledcalls across the two production files; zero effects, render effects, direct listeners/queries,onCleanup,flush, or owner APIs. One physical-identity keyed subtree is removed. The additional production lines preserve presentation resets and cancel stale presentation work while the logical inventory remains owned by its existing lifecycle.Before / after
Both captures use synthetic data and were inspected. The localhost one-pane before/after PNGs are byte-identical; the change removes redundant work without changing the settled appearance.
Before:
After: