Repository navigation
refactor(ui): simplify display refresh bookkeeping - #168656
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: needs maintainer review before merge. What this changesThis PR removes Control UI refresh generations, request queues, and chronology tracking while retaining scoped caches and mutation-settlement checks. Example: Two model-catalog reads for agent main finish in reverse order.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep this PR open: it is useful maintainer-owned simplification with explicitly accepted display tradeoffs, preserved write-settlement repairs, and successful current-head CI; no new actionable defect was identified. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl UI stores and page controllers consume Gateway RPC replies and events, cache scoped presentation data, and update controls while the Gateway remains authoritative for authorization and writes. flowchart LR
A[Gateway state] --> B[RPC replies and events]
B --> C[Scoped UI caches]
C --> D[Page controllers]
D --> E[Rendered controls]
E --> F[Gateway mutations]
F --> A
Technical reviewBest possible solution: Land the simpler display lifecycle while preserving the existing privacy, authorization, draft, and write-settlement boundaries. Do we have a high-confidence way to reproduce the issue? This refactor does not claim a new product bug; the earlier draft-loss and mutation-lock findings have source repairs and focused regression coverage. Is this the best way to solve the issue? The smaller lifecycle is a reasonable compromise under the recorded owner decision, keeping effect and settlement checks where user data or authorization matters. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5cdfc2f08e35. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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 HistoryReview history (6 earlier review cycles)
Reviewed October 10, 2026, 9:22 PM ET / October 11, 2026, 01:22 UTC (Revision 7). |
|
Repaired the draft-loss finding with one check before replacing draft text, while retaining the successful save as the new baseline/hash. The regression reproduces the reported main → other → main path and fails on the preceding source; it also verifies that reverting to the original text remains saveable with the new hash. All 18 Personal Instructions tests pass after the repair. No selection generation was restored. The first CI attempt also exposed a reconnect regression in the discovery parent and two obsolete request-count assertions. Reconnect now preserves the mounted wizard while selection is temporarily unresolved, leaving authentication/prepare recovery with its existing owner. All 25 focused bundled browser tests pass, including the four reconnect cases and the two repaired count cases; visible-result, access-loss, hidden-page, and request-payload assertions remain. Focused lint, UI production typecheck, formatting, and diff checks pass. The required suppression test still reports the two inherited SQLite allowlist entries already fixed on main by Fresh review also found a Workshop archive from the previous agent releasing a newer restore's pending lock. The regression reproduced the premature unlock; existing scope checks now protect follow-up loading, error publication and lock release. All eight Workshop tests pass. A sibling audit found the equivalent Skill Library reconnect case; its regression failed before retaining the existing connection-scoped settlement check, and all 17 library/Skills tests now pass. The published head is The preceding head's CI run 38090624794 has one root failure: the mock-export ratchet flags The final production reduction is 992 lines across 39 files after retaining the write-settlement checks. This uses the campaign's 500–999 single-PR exception after the full-scope pass. The PR body now includes the ledger's coverage summary, complete best-effort tradeoffs and inspected before/after images. |
Keep connected and attached checks at the effect. Accept duplicate current-set synchronization or first-item focus after unusual same-turn detach and reattach; ordinary menus are replaced on reopen.
Remove synthetic-only generation, chronology and handoff machinery from catalog, progress, sidebar, activity and settings display paths. Keep current effect checks, authorization, bounded caches, user-data durability and ordinary operation settlement. Concurrent configuration changes and overlapping display reads are best effort until refresh.
Keep feature, account-isolation and action assertions while removing obsolete queued-read chronology. Preserve the original default transport call shape. Resolve lint findings without adding suppressions.
|
Refreshed rendering proof after the named-gate rebase onto These are synthetic 1280×900 New Session and Live Activity captures. Each before/after pair is byte-identical, and each frame also matches its repeat capture. The comparison overlays only this PR's production source changes on the same current-main UI and mock Gateway data. New Session SHA-256: |
fa309a9 to
a92e866
Compare
Main CI 38106494410 exposed six stale expectations after #168656 removed queued replacement catalog reads. Preserve every visible fresh-model assertion and require the single shared pending request. Proof: all 16 owner browser tests pass (46.895s wall), six focused cases pass (20.387s), UI test types and scoped lint pass, and independent review is clean. Broad changed checks reached only inherited unused-export failures; those are being repaired separately.
Keep the internal async approval handler factory and Claude display-prefix helper private. Remove the redundant async adapter re-export from the approval runtime and have its existing test import the canonical adapter module. The public Plugin SDK entrypoint, synchronous wrappers, and runtime behavior remain unchanged. Complete the full-tree findings by removing the unused catalog-fixture re-export, deleting the uncalled Skill Workshop reconnect test helper, and keeping the codemod diagnostic annotation private. Workshop's last helper consumer was removed by 224c0bc (#168656). No assertions or runtime function bodies change. Correct the preceding UI cleanup's historical attribution: git log -S shows that the approval exports originated in 4128f11 (#168482), and were retained through 8fc31c9; they were not introduced by 8fc31c9. The unused Claude helper export came from 667b2e5 (#166080). Validation: 15 existing approval tests passed in 31.33s; 34 existing Claude import/display tests passed in 43.65s. Core production types passed in 45.92s, the owning infra test graph in 38.93s, and targeted type-aware lint passed for all six files. Formatting and diff checks passed. No tests were added and existing assertions are unchanged. Fresh independent review of all six files found no actionable P0-P2 issues. The exact pnpm deadcode:full gate passed both production and full-tree scans on the final six-file patch in 171.64s.
Restore request ownership to the admitted plugin detail snapshot so an inspection started before removal cannot publish a false not-found error. Progressive results from the current inspection still share one owner. Regression introduced by 224c0bc (#168656): the existing before-inspection lifecycle case passes on 762930c and fails on 224c0bc and 667b2e5. Validation: all 7 plugin lifecycle E2E cases, 12 routing tests, and 15 plugin page tests pass; focused lint, formatting, and independent review are clean. Inspected synthetic before/after screenshots retain the pending uninstall controls without the stale error. No test assertions or Solid primitives changed.
Remove speculative display request generations, catalog scheduling and custody, and UI chronology maps. Keep security and account boundaries, command FIFO, write settlement, bounded caches, and the documented Gateway startup retry. Accept recoverable display staleness until refresh as detailed in the PR. Preserve newer drafts and scope mutation settlement to the current owner. Validation: exact-head CI run 38100193413 passed; 805 focused UI tests, UI and test-graph typechecks, lint, suppression checks, and both cycle checks passed. Refreshed synthetic New Session and Live Activity before/after captures are byte-identical. Net production reduction: 992 lines across 39 files. Local source-mode startup deadline failures are retained in the PR evidence; the full selected suite passed in hosted CI.
Main CI 38106494410 exposed six stale expectations after openclaw#168656 removed queued replacement catalog reads. Preserve every visible fresh-model assertion and require the single shared pending request. Proof: all 16 owner browser tests pass (46.895s wall), six focused cases pass (20.387s), UI test types and scoped lint pass, and independent review is clean. Broad changed checks reached only inherited unused-export failures; those are being repaired separately.
Keep the internal async approval handler factory and Claude display-prefix helper private. Remove the redundant async adapter re-export from the approval runtime and have its existing test import the canonical adapter module. The public Plugin SDK entrypoint, synchronous wrappers, and runtime behavior remain unchanged. Complete the full-tree findings by removing the unused catalog-fixture re-export, deleting the uncalled Skill Workshop reconnect test helper, and keeping the codemod diagnostic annotation private. Workshop's last helper consumer was removed by 5bc8e47 (openclaw#168656). No assertions or runtime function bodies change. Correct the preceding UI cleanup's historical attribution: git log -S shows that the approval exports originated in 36a5eef (openclaw#168482), and were retained through 6f9dc11; they were not introduced by 6f9dc11. The unused Claude helper export came from d075300 (openclaw#166080). Validation: 15 existing approval tests passed in 31.33s; 34 existing Claude import/display tests passed in 43.65s. Core production types passed in 45.92s, the owning infra test graph in 38.93s, and targeted type-aware lint passed for all six files. Formatting and diff checks passed. No tests were added and existing assertions are unchanged. Fresh independent review of all six files found no actionable P0-P2 issues. The exact pnpm deadcode:full gate passed both production and full-tree scans on the final six-file patch in 171.64s.
Restore request ownership to the admitted plugin detail snapshot so an inspection started before removal cannot publish a false not-found error. Progressive results from the current inspection still share one owner. Regression introduced by 5bc8e47 (openclaw#168656): the existing before-inspection lifecycle case passes on 406b192 and fails on 5bc8e47 and d075300. Validation: all 7 plugin lifecycle E2E cases, 12 routing tests, and 15 plugin page tests pass; focused lint, formatting, and independent review are clean. Inspected synthetic before/after screenshots retain the pending uninstall controls without the stale error. No test assertions or Solid primitives changed.




What Problem This Solves
The Control UI carries request generations, chronology maps, and handoff protocols for display races that do not warrant their permanent complexity.
User Impact
Normal UI features and rendering stay intact. Authorization, private account/profile boundaries, command FIFO, ordinary write settlement, bounded caches, and config/draft durability remain. Rare overlapping display refreshes are explicitly best effort and may show an older result until refresh.
Why This Change Was Made
Reevaluates the UI lane under the maintainer's sharpened provenance rule: synthetic/harness reproductions and agent/maintainer PR narratives do not establish a real incident. Eleven of the original fifteen KEEP groups are flipped or narrowed to existing effect checks. The remaining four groups are terminal execution/settlement, sandbox grants, transcript authorization, and config-write durability—not display chronology.
Removes 992 net production lines across model catalogs, progress cards, sidebar catalog loading, page controllers, and Current Work. Tests solely specifying removed race machinery are deleted alongside it. This is not a generated-file or test-count reduction disguised as production simplification. Final write-settlement repairs bring the result just below 1,000; this uses the campaign's 500–999 single-PR exception after the full-scope implementation pass.
Production delta against the branch merge base: 992 net lines removed across 39 production files (+340/-1,332). Tests, fixtures and test-support are excluded.
Coverage log
This is the public summary of
.local/p11-ledger.md. Every original KEEP group was re-evaluated under the sharpened human-incident bar; 11 of 15 were flipped or narrowed.Further scope discoveries removed Current Work retirement clocks, sidebar chronology, live New Session group revalidation, Workshop automatic conflict replay, and Search health generations. Workshop mutations still check their existing scope before refresh, error publication and pending-action release; this is write settlement, not restored display chronology. Provenance and accepted outcomes for every removed mechanism follow below.
Best-effort tradeoffs accepted
The small startup-only retry remains because Peter recorded an actual production Gateway startup incident in #164532. Measured caches, memory bounds, security effects, user-data durability and shutdown settlement are not traded away.
Evidence
Current head:
a92e866a968454277a8e9118cfc98684e2818dec. Exact-head CI run 38100193413 passed; the head's check-run inventory showed 54 successful checks, 40 intentionally skipped, and no failed or cancelled checks. One conflict-free rebase onto76a282c7a1c6was needed for the namedcheck-prod-typesfailure: main had already removed its unused binding in243b6dbf63d. The production patch is unchanged (identical stable patch ID). The new exact-head ClawSweeper review is ready with zero findings (2026-10-11T01:08:35.215Z). Local corrective reviews remain scoped-clean through P2.Rebased proof passes 781 unit tests and 24 browser tests across all 34 modified test files, all six UI test-type graphs, UI production types, focused lint, both cycle checks (zero cycles), and all three suppression checks. A local run of the exact CI-selected 190-file E2E set retained four source-mode initial-route-readiness failures before their actions ran: the first offline sidebar-delete case, first coarse-pointer sidebar-menu case, child-load-error case and agent-switch-roster case. Diagnostics show a connected Gateway, loaded agents, no page errors and a pending chat route. These remain recorded local failures, not a claimed fix or passing replay. The completed exact-head hosted E2E checks cover the same selected suite successfully under its normal CI environment; the redundant local run was stopped after hosted completion. No timeout was raised and no test was skipped. Earlier broad results below are not relabeled as a green full local run on this head.
Fresh current-main rendering proof is in this comment and embedded below. The frozen install was reconciled after the rebase brought Calendar's already-declared Solid compiler dependency; it changed no tracked files.
Focused owner/caller suites passed after repairing actual findings: model catalog, progress cards, agents, sidebar/catalogs, Current Work, browser ownership, chat snapshots/metadata, New Session, plugins, Logbook, Portals, personal instructions, skills, systems, usage and Search. The final Search browser run passed 24 tests; the final portal action run passed 23. UI typecheck passed. Runtime and static/madge cycle checks both reported zero. No new lint suppressions, timeout increases, retries-to-green, skips, protocol/schema/config-key changes or changelog changes.
Independent review identified actual late-result draft/action-state bugs; these were repaired with existing scope/operation checks and focused regressions. Rejected demands to restore live group-default revalidation and Workshop automatic conflict replay are the explicit best-effort tradeoffs above, not omitted findings.
First exact-head CI (
3d713fc, run 38087909454) failed UI E2E shard 5/8 and cancelled sibling jobs. All six failures are attributed to this branch: four reconnect cases exposed the parent discarding the mounted setup wizard during a transient null selection, and two request-count expectations still described removed catalog retry/progress-generation behavior. The parent now leaves reconnect/auth recovery with the mounted wizard; the two count assertions reflect the accepted simplification while preserving visibility, recovered content and request-payload assertions. Focused bundled browser proof passed all 25 tests in 239.56 seconds. Cancelled jobs are not claimed as passing.ClawSweeper also identified a newer Personal Instructions draft being overwritten after switching away from and back to the saving agent. A regression first failed with
First editreplacingSecond edit; a draft-value publication check preserves newer text without a selection generation. Follow-up review caught that the successful save must still update the saved baseline/hash. The extended regression verifies that reverting to the original text remains saveable with the new hash; it failed before that correction. All 18 Personal Instructions tests passed in 13.30 seconds (21.78 seconds including wrapper startup). These are measured local times, not hosted CI times. Focused lint, formatting and UI production typecheck passed for the repair.Fresh review of
3e08204identified old Workshop mutation settlement clearing a newer agent's pending restore. The new regression failed on that source; existing scope checks now protect follow-up loading, errors and lock release. All eight Workshop tests passed in 10.51 seconds (19.14 seconds including wrapper startup).A sibling write-helper audit found the equivalent Skill Library reconnect case. Its regression failed because an old save cleared the new save's busy flag. Retained the existing connection capture around error publication and lock release, while keeping the read-sequence removal. All 17 library/Skills tests passed in 14.53 seconds (21.21 seconds including wrapper startup).
CI run 38090624794 on
3e08204has one root failure:checks-fast-baseline-ratchetsrejects the closed mock atsrc/model-picker/apply-session-model-selection-placement.test.ts:56. The file, checker and mock baseline were unchanged between CI's main base8d1c7bcbce4, its tested mergefb3409eabaf4, and the main checkpoint0e6b2c23c8d. Running the same mock-export check in an isolated checkout of0e6b2c23c8dreproduced the exact error. Main now contains the independent fix00e095399b20; this branch did not modify that file. The aggregate CI gate failed because of it; all 33 cancelled CI jobs had no separate failed step. Cancelled coverage is not claimed as passing. No CI rerun, empty push or rebase-for-green was requested.The prior
fa309a9run 38093342524 had two independent inherited roots:check-prod-typesrejected the unusedenvinsrc/plugins/channel-presence-policy.ts, fixed on main by243b6dbf63d;checks-node-compact-small-1failed threeplugin-sdk-surface-report.test.tscases because the SDK export counts exceeded budgets. The SDK checker and its two platform-applicable tests reproduced on isolated main, outside this PR's UI graph. The downstreamopenclaw/ci-gatefailure and 25 cancellations were not additional product failures. The successful current-head run supersedes that incomplete CI coverage; no failed attempt was rerun.Testbox verified source
77ec7a863de3cdf903200dc5397a4626b729b792and ran the full UI suite: 22,390 passed, 44 failed, 6 existing skips across 1,640 files. Every affected failure was then classified and repaired or removed only where it asserted the retired scheduling contract; the focused rerun passed 298 tests across all 15 affected files. The final follow-up preserves the default two-argument transport dispatch. This is focused repair proof, not a claim that the full suite was rerun green.The Testbox changed check passed conflict/line-cap/max-lines/assertion/mock-export/timeout ratchets, dependency guards and formatting, then stopped at an inherited graph-budget failure: 722 UI E2E roots versus the 720 limit. This branch adds no E2E roots; the budget/configuration and E2E inputs are unchanged from its base. UI production types, focused lint and translation verification passed separately. The local dead-export scans timed out at 600 seconds with no verdict; hosted CI must cover that gap.
The suppression allowlist test also fails on this branch's unchanged baseline entries from #168002; main already repairs those exact entries in
dab6a8de087. No baseline was changed here. No local replay is represented as hosted exact-head CI.New Session draft and Live Activity before/after captures are inspected synthetic fixtures, byte-identical across the change and on repeat capture.
New Session — before / after
Live Activity — before / after