Repository navigation
perf(ui): load Settings without unrelated session and Memory setup - #184754
Conversation
Move shared Memory keys into config sections and register only shared session labels for Settings targets, preserving the full catalog order and synchronous registration.
Share the dependency-free dedupe helper through the existing boot group and keep shared session English copy with the existing English group. Settings retains its search labels without evaluating optional session UI.
|
🦞👀 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 maintainer review before merge. What this changesThis PR narrows Settings imports and shared chunk placement to avoid loading unrelated session-management and Memory setup code. Example: Open native phone Settings at /settings in Chromium at 390×844.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a focused Settings loading improvement, and review found no concrete introduced defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSettings search consumes route metadata, schema visibility keys, and translated labels; the build configuration determines which JavaScript chunks the browser loads to provide them. flowchart TD
A[Open Settings] --> B[Settings search]
B --> C[Config section facts]
B --> D[Shared English labels]
C --> E[Search destinations]
D --> E
F[Build chunk configuration] --> G[Browser asset requests]
G --> A
Technical reviewBest possible solution: Retain the narrowed imports and existing shared chunks while preserving synchronous labels and Memory search destinations. Do we have a high-confidence way to reproduce the issue? Current-main imports directly show Settings search reaching Memory plugin-slot setup and the full session catalog; supplied browser measurements support the loading cost, but no new reproduction was run. Is this the best way to solve the issue? The patch removes unnecessary dependencies at existing owners without adding state, loaders, or parallel implementations; the benchmark addition exercises the previously unmeasured native Settings root. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 91fa755ffd6d. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +11, Other +51. Total +62 across 8 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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, 12:04 PM ET / 16:04 UTC. |
|
Merged via squash auto-merge.
|
…penclaw#184754) * perf(ui): trim Settings search dependencies Move shared Memory keys into config sections and register only shared session labels for Settings targets, preserving the full catalog order and synchronous registration. * test(ui): measure native Settings root cold loads * perf(ui): keep Settings search out of optional session chunk Share the dependency-free dedupe helper through the existing boot group and keep shared session English copy with the existing English group. Settings retains its search labels without evaluating optional session UI. * test(ui): await lazy chat details before assertions
What Problem This Solves
Opening Settings loads session-management copy, Memory plugin-slot setup, and optional session support that Settings search does not use.
User Impact
Settings makes three fewer JavaScript requests and loads 91,176 fewer raw JavaScript bytes. In 20 interleaved trials per profile, readiness over 100 ms HTTP latency improved from 1,608.95 to 1,492.10 ms median (−7.26%) and from 1,624.60 to 1,505.70 ms p95 (−7.32%). Search labels, results, routes, and the full translation catalog order stay unchanged.
Local readiness was 164.30 → 163.60 ms median (−0.43%), but p95 was 187.40 → 201.40 ms (+7.47%). The local base-vs-base control also worsened at p95 (+4.59%); task CPU was −0.63% median/−0.25% p95 and script CPU +0.11%/+0.48%. This supports the noisy-host acceptance rule, not a universal no-regression claim. Host load1 ranged from 14.90 to 20.55.
Why This Change Was Made
Settings search imported a constant from the Memory schema owner, which also imports plugin-slot selection. It also registered the full session-management English catalog for five shared labels. Move the immutable visible-key tuple into the existing config-sections owner, move those labels into the existing shared catalog, and keep the full catalog's order and values intact. Put the dependency-free dedupe helper and shared English catalog into their existing shared chunks so the narrowed imports do not pull optional session code back in.
There is no new state owner, cache, dependency, or reactive mirror. The benchmark gains a direct native Settings root target, with the same synthetic Gateway and actual production assets as the other route targets.
Evidence
Current PR production diff: merge base
2d9586cfd09bf05c5cb873d8099959e6bedd37ad, head849fab062966ad4756cc1104d253aa08368b6ce0. Test-only repair head68ceb23f2e38acdd826c4ceca134be3d1918adcbadds two explicit lazy-import waits; it changes no production or build input. Main was merged to resolve adjacent benchmark additions; both native Settings and Dock scenarios are preserved independently. Fresh static builds compare the native review baselinef3b04e25276cfd787ce10c9c38d2656566f77a98with this PR head: script typecheck, benchmark formatting, both production builds, and strict performance validation pass. Their emitted input lists are identical; the only changed consumed sources are this PR’s six production files and chunk configuration. The runtime measurements below remain tied to the preserved earlier source/builds.The measurements below compare immutable builds from base
d1b5f547701774d19b9916355b5ea2991d7d3509and clean head0dc3178fc3832592a376ff033c0837e65d015905. They are not runtime measurements of the later integration with main. Source-map comparison maps the same 35 baseline and 32 head request groups (local/remote union) onto the fresh builds, with no extra static dependencies. Eight shared boot/style sources changed and one shared Chat source was added between the old and current builds, equally in both arms; app host, idle loader, router outlet, and config route/page sources are unchanged. This supports retaining the old causal evidence but does not establish current-head wall timings. Each build's complete inventory remained byte-identical across the runs. Coverage and timing ran separately; timing used 20 interleaved base/control/head trials per profile (120 contexts), standard median, and nearest-rank p95. Remote emulation is 100 ms HTTP latency and 10 Mbps; the synthetic WebSocket has no simulated RTT. Native Settings was exercised in Chromium at 390×844, not WebKit or hardware.Their separate session-organization, deferred support, Memory schema, and slot chunks disappear from the head load; shared code remains. A 302-byte dedupe facade remains. The unused-code reduction is a focused win; it does not meet the lane's 40% route target, and selected Settings sections remain separate work.
One local head timing sample had the unchanged optional
app-shell-idle.runtimerequest pending at the readiness cutoff. It was retained; its transfer had not completed at that cutoff. All 120 timing contexts had no page errors, alerts, or workers. All four coverage contexts had no pending JavaScript, errors, or workers. Requests are frozen at readiness, but the generic DOM/RPC snapshot is read later without its own observation timestamp; the latter is not independently qualified to the same cutoff.Fresh static builds (
f3b04e25→849fab06):Startup CSS remains 31,981 gzip bytes in one request; all reported CSS request counts and bytes are unchanged. The small Chat/New increases are accepted against the measured remote Settings win under the campaign's ≤2 KB tradeoff. Strict performance validation passes without baseline or cap changes.
849fab06f3b04e25→849fab06)0dc3178; source change unchanged by integrationCI follow-up
CI run 40350388996 failed two UI assertions:
describes cron weekdays and non-uniform minute steps without inventing a fixed intervalandshows live environment facts without duplicating composer context. Both reached the existing approximately one-second assertion deadline while the lazy formatter/body content was absent. Row or heading readiness does not await that separately imported code. Each affected test now waits forvi.dynamicImportSettled()before its existing content assertions. Assertions and timeouts are unchanged; no production behavior was changed.The unchanged PR head passed both files locally (50 tests, 6.86 seconds), as did current main
6a1f6b0c7bc(50 tests, 11.42 seconds). The two-line correction passed the same files once (50 tests, 3.73 seconds), plus scoped formatting andgit diff --check. These local passes do not reproduce the CI failures or establish inherited failures; latest completed scheduled main 40352459041, at503bc1bd4499, passed both UI cases. Fresh PR CI remains the broader proof of the correction.That original CI run separately failed
Control UI catalog bootstrap > real chat route recovers current account state after pending snapshot ordering. The latest completed scheduled main 40352459041 passed this same case; it remains unresolved in the original PR run. There is no speculative E2E change or inherited-failure waiver. The next exact-head CI run must exercise this case again before landing.No Solid signals, memos, effects, cleanup hooks, direct DOM listeners/queries, owner APIs, manual component loaders, rendering controllers, or async state mirrors are added (all 0 → 0 across the six production owners). Existing domain WeakMaps are unchanged. The production and benchmark diff remains +83/−21 against the integrated base; including the two test waits, the complete diff is +85/−21.
The synthetic before/after Settings captures are byte-identical; the change affects loading rather than appearance.