Repository navigation
perf(ui): trim lazy menu boot closures - #189053
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Contributor
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. |
steipete
enabled auto-merge (squash)
October 31, 2026 05:19
steipete
disabled auto-merge
October 31, 2026 05:22
Contributor
Author
|
Merged via squash.
|
This was referenced Oct 31, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 1, 2026
* perf(ui): trim lazy menu boot closures * fix(ui): retain workspace labels in lazy session menus * test(ui): await lazy skills before measuring overflow
steipete
added a commit
that referenced
this pull request
Nov 2, 2026
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.
steipete
added a commit
that referenced
this pull request
Nov 2, 2026
…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.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 3, 2026
…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.
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Chat downloads and evaluates menu code and English copy before those features are used.
User Impact
Chat boot transfers less JavaScript while keeping the existing Plus menu, keyboard behavior, and session controls.
Why This Change Was Made
Keep the Plus root on its existing idle warmup, but load Skills, Connectors, and Libraries as a lazy subview. Vite starts the subview download alongside the root without evaluating it, avoiding an extra serial network round trip. The parent retains the existing search and expansion state across subview changes.
Separate session-menu and sharing English from the broader optional catalogs. Preserve catalog order and synchronous registration at each consumer. Group the root/frame support that is fetched together so small uncompressed fragments do not erase the saving.
Evidence
Base:
cf3940004049942def1957303c99bd0abf72c02e. Final build head:501e4e47b0a. The timing, coverage, and top-30 captures below remain pinned tof7f55c16e5a6b80d860a14634d0fe14cfc8f35c8; the final correction restores two session-menu labels and fixes a test fixture, without changing the lazy graph or measured interaction logic.Both builds pass the strict performance checker on the same machine. The 24 functional observations pass across localhost and 100 ms RTT: Plus root rows/focus/dismissal/reopen, post-idle no fallback, Skills search/reset, and retained connector expansion. The fixture is synthetic; this proves the renderer and asset path, not real-Gateway/provider latency.
Timing acceptance: 20 serial, counterbalanced base/control/head triplets per profile, with a base/base control and host load. Require median regression ≤5% and no worse p95; on a noisy A/A control, judge CPU over all 20 pairs and structural counts. A regression above 20% blocks. Coverage reports both fetched HTTP bytes and V8 source/used/unused bytes; they are different quantities. Compile traces are separate descriptive diagnostics.
All 120 ordinary timing observations completed without errors or warnings. Values below are median / p95 in milliseconds; each profile has 20 counterbalanced base/control/head triplets. Host one-minute load ranged 14.8–34.5.
Local A/A shell median moved +40.08%, composer +8.29%, transcript +4.56%; their p95 changes were −9.16%, −8.07%, −5.17%. This fails the wall-time control band, so local timing is noisy. The 20-pair script/task CPU medians remain within 1% with lower local p95. RTT CPU p95 increases are below 1%, the stated noise band; RTT A/A task p95 also increased 0.66%. No latency or CPU speedup is claimed. The local composer and long-task tails are disclosed rather than described as improved.
Full observation-window HTTP JS medians: local 4,811,875 → 4,775,145 raw B (86 → 87 requests); RTT100 4,535,723 → 4,485,309 raw B (82 → 83 requests). The split adds one post-readiness module request. Low-priority New Session preloading completes more often inside the local candidate window: unmatched individual captures can therefore increase by 239,422 B. Matching prefetch states saves 36,730–50,414 B. These final-window totals include idle work and are distinct from the strict first-screen graph above.
CI correction on the final head
CI run
41170950551exposed two PR regressions:session menu > opens resolved workspace destinations: PRlacked its lazy English label, and the new subview error fixture omitted the requireddisabledfield. Both corresponding checks passed in scheduled-main run41168526404, so these were fixed rather than attributed to main. The cold-menu audit also restoredStop cloud worker…in the same catalog.On
0c946d99d32, the three affected test files pass (81 tests), the UI-chat test typecheck passes through the repository's tsrs wrapper, and keyless i18n baseline/verification pass. The correction passed an independent P0–P2 review. Final-head production Knip again reports exactly the same four exports and one exported type as the base, with no new findings. A fresh production build and strict performance comparison pass; raw JS totals and request counts are identical to the measured head. Gzip varies by +16 B startup, +129 B Chat, and +93 B New Session; all final surfaces remain below the base or within its 64 B build-variance allowance. Timing and coverage were not re-collected for these two label fields and test-only changes; the earlier captures are labeled with their actual head, and no final-head CPU speedup is claimed.CI run
41171577275then exposed a first-open WebKit test race:fits skill rows at 390pxmeasured before the lazy Skills rows existed. The failure reproduces locally on the prior head. The test now waits for a real Skills row before preserving all overflow assertions. The same run also caught a redundant terminal return and a missing mock-isolation explanation for the deliberately rejected chunk import; both are fixed. On501e4e47b0a, all 27 overflow cases pass across Chromium and WebKit, UI typecheck and scoped lint/mock-export checks pass, and independent P0–P2 review is scoped-clean. The fresh production build and strict base comparison retain exactly the previous raw/gzip totals and requests in the table. Timing/coverage remain historical as labeled. The previous auto request was cancelled through native recovery before pushing this replacement.V8 coverage
V8 evaluated source decreases 68,258 B; executed source decreases 33,631 B local / 33,337 B RTT; unused source decreases 34,627 B local / 34,921 B RTT (about 1.4%). V8 source covers evaluated scripts represented in coverage, not every downloaded script. Roughly 915 KB remains against the requested 950 KB unused-source reduction.
Late New Session prefetch completes in 13/20 base, 14/20 unchanged-control, and 19/20 head local samples; none completes in the RTT samples. Its four-JS payload itself grows 13,684 raw / 4,269 encoded bytes, while complete strict New Session boot gzip shrinks 71 B. One unmatched observation can show +239,422 raw JS / +274,340 all-resource decoded bytes. The observation window is therefore not a universal per-sample byte saving.
Compiler diagnostics
These are separate descriptive traces (three base/control/head triplets per profile), not the 20-pair timing verdict. CPU in milliseconds:
No compiler improvement is claimed. Independent assessment finds no attributable blocking timing/CPU cell under the stated noisy-host rule; local composer and long-task tails remain limitations. All original source/output/package/Chromium/runner seals verified after captures; 424 package identities per workload, no resealing.
Focused checks passed: UI and scripts typechecks, tooling-test typecheck, English baseline/verification, 27 optional-English tests, 30 catalog tests, the connector expansion regression, and the earlier unchanged menu/loading/invalidation contracts. Independent review is scoped-clean at P0–P2. Production Knip was run on the base and measured head: both exit 1 with the same five existing exports/types (
applyPluginAutoEnableAsyncin two owners,loadProviderPolicyArtifacts,buildProviderAuthDoctorHintWithPlugin, andChannelStopReviewTarget). No new finding. Exact-headci:fullrun 41172471941 completed successfully on501e4e47b0a; native completed-hosted preparation also passed.LOC across changed files: production and build config 12,827 → 13,067 (+240); tests/support 2,572 → 2,859 (+287); generated boot manifest 1,888 → 1,891 (+3). The growth is the explicit lazy component boundary, preserved parent state contract, and catalog-order/registration proof; signals 4→4, onSettled 5→6, lazy component boundaries 0→1; no new effects, listeners, DOM queries, manual loaders, or owner APIs.
The before/after captures contain synthetic session names, transcript text, and skills only. They show the same root rows and Skills content. The Skills screenshots occur during the existing 220 ms menu-height transition; they do not prove pixel-identical final settled geometry. Functional assertions verify content, focus, search/reset, dismissal/reopen, and connector expansion.
This is one measured step toward the lane target. It does not claim the requested ~950 KB reduction in unused boot source.
Reproduction sources: ordinary workload commit
1ba3f47e75647ab5a3a5cc759e8d6395ac740a28(source); functional workload commit087901b6a253b47cfea4d14f68026141b3e58cc9(source). Both are published proof refs, never integration branches. The locally sealed bundled runners retain their exact manifest hashes. Their external bundling helper has not yet been published, so these links provide workload source, not a one-command byte-identical artifact reproduction.Top 30 modules by unused bytes on ordinary localhost head
Base
cf3940004049; headf7f55c16e5a6. All four cohorts contain 30 independently checked named module rows (120 total); 31 distinct paths and 33 exact source identities. Every module identity matches its fresh source map, source-content hash and pinned checkout. Counts below are unused raw JS bytes attributed to each module, not CPU time.markdown-itDOMPurifypages/chat/components/chat-model-picker-panel.tsx@tanstack/virtual-corecomponents/solid/settings-ui.tsxlib/protocol-validators.generated/approvals.jspages/chat/chat-pane-side-panels.tslinkify-itpages/chat/chat-composer-capability-host.tsxpages/chat/chat-pane-sharing.tsapp/app-shell-chrome.tspages/chat/components/chat-effort-picker-panel.tsxipaddr.jsapp/app-root.tsxpages/chat/components/chat-composer-view.tsxpages/chat/components/chat-header-session-menu-content.tsxcomponents/select-picker-view.tsx@solidjs/signals store.jscomponents/session-progress-card-solid.tsxpages/chat/components/chat-header-session-menu-mobile.tsxcomponents/session-menu-view.tsxpages/chat/chat-pane-history.tslib/protocol-validators.generated/activity.jscomponents/session-organizer.tspages/chat/chat-outbox-owner.tslib/sessions/github-publication-owner.tspages/chat/chat-pane-lifecycle.tscomponents/solid/menu.tsxpages/chat/chat-send-submit.tscomponents/session-icon-picker-solid.tsx† Same source path outside that cohort’s top 30; count taken from its full sealed ranking. The base-only top-30 plus-menu body is covered in the audit JSON. Source-map coverage attributes generated bytes, so locale-registration edits can move a few bytes between otherwise equivalent modules.
“Common” means a normal follow-up interaction; “mixed” includes actual boot work plus later content/state-dependent branches. These categories are not population telemetry. In particular, the GitHub publication owner can automatically read options/status for a visible pane when advertised; only its explicit account/publish/confirm actions are specialized. No named top-30 module is wholly classified as rare. Unmapped emitted bytes and function-level rankings remain separate; do not add overlapping module/function totals.
Top 30 function spans by unused bytes on ordinary localhost head
Base
cf3940004049; headf7f55c16e5a6. 30 head-local rows independently reviewed, not 120 semantic reviews. Each generated UTF-16 span, chunk/map hash and mapped source text was checked against the sealed bundle and pinned source. Other-cohort numbers below use uniquely matched declarations (including source columns for JSX accessors) with identical mapped source-body hashes; registrations outside a body can shift source lines.Span caveats: row 12 is a Rolldown whole-module initializer mapped to
defineSolidBridge, including templates/dependency initialization and the agent-selector renderer; 4,351 B is not the cost of the bridge call. Row 25 is a generated JSXchildrengetter inside CameraCaptureContent. The other 28 rows map to concrete source functions/methods (including the generated board validator). No head-local row is unmapped or unresolved.buildChatItems(3 calls),loadChatRoute(1) andcoalesceTurn(40) already ran in the localhost capture: their unused bytes are unvisited branches, not wholly uncalled code. All other listed head-local spans have zero invocations. “Common”, “mixed” and “rare” describe triggers, not measured population frequency; rare here means explicit optional camera/task-suggestion action. Unused bytes do not prove code can be removed, and overlapping module/function totals must not be added. Minor byte differences can be bundler symbol/grouping changes.