Repository navigation
fix(ui): settings reload can overflow the browser stack - #147970
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. Reviewed September 14, 2026, 7:51 AM ET / 11:51 UTC (Revision 11). ClawSweeper reviewWhat this changesThe PR prevents recursive settings loads by registering pending requests before notifying subscribers and gives Markdown timing tests separate scheduling across test runners. Merge readiness✅ Ready for maintainer review The fix remains necessary: fetched main and the latest release retain the recursive-load mechanism. The reviewed patch has no actionable correctness findings, and the related merged repairs do not supersede it. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI configuration owner loads Gateway settings and notifies settings editors when their state changes. It also coordinates refreshes with pending writes so editors receive current configuration without losing draft intent. flowchart TD
A[Settings editor or reconnect] --> B[Configuration load owner]
B --> C{Request already pending?}
C -->|Yes| D[Share pending result]
C -->|No| E[Register Gateway request]
E --> F[Notify settings subscribers]
F --> B
E --> G[Apply current result and retire request]
D --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -5, Tests +306, Other +10. Total +311 across 18 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep pending-load registration and notification cleanup in the existing operation owner while preserving connection guards, explicit retries, draft draining, and unchanged timing budgets. Do we have a high-confidence way to reproduce the issue? Yes, from source: an offline or background load publishes before registration, allowing a settings subscriber to recursively request the still-missing snapshot. This review did not execute the application. Is this the best way to solve the issue? Yes. Consolidating registration into the existing operation owner repairs the ordering invariant across callers without adding another guard or competing tracker. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9a5af1b95370. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
1b89b5f to
a6e6a48
Compare
|
@clawsweeper re-review The final revision consolidates request tracking into the existing operation owner and removes the superseded tracking adapter. All 308 related tests pass, and the final served bundle passes the live settings reload replay with zero browser exceptions. The body contains the refreshed inspected screenshots and explicitly retains the outstanding performance-gate failure. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Exact-head CI for a6e6a48 is blocked: run 34812945772. The startup-performance job measured 362,121 B against the 361,938 B hard limit on the CI merge tree. The local fixed-identity candidate measured 361,955 B. No baseline or limit was changed. Related startup work remains in #147954, which has an assigned maintainer and an unresolved immediate-loading-frame review finding. UI shard 2 passed 6,922 tests and failed the same two unchanged-main markdown timing cases seen on the previous head (136.67 ms and 124.81 ms against 100 ms). The settings-specific 308-test batch and final live browser replay remain green. The separate oversized sidebar-helper failure is also being repaired independently. |
a6e6a48 to
bdf7290
Compare
|
@clawsweeper re-review CI repairs are pushed at bdf7290. The hosted startup-performance gate now passes. The existing lazy-catalog/sidebar prerequisite comes from #147973; unchanged markdown timing assertions now run after other UI work in every runner route, with observed three-worker package and root ordering proof. Fresh independent whole-PR review found no actionable issues. Settings308 and project/sidebar444 tests pass, and the served combined UI passes preference persistence and repeated reloads without browser exceptions. Inspected screenshots render in the body. Remaining hosted CI is running. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Final CI follow-up is 7cbba90. Startup performance and UI2/3 passed on the previous run. The hosted compact planner now actually assigns the timing suite once through its existing serial support owner; its new regression fails on all three backend plans before repair. The main-branch transcript test-size failure is fixed by extracting four unchanged MCP lifecycle cases with their original isolated runner. Final proof: 76 planner tests, 40 transcript tests, 20 package-runner tests, affected type graphs, focused lint, and fresh independent whole-PR review all pass. Full earlier core/UI/scripts/root type checks, i18n, and dead-export scans pass. UI production code and inspected live screenshot evidence remain unchanged by this follow-up. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
0f5a04f to
be9b713
Compare
|
@clawsweeper re-review Current head is be9b713, rebased onto 4ddb9ed after a real merge conflict. The conflict resolution retains the remaining lazy project labels alongside the three labels now on main, plus main's numbered transcript fixture helper alongside the already-reviewed lifecycle extraction. Runtime load fixes are patch-identical. Previous CI passed every job except one resize-anchor E2E case and the aggregate gate. The reviewed test-only follow-up selects an initial row starting inside the viewport; widths, exact-key visibility, and 120 px drift limit are unchanged. Both tests pass locally, and restoring the historical measurement reset fails with 217 px drift and missing anchors. Exact CI geometry was not reproduced locally. Fresh CI: https://github.com/openclaw/openclaw/actions/runs/34819489130. Conflict-focused proof and current bundle checks are running; required checks remain a landing gate. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Rebased live proof on be9b713: served JavaScript matches the candidate SHA256; Dark mode,110% text size and Tide persist after reload. Restored System/100%/Claw and repeated three rapid reloads with zero browser page errors. This inspected, synthetic-only after capture is also visibly attached in the originating chat. The original before capture remains in the PR body. |
be9b713 to
075f2b3
Compare
|
@clawsweeper re-review Current head is 075f2b3 on main 43d413b. The exact earlier CI was green, but new mainline changes caused a real merge conflict before dispatch. The consolidated diff now contains only the runtime configuration owner and timing-runner ownership; main owns the catalog, native-wheel resize setup, and transcript test organization. No duplicate fixes or budget-policy changes remain. Fresh whole-diff P2 review is clean across all three passes. Proof: 1,306 focused tests, both upstream resize E2E cases with zero drift at all three widths, focused lint, and startup at 357,427 B across seven requests pass. Live candidate SHA256 matches the served bundle; Dark/110% and Tide persist after reload, defaults are restored, and three rapid reloads produce zero page exceptions. New exact-head CI: https://github.com/openclaw/openclaw/actions/runs/34824943740. Required CI remains a landing gate. The inspected synthetic-only current after capture is visibly attached in the originating chat. Original before capture stays in the PR body. |
|
🦞👀 Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Reuse the existing lazy project catalog and sidebar fixture simplification from #147973. Preserve full-render timing limits while scheduling their owner after other UI projects across runner routes.
Preserve exact hosted test inventory and isolated MCP lifecycle coverage. Keep renderer timing assertions and lint limits unchanged.
075f2b3 to
a25a14e
Compare
|
Merged via squash.
|
) * fix(ui): settings reload can overflow the browser stack * refactor(ui): unify pending configuration load tracking * refactor(ui): track config loads in the operation owner * refactor(ui): let config drain own pending draft flushing * fix(ui): restore CI budgets and isolate render timing checks Reuse the existing lazy project catalog and sidebar fixture simplification from openclaw#147973. Preserve full-render timing limits while scheduling their owner after other UI projects across runner routes. * fix(ci): complete timing ownership and split transcript lifecycle tests Preserve exact hosted test inventory and isolated MCP lifecycle coverage. Keep renderer timing assertions and lint limits unchanged.


The shared mainline fixture-assertion blocker is resolved upstream in #148129. This branch is rebased onto main containing that fix; the reviewed 18-file settings and timing patch is unchanged. Exact-head CI now passes on the refreshed head after one diagnosed, bounded failed-job rerun.
What Problem This Solves
Reloading Control UI settings could overflow the browser stack. A settings subscriber requested missing configuration during a synchronous notification before the loader had registered its pending request.
User Impact
Settings loads, refreshes, reconnects, and discards now share the existing request owner. Preferences persist and repeated reloads complete without browser exceptions. Explicit retries and pending-write coordination are preserved.
Why This Change Was Made
Register each load before publishing and remove it by identity after final notification. Remove the separate tracking adapter so every refresh path follows the same lifecycle. Pending-write draining owns the scheduled draft flush.
The CI repair gives wall-clock Markdown tests one serial execution owner across package, root, selected-target, and hosted compact runners. Their existing assertions and time budgets are retained. Main now supplies the startup catalog, resize setup, and transcript test-size repairs from #147973 and #148010; this PR uses those upstream fixes and contains no competing versions or budget-policy changes.
Evidence
The refreshed-head CI hit one unchanged backend timeout in
server.config-patch.test.ts: its first owner-reload case exceeded a 20-secondconfig.patchrequest deadline on a two-CPU runner. The full original-order file passes locally on matching Node 24.19.0 (79/79 tests; first case 16.758 seconds total), with every assertion and timeout unchanged. The Gateway production and test files are identical to the trusted main base. A fresh-cache two-CPU phase probe also passed with the original deadlines: seed and cold-reference writes took 523 ms and 312 ms; secret preparation and model refresh each took under 25 ms. Independent source review found no concrete race or justified code repair. The original failure and replay logs are retained. One bounded failed-job rerun passed, and exact-head CI attempt 2 is green ona25a14e9b77722ad9ebff51c8db3c246887ecfb7. No source, assertions, or time limits were changed.Fresh whole-diff independent P2 review is clean across three passes.
The original configuration code failed meaningful reentrant-load regressions. The consolidated candidate passes 308 settings tests, 958 routing/planner tests, and all 40 upstream controller/message-reveal cases. Focused lint, including the original transcript size check, passes. Both upstream resize E2E cases pass with zero anchor drift at 1000, 820, and 1280 px. Canonical startup is 357,427 B across seven requests, within the repository budget.
The previous reviewed head passed hosted CI after one bounded retry of an unchanged CLI process test. Its original timeout did not reproduce in the full 18-case file on matching Node 24.19.0; no source, assertions, or time limits were changed for the retry. A subsequent real conflict with newly merged mainline fixes required the consolidation described above. Final-head hosted CI remains a landing gate.
Live isolated Chromium proof uses synthetic data and a real Gateway. The served JavaScript is byte-matched to the candidate build. Dark mode, 110% text size, and Tide preferences persist across reload; System/100%/Claw are restored afterward, and three rapid reloads produce zero browser page exceptions. Inspected before/after captures are visibly attached in the originating chat and embedded below.
Before
After