Repository navigation
perf(ui): keep Devices out of chat boot - #174820
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 maintainer review before merge. What this changesGive Devices a separate build chunk and refresh the measured Chat and New Session boot manifest. Example: Cold-load Chat without opening Devices.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it restores an intended lazy-loading boundary with a focused change and no actionable code findings; the failed UI CI check remains unattributed. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI build consumes measured module membership and chunk rules to emit hashed assets and route-specific preloads; the router dynamically imports Devices when opened. flowchart LR
A[Measured boot manifest] --> C[Build chunk rules]
B[Dynamic route imports] --> C
C --> D[Chat and New Session assets]
C --> E[Devices chunk]
D --> F[Browser boot]
E --> G[Devices navigation]
Technical reviewBest possible solution: Keep Devices under its existing dynamic route loader and prevent measured boot grouping from eagerly including its page. Do we have a high-confidence way to reproduce the issue? Source shows Devices in the base shared boot capture despite its dynamic route loader, with no stable chunk protecting that boundary; no target code was executed during this review. Is this the best way to solve the issue? The change uses the existing stable-chunk owner and regenerated capture, matching the Plugins/Cron pattern without adding another loading mechanism or relaxing budgets. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2badc68b475c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -20, Tests +21. Total +1 across 3 files. Added test files: 0. View PR surface stats
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 16, 2026, 7:35 PM ET / 23:35 UTC. |
|
Merged via squash auto-merge.
|
* perf(ui): keep Devices out of chat boot * build(ui): refresh lazy Devices boot capture after integration
What Problem This Solves
Chat and New Session were preloading the Devices inventory and approval UI. The route already imports its page dynamically, but a co-located capture put that page and its dependencies into the shared boot group.
User Impact
Keep the existing Devices route lazy. Chat boot saves 24,060 B gzip of JavaScript and New Session saves 26,515 B, without increasing request counts. Both routes also avoid 4,691 B gzip of CSS. The Devices page and pairing dialog retain their separate loading boundaries.
Why This Change Was Made
Give the Devices page a stable chunk, using the existing Plugins/Cron pattern, and regenerate the canonical cold/warm boot capture. The refreshed capture drops the Devices views and locale from shared boot, moves genuinely route-specific helpers into their own route group, and picks up the current session-details owner name. No renderer or stylesheet contents change.
Extend the existing emitted-chunk regression to include a lazy Devices entry even when an old capture includes it in shared boot. This protects the loading boundary rather than a source-string pattern.
Evidence
Both builds use the same machine, installed toolchain, fixed timestamp/build ID, and strict checker. Merge base:
12311e42e4ada8e7044c4e3d2e50f7d63d359bd8.The small startup increase comes from regrouped import references and stays below the existing 512 B growth allowance and 342,000 B ceiling. Strict base/head comparison: zero violations. No budget increase.
pnpm ui:build: pass.pnpm ui:boot-manifest:gen: cold/warm synthetic/newand/chatcaptures pass.pnpm tsgo:ui: pass.git diff --check: pass.pnpm deadcode:knip): pass.ci:full. No renderer/style-content changes; screenshots are not applicable.The two production lines reuse the chunk owner; generated production inputs shrink by 22 lines. No new state, abstraction, or dependency. Test growth extends the existing bundle fixture with one distinct stale-capture regression.
Inherited CI failure
Full CI run 38980816039 fails only the six
chat-metadata-observationcases for sharing pending catalog reads: single, shared, late follower, late follower without metadata, late follower without metadata/metadata first, and late follower/catalog first. All six fail identically on scheduled main run 38981593815:models.listreceives 3 requests instead of 2, whilechat.metadataremains 2. The test and its four metadata/catalog owners have identical Git blobs in the tested merge, its main parent, and scheduled main. This is recorded for native inherited-failure admission; the failed CI is not claimed green.Chat boot module and chunk audit
Chat boot breakdown
Measured from the production build at
12311e42e4ada, using the strict performance checker and shipped gzip sidecars. Startup is included in route totals. Source-map module figures are separately gzipped generated spans: ranking estimates, not additive shares of their containing chunks.Largest loaded chunks
assets/control-ui-boot-shared-B_WYkNAe.jsassets/control-ui-boot-shared-DTjA7Qm6.jsassets/control-ui-core-DBnK-ZpL.jsassets/control-ui-boot-chat-BGr5Fvgn.jsassets/control-ui-boot-chat-B4gStnxe.jsassets/control-ui-core-DtNYuJrN.jsassets/control-ui-boot-shared-BD6-l21z.jsassets/markdown-runtime-lrjtlJ4T.jsassets/ui-BOA8luxp.jsassets/control-ui-boot-shared-Xm5RTxC8.jsassets/control-ui-boot-shared-BkUTz1im.jsassets/control-ui-boot-shared-Dl2FWIh0.jsassets/control-ui-boot-chat-Dp2cpmbS.jsassets/control-ui-boot-chat-Dv31iQqK.jsassets/control-ui-boot-shared-CyWsF1rf.jsLargest source modules
ui/src/i18n/locales/en.tsnode_modules/.pnpm/[email protected]/node_modules/markdown-it-emoji/lib/data/full.mjsnode_modules/.pnpm/[email protected]/node_modules/markdown-it/dist/markdown-it.mjsnode_modules/.pnpm/[email protected]/node_modules/entities/dist/generated/decode-data-html.jsnode_modules/.pnpm/[email protected]/node_modules/dompurify/dist/purify.es.mjsnode_modules/.pnpm/[email protected]/node_modules/highlight.js/lib/core.jsnode_modules/.pnpm/[email protected]/node_modules/zod/v4/core/schemas.jsnode_modules/.pnpm/@[email protected][email protected]/node_modules/@solidjs/web/dist/web.jsnode_modules/.pnpm/@[email protected]/node_modules/@tanstack/virtual-core/dist/esm/index.jsui/src/app/app-root.tsxnode_modules/.pnpm/@[email protected]/node_modules/@solidjs/signals/dist/prod/store/store.jsnode_modules/.pnpm/[email protected]/node_modules/remend/dist/index.jssrc/infra/update-run-report.tsui/src/pages/chat/chat-pane-render.tsui/src/i18n/locales/en-devices.tsui/src/pages/chat/components/chat-composer-view.tsxnode_modules/.pnpm/@[email protected]/node_modules/@zag-js/vanilla/dist/machine.mjsui/src/i18n/locales/en-plugin-management.tsui/src/pages/chat/components/chat-composer-queue.tsxnode_modules/.pnpm/@[email protected]/node_modules/@openclaw/uirouter/dist/index.jsFirst paint versus interaction
Dependency duplication audit
The loaded sourcemaps show one installed version each of MarkdownIt, entities, highlight.js, Zod, TypeBox, and Solid. The highlight.js ESM entry wraps its one CommonJS core; it is not a second engine. Zod and TypeBox are separate validators with different current callers, not duplicate package versions. No dependency override is proposed.
Replacement-head CI attribution
After merging current main to resolve repeated GitHub mergeability timeouts, run 38986318322 passes all selected jobs except Real Gateway 2/2. Its sole failing test is
Control UI cross-channel automation management with a real Gateway > configured owners and admin chat manage a Telegram-created job while a non-owner cannot: waiting forprovider.results.has(marker)after an admin-chat send times out at line 496. The Devices alias rename/reload/restart case passes, as do 57 other tests in that shard. The failing test and entire QA, chat, Gateway, agents, and Cron owner trees are byte-identical to the actual CI main parent. The three-file Devices chunk change does not alter that automation-provider path. Native admin admission uses the explicitly authorized unrelated-failure exception; this is not claimed as an identical failure reproduced on scheduled main.Latest integration proof
After resolving only the generated boot capture against current main, the exact integrated tree (
384ea375264) passes the production build and strict performance check with zero violations. Startup: 340,855 B gzip / 7 JS requests / 1 CSS request. Chat: 1,600,166 B / 30 JS requests, CSS 126,338 B. New Session: 1,285,972 B / 27 JS requests, CSS 103,761 B. These totals include concurrent merged changes; the paired table above isolates this PR’s measured win. The native commit hooks passed for the merge tree and regenerated capture.