Repository navigation
perf(ui): yield Advanced and plugin settings first visits - #189556
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 progressively mounts Advanced settings and plugin inventories while deferring unused detail and preview code. Example: Open Plugin Settings with 1,000 installed plugins.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain Keep this PR open: the measured rendering gains justify it, but the introduced import cycle and test failures need repair before merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI receives plugin inventories and configuration schemas from existing Gateway owners, then renders searchable settings, editors, and previews. flowchart TD
A[Gateway data owners] --> B[Settings route]
B --> C[Advanced configuration form]
B --> D[Plugin inventory]
C --> E[Cancellable progressive rendering]
D --> E
D --> F[Lazy details and previews]
Technical reviewBest possible solution: Retain the measured progressive rendering, move shared settings contracts into an existing leaf owner, and update affected tests for the intentional lazy boundaries. Do we have a high-confidence way to reproduce the issue? Current-main source mounts complete inventories synchronously, and the supplied paired browser measurements demonstrate the blocking work; this review executed no target code. Is this the best way to solve the issue? The shared cancellable append primitive preserves keyed edits and complete content without introducing another config owner, but the module split and affected consumer tests need the listed repairs. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 050238fdbdb0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +258, Tests +228, Other +48. Total +534 across 26 files. Added test files: 2. 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 31, 2026, 12:57 PM ET / 16:57 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…89556) * test(ui): measure progressive settings through full completion * perf(ui): yield settings first-visit rendering * perf(ui): defer plugin detail rendering until requested * refactor(ui): keep plugin inventory helper private * perf(ui): defer plugin preview locale registration * perf(ui): pair progressive Advanced sections per yield * perf(ui): reduce settings completion scheduling overhead * style(ui): keep the settings yield executor void * refactor(ui): make the lazy plugin renderer import explicit * perf(ui): reduce intermediate Advanced form layouts * perf(ui): reduce repeated plugin inventory continuations * fix(ui): align lazy settings checks and remove import cycle * test(ui): await lazy skill viewer before checking loading state
Await the settings view introduced as a lazy boundary in #189556 before the autosave fixture starts fake timers. Preserve every mutation-order and config assertion; allocate its single added test line. Proof: controlled real-import delay fails before and passes after; all 20 candidate tests pass under Bun. pnpm check:changed --staged --base HEAD passes, and Codex autoreview through P2 is scoped-clean.
…191157) * fix(ui): keep the Sessions heading visible in native phone layouts Remove the redundant phone-specific clipping rule introduced in #190367. Native hosts do not use floating page headers, so the rule hid their only visible Sessions title. Shared floating-header styles continue to hide duplicate web headings. The unchanged 390px native header regression fails on main and passes with the deletion. Twenty affected E2E tests and three Sessions browser tests pass; Codex review through P2 is clean. * test(ui): await the lazy capability subview before asserting rows The composer fixture awaited only the outer content module after #189053 introduced a nested lazy skill subview. Await that real module too, preserving every row, focus, and management-link assertion. Record the single added test line. Proof: all 16 composer-menu tests pass under Bun; controlled actual-import delay fails before and passes after. pnpm check:changed passes; Codex autoreview through P2 is scoped-clean. * test(ui): load plugin settings before starting autosave timers Await the settings view introduced as a lazy boundary in #189556 before the autosave fixture starts fake timers. Preserve every mutation-order and config assertion; allocate its single added test line. Proof: controlled real-import delay fails before and passes after; all 20 candidate tests pass under Bun. pnpm check:changed --staged --base HEAD passes, and Codex autoreview through P2 is scoped-clean. * test(ui): establish resting pointer state for theme assertions The inactive tab correctly uses the text color while hovered. Park the pointer on the existing content panel before checking each palette so the fixture consistently measures its asserted resting colors. Preserve every color assertion and timeout. Proof: controlled tab hover reproduces the exact CI light-theme mismatch; pointer parking passes that diagnostic and the clean WebKit file. pnpm check:changed passes; Codex autoreview through P2 is scoped-clean.
…penclaw#191157) * fix(ui): keep the Sessions heading visible in native phone layouts Remove the redundant phone-specific clipping rule introduced in openclaw#190367. Native hosts do not use floating page headers, so the rule hid their only visible Sessions title. Shared floating-header styles continue to hide duplicate web headings. The unchanged 390px native header regression fails on main and passes with the deletion. Twenty affected E2E tests and three Sessions browser tests pass; Codex review through P2 is clean. * test(ui): await the lazy capability subview before asserting rows The composer fixture awaited only the outer content module after openclaw#189053 introduced a nested lazy skill subview. Await that real module too, preserving every row, focus, and management-link assertion. Record the single added test line. Proof: all 16 composer-menu tests pass under Bun; controlled actual-import delay fails before and passes after. pnpm check:changed passes; Codex autoreview through P2 is scoped-clean. * test(ui): load plugin settings before starting autosave timers Await the settings view introduced as a lazy boundary in openclaw#189556 before the autosave fixture starts fake timers. Preserve every mutation-order and config assertion; allocate its single added test line. Proof: controlled real-import delay fails before and passes after; all 20 candidate tests pass under Bun. pnpm check:changed --staged --base HEAD passes, and Codex autoreview through P2 is scoped-clean. * test(ui): establish resting pointer state for theme assertions The inactive tab correctly uses the text color while hovered. Park the pointer on the existing content panel before checking each palette so the fixture consistently measures its asserted resting colors. Preserve every color assertion and timeout. Proof: controlled tab hover reproduces the exact CI light-theme mismatch; pointer parking passes that diagnostic and the clean WebKit file. pnpm check:changed passes; Codex autoreview through P2 is scoped-clean.
Plugin Settings and Advanced can block the main thread while mounting their complete inventories and schema forms. This change renders the visible content first and appends the remaining rows in yielded tasks. Plugin Settings starts with 20 rows and appends 200 per task; Advanced starts with one section and appends seven per task. All rows and fields remain mounted after initial completion and available to native Find; keyed rows retain focused edits and drafts. Advanced opts in without changing other Settings form flows.
The plugin inventory also stops publishing a whole-page update for each artwork registration. Schema analysis, detail panels, the Advanced plugin panel, and file preview stay behind their actual use. File preview retains loading, error, Escape, retry, and focus behavior through the owned modal.
The reusable census now measures both first-visible readiness and complete content. Its timing interval stays open until all 1,000 plugin rows or all 303 Advanced rows / 437 controls have arrived. Actions and departures also wait for complete content. The desktop sidebar width correction landed separately in #189450 and is included on both sides here.
Proof
Each measured cell has 20 serial base/head/unchanged-base triplets on the same Mac. Acceptance: readiness and full-content median regression at most 5%, p95 no worse; target tasks at most 50 ms at 1× and 200 ms at 4×. A/A controls and renderer CPU distinguish host noise. These are synthetic catalogs and schemas over the production HTTP bundle and mock Gateway transport, not live Gateway/provider latency.
All times below are median / p95 milliseconds. A/A is the identical base bundle.
The source base is
20cdaea4bb5fc2035949a39643ae2df413ed9f3b; the measurement base includes the isolated sidebar fix from #189450. Final Plugin source isb20d19a332c748b9b9ebc286d8d5c66246e79a43. Advanced uses the identical seven-section implementation measured atbcc2fa987dfb46db7bb9ef9c83d3a717af0cd0bb; the later commit changes only the Plugin batch size. Runtime: Node 26.12.1; Chromium 156.0.8078.4 and WebKit 27.2. Viewports: 1440×1000 and 390×844, headless, localhost network profile. The Mac has 32 logical CPUs. Recorded 1-minute host load ranges were 9.96–22.44 / 7.72–11.38 / 6.35–65.42 for Advanced 1× / WebKit / 4× and 19.26–25.92 / 15.54–23.53 / 13.19–33.00 for the final Plugin runs.Reproduce each Plugin cell from retained production bundles (
B= sidebar base,H= final batch200 bundle), with both variables pointing to bundle directories on the external disk:Use
--engines webkit --cpu-throttle 1for WebKit and--engines chromium --cpu-throttle 4for 4×, with distinct output directories. For Advanced, use--steps page-advanced-visitand the batch7 head bundle. Bundle identity and browser versions are recorded in each run's manifest; summaries never pool different bundles.Chromium 1×
All Advanced 1× head observations have no qualifying ≥50 ms task, CLS 0, and all-shift sum 0. This means no observed long task, not zero execution time. Advanced completion trails readiness by at most 0.5 ms. Advanced counts and RPCs stay exact; its whole document has two additional elements. The Advanced desktop A/A wall spread is substantial; head still beats its control in wall time and CPU. Mobile Advanced style/layout p95 increases by about 0.5–0.7 ms while total CPU improves. Plugin 1× also has no observed ≥50 ms task, CLS 0, and all-shift sum 0 across every head observation; all 1,000 rows / 12,024 page elements / three controls and RPC counts remain exact, and completion trails readiness by at most 0.3 ms. Script median/p95 increases 7.45%/8.78% desktop and 8.53%/10.15% mobile against base while overall main-thread task CPU falls 12.83%/13.47% and 14.74%/13.10%, respectively. The yielded batches add script scheduling work while reducing overall blocking work.
WebKit
Advanced readiness and complete-content median/p95 improve against both references. Its content-completion gap remains visible (median 54 ms desktop, 41 ms mobile), and complete content still finishes faster than both references. WebKit CPU, long-task, and CLS measurements are unavailable in this untraced run. Advanced measurements use the unchanged seven-section implementation; the final Plugin measurements use the 200-row batch.
Plugin WebKit full-content median/p95 improves 27.01%/25.76% desktop and 24.45%/23.24% mobile against base, and also improves against A/A. Progressive content still arrives after first visibility: the maximum gap is 183 ms desktop and 185 ms mobile, included in the reported full-content timings. All 120 observations passed with exact page counts/RPCs and no error events.
Chromium 4×
Advanced's remaining 4× tasks exceed the 200 ms target: p95 / maximum is 232 / 237 ms desktop and 248 / 250 ms mobile. The base p95 is 538 ms desktop and 628 ms mobile, so the blocking task is substantially shorter, but the target remains open. Advanced full-content p95 improves against base; desktop is 2.06% slower than the A/A control (1,084.4 vs 1,062.5 ms). The same unchanged base's full-content median moved −4.59% between B and A/A on this loaded host. This is a CPU/task win under the noisy-host rule, not a clean desktop wall-tail win: renderer main-thread task CPU median/p95 improves 6.31%/2.72% against base and 3.52%/0.02% against A/A. Mobile CPU improves 3.54%/10.12% against base and 2.47%/8.22% against A/A. Plugin 4× full-content and first-visible median/p95 improve against both references; all counts and RPCs remain exact, with CLS and all-shift sum 0. Renderer task CPU median/p95 falls 12.40%/10.28% desktop and 11.36%/14.12% mobile against base. Script median/p95 rises 7.37%/8.21% desktop and 10.25%/3.08% mobile. The 200 ms task target remains open: head p95/maximum is 229/366 ms desktop and 227/235 ms mobile, with 6/20 and 3/20 observations above 200 ms. Full content follows first visibility by median 22.8 ms desktop and 92.25 ms mobile, included in the full-content measurements. Two separate diagnostic 4× observations identify the five 200-row append checkpoints at maxima of 43.9 ms desktop / 40.0 ms mobile (193.3 / 170.5 ms combined), with initial teardown/render tasks of 198.6 / 191.1 ms. The traced desktop task above 200 ms was a later shared Settings-sidebar agent/avatar/menu mount: 223.4 ms starting 15.0 ms after full-content readiness; its mobile counterpart was 185.3 ms starting 11.5 ms after readiness. That work remains in the measured interval. Diagnostic trace timings are separate from qualification and do not identify the exact stack of the untraced 366 ms outlier or establish a floor.
The aggregate script distributions above stay below 20% growth, but isolated paired tails are larger: desktop paired-script p95 is +23.08% against base (2/20 pairs over 20%); mobile is +20.14% against A/A (3/20 pairs over 20%, maximum +20.90%). These are disclosed separately from the aggregate distribution and from the improved overall task CPU; the result does not claim every pair is below 20%.
The ≤1.3× WebKit/Chromium target also remains open for these large fixtures. The tables report both engines directly; faster WebKit completion does not imply that the cross-engine target is met.
Source-mapped Advanced traces identify combined shell and first-section work, the first form append, and a separate late Settings-sidebar agent/menu mount. The latter begins after full-content readiness but remains inside the measured route interval. These are identified remaining costs, not an irreducible floor. The traced run was on a heavily loaded host; its inflated durations are used only for attribution, not qualification timings.
Original Advanced p95 investigation
Ten additional triplets used the exact frozen bundles from #189355:
The extension improved, but the pooled p95 retained the original outliers; this is not proof that the old regression was noise. The tables above measure the changed implementation independently, including all deferred work. A five-section intermediate candidate also retained a small WebKit mobile completion regression; seven-section batches remove two intervening render/layout phases while keeping the first section unchanged.
CI repair on the landing head
Landing head
f2fae44b774a7af1d90aa2a6a0a441ee009d5f92preserves the measured rendering implementation. CI run 41220745307 exposed four test failures, two test type errors, a partial-mock export guard, a type/runtime import cycle, and two lint errors. These are repaired: lazy-content assertions wait for Advanced, the preview test loads its own fallback namespace, the delayed preview mock preserves real exports, the shared retry display moves unchanged to a leaf module, and cancellation uses an equivalent lint-valid loop. All 25 cases across the five affected test files now pass, along with the UI-pages test typecheck, mock-export guard, Madge cycle check, and targeted lint/format. An independent P0–P2 review of the repair found no actionable findings.The replacement run 41222681960 passed those unit/type/lint/architecture checks and exposed one E2E assertion that inspected the viewer before its lazy module had mounted. The test now waits for the viewer and preserves the exact two-skeleton, failure, retry, and navigation assertions. That named scenario passes locally in the canonical headless Node/Playwright configuration; its test typecheck and independent P0–P2 review also pass. This final commit changes only the test. The same run's two Board theme failures match both exact names and color-compositing diagnostics on the latest completed scheduled main run 41219638881; they remain attributed separately from our repaired test.
The initial CI run's performance job failed while building its unchanged base
468624a1ff134316df1749ecf4586e7cf1c18de6: total CSS gzip was 309,396 B against a 309,366 B cap. That job never reached the PR-head comparison. This is direct base-build evidence, not a passing head result. The final local production build and strict base/head comparison pass with zero violations: startup JS 89,368 B gzip; startup CSS 33,548 B and one request; total CSS 309,514 B gzip / 1,599,764 B raw, unchanged from the measured batch200 candidate. Census timings above remain the original frozen-bundle measurements, rather than being relabeled as runs of the CI-repair commit.The final exact-head run 41223771343 passes the repaired Plugin Skills E2E scenario and all unit, type, lint, architecture, and other selected checks. Two jobs remain failed: the same two Board dark/light theme cases, with identical diagnostics to scheduled main 41219638881, and the performance job's unchanged-base build (
71a4644c050b2d270ad1674658be87f2ed7e526a, CSS 309,392 B against 309,366 B). The latter again stops before evaluating the PR head. Landing uses the native inherited-failure route with these exact test names, logs, tested merge, unchanged source inputs, and local strict asset evidence; failed CI is not reported as green.Validation and scope
Reports, traces, and raw observations stay outside the commit.
Inspected synthetic screenshots
Completed desktop geometry remains unchanged. Crops omit the build footer; fixtures contain synthetic data only.