Repository navigation
improve(ui): load Apps without the Chat bundle - #184020
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 separates Apps catalog dependencies from Chat and preloads the shared MCP renderer when an app opens. Example: Open /apps before opening a plugin app.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this is a useful maintainer-directed bundle reduction, with one narrow, diff-caused CI failure to fix. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherControl UI chunking assigns browser modules to bundles; Apps consumes catalog data, then loads the conversation and MCP renderer on demand while existing owners retain launch admission and teardown. flowchart LR
A[Apps route] --> B[Shared catalog support]
A --> C[Lazy conversation]
C --> D[MCP panel]
A --> E[Shared lazy MCP renderer]
D --> E
F[Board content] --> E
Technical reviewBest possible solution: Retain the focused shared-chunk and lazy-renderer change, and register its justified benchmark suppression in the existing explicit allowlist. Do we have a high-confidence way to reproduce the issue? Current-main source retains catalog modules in the captured Chat grouping, and the exact-head CI annotation independently demonstrates the new suppression-list failure; no target code was executed during this read-only review. Is this the best way to solve the issue? The production change uses the existing chunking owner and replaces duplicate lazy declarations with one shared boundary while preserving launch and teardown contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 97c7f5bc0ac4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +17, Tests +12, Docs +17, Other +806. Total +852 across 9 files. Added test files: 0. View PR surface stats
Review metrics
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 25, 2026, 9:14 PM ET / October 26, 2026, 01:14 UTC. |
…ilures Assert the accepted sidebar row and single create within the frozen 200 ms window, then resume time before full Chat route readiness. Retain the publication menu single click and visibility assertion while recording bounded failure-only event facts for a recurrence. The original CI failures remain unreproduced and are not classified as inherited.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* perf(ui): keep app catalog dependencies outside chat * fix(perf): bind Apps probe to its socket * test(ui): preserve frozen sidebar assertions and trace publication failures Assert the accepted sidebar row and single create within the frozen 200 ms window, then resume time before full Chat route readiness. Retain the publication menu single click and visibility assertion while recording bounded failure-only event facts for a recurrence. The original CI failures remain unreproduced and are not classified as inherited. * test(ui): brace publication diagnostic listener loops
What Problem This Solves
Opening Apps loaded the Chat bundle before the user opened an App.
User Impact
The retained Apps static comparison (
d6685f285a1c→879e229618ee) drops 512,989 B gzip of JavaScript (40.6%) and 40,906 B gzip of CSS (31.1%), with four fewer JS requests and one fewer CSS request, and no static Apps → Chat bundle path. The fresh exact-head budget comparison below keeps startup within build variance and adds no startup request.Historical corrected-candidate timing improved cold readiness at 100 ms HTTP RTT by 18.77% median / 25.57% p95. Timing accepted under the noisy-host 20-pair affected-CPU rule. This is not a universal latency improvement: localhost first-open p95 rose 47.56% (679.1 → 1002.1 ms), total wall p95 rose 27.17%, and the capture lacks native input/ready timestamps needed to fully attribute those tails. The retained static comparison’s Memory payload grows 2,652 B gzip (0.276%), with no extra request or explicit renderer evaluation/import edge.
Why This Change Was Made
Shared catalog and launch helpers now use the existing shared support chunk, while the conversation stays lazy. The MCP view starts loading alongside conversation demand to avoid a serial first-open waterfall. Keep one native Solid lazy MCP view for Apps, Board and the panel. Panel retains launch admission, post-preload live-target checks and error presentation; Board retains foreign-view teardown ownership. Existing catalog preloading and immediate native Count/Close interactions are preserved. No new manager, state copy, dependency or budget exception is added.
Evidence
The historical static comparison is base
d6685f285a1c→ integrated head879e229618ee, built on the same machine. Historical V2 coverage and corrected V3 runtime samples below predate this integration and are not exact-integrated-head runtime proof. A subsequent benchmark-only correction removes an unbound-method lint suppression and adds a socket-contract preservation test; the task-owned production delta is unchanged from that measured integrated head. Runtime and coverage samples were not repeated after the observer correction.Current exact base/head budget proof
Built
ed5a99e0af5fbac18036187413f39afcd810b264and7873d4943a4fa1235f29669ec904044921a75af7once each on the same machine with Node 26.12.1, the same frozen dependencies and a fixed synthetic build identity. Both complete asset snapshots passed source/inventory/copy verification with no missing references. Both strict checks passed with no warnings, violations or budget edits; the launcher restored and verified clean exact-head source. Productionpnpm deadcode:knipalso passed once on exact7873d4943a4.The small JS differences are within the checker’s 64 B build-variance allowance. New Session CSS grows 202 B while total CSS falls 172 B; the existing strict budgets pass. No current Apps/Memory closure, V8 coverage, readiness timing, or visual result is inferred from this budget check. An optional manifest-only closure refresh stopped because the historical snapshot has no manifest after a setup-shape correction; the historical Apps/Memory definition could not be revalidated, so those rows remain explicitly historical. No graph scan, browser or rebuild followed.
Historical Apps/Memory static closure
879e229618ee)pnpm tsgo:uipnpm deadcode:knippnpm ui:check-performance:base d6685f285a1cProduction/config LOC against merged main
ed5a99e0af5f: 1,284 → 1,301 (+17); benchmarks 1,452 → 2,276 (+824); tests 477 → 686 (+209); docs 413 → 430 (+17); total 3,626 → 4,693 (+1,067). Benchmark additions record native iframe/RPC/clock evidence. Solid refactor counts:lazy3 → 2,createEffect2 → 2,onSettled3 → 3; render effects,untrack, direct listeners, DOM queries,flush, owner calls and manual imports stay 0 → 0.Main integration
Merged main
ed5a99e0af5fbac18036187413f39afcd810b264to resolve a real benchmark conflict with the native Desktop/Portal probes. The combined benchmark keeps both alias sets, propagates the same server URL through the recursive Apps fixture, and retains separate native activation branches and the existing RFB/pixel/Portal/rail/RPC readiness checks. An explicit return type gives both target branches the same optional request contract; it changes no runtime behavior. The automatic chunking merge preserves both the Apps assignments and main's Desktop/inline-rail assignments.The retained production measurements above remain pinned to their original base/head. They are not exact-main-integrated-head build, coverage or timing proof. A no-browser help smoke and pinned diff/format checks passed. The first external typecheck configuration failed before checking source because its inferred root directory was the proof directory. After correcting that configuration, the scoped check found the merged target's missing optional-field type, which the type-only annotation repairs; scoped tsrs then passed. A fresh isolated twelve-file P0–P2 review completed with no actionable findings and passed final source verification. CI run
40263242801at this integrated head completed with the two inherited Settings failures described below and a new diagnostic-helper lint failure. Previous passing replays do not establish either original CI failure's cause.CI follow-up and proof limits
Current exact-head CI (7873d49)
Run
40265865305, attempt 1, completed with no non-E2E failures and three failed test names in two UI E2E jobs. All three also fail the latest completed scheduled main run40265385313ata14fa613c678; no failed name is attributed by shard identity alone.retires notification presentation before a held native acknowledgementhas the identical strict locator error: both a screen-reader status and visible span matchTest notification queued.aligns every mobile settings page with the topbar contenthas the same missing Approvals-shell error.keeps settings rows, introductions, section headings, and Learn more links on one layout systemtimes out on.page-titlein this PR and on/settings/approvalsroute readiness on main; the assertion differs, but the missing Approvals surface is the same. These three failures are accepted as inherited. The diagnostic-helper lint correction passed. CI is failed, not green.The exact current merge-base/head build and strict-budget comparison (
ed5a99e0af5f→7873d4943a4) and production Knip now pass as recorded above. The failed current CI run is qualified by the exact-name inherited comparison; it is not relabeled green.CI run
40263242801ata82df4005d90failedaligns every mobile settings page with the topbar contentandkeeps settings rows, introductions, section headings, and Learn more links on one layout system. Both exact names also fail in the then-latest completed scheduled main run40260665877at1a905c7faa1b: the former reports the Approvals shell missing, while this PR times out waiting for the same route to become ready; the latter has the same.page-titletimeout at line 851. These two failures are inherited. The other failure was this PR's missing braces around the diagnostic helper's two listener loops. The correction adds only those braces; focused type-aware lint passed and a fresh isolated P0–P2 delta review found no actionable issues. The prior twelve-file review remains the review of unchanged semantic inputs. No build, UI test, or performance sample was repeated for this syntax-only correction.Run
40254750785at published headf337f8a461dffailed two exact tests:shows an accepted running session under Involving me before event refresh timers or run completionandkeeps the original personal retry after navigating away and back. The first timed out waiting for Chat route readiness under the test's frozen clock; the second timed out opening the initial publication menu, before its retry/navigation scenario. Neither test failed in the latest completed scheduled main run40255683536at188709180b44; both owning UI E2E jobs passed there. These are not claimed as inherited failures.The sidebar test now checks the accepted row and single create request while the existing 200 ms virtual-time bound remains frozen, then resumes time before its unchanged full Chat-route readiness assertion. This repairs an independently identified test-ordering problem. The original failure did not reproduce locally, so this is not a claim that the CI cause was reproduced or eliminated.
The publication helper retains its original single click and visible-menu assertion. It adds failure-only facts from at most 16 native pointer/click/toggle and overlay events, including cancellation, node replacement, inert ancestry and menu state, with listener and handle cleanup. The exact personal-retry test passed with that proposed helper; no failure trace was emitted. This is diagnostic coverage for a recurrence, not a product fix or proof of the original menu failure's cause.
routeReady=falsefailurea2a49cbe5549d4343a2503398fd3b33ae4afe87728135c7782fdfa50ad6474a3These local replays use current test/harness source with retained production assets, Node 26.12.1 and the Node Vitest runtime selected to match CI's runtime choice; CI uses Node 24.22.1. They are not an exact whole-source checkout comparison or new performance evidence. The publication replay's original result file recorded the restored original helper hash after the run; the retained manifest and separate reuse receipt identify the proposed helper actually tested and verify that the final helper has the same bytes. No production file, measured build, or performance result changed in this follow-up.
Reproduction commands
Run from the repository root. For the historical runtime matrix,
BASE_BUILDandHEAD_BUILDmean the retained original and corrected-V3 build directories; they are distinct from the current integrated static comparison.OUTPUT_DIRis a fresh evidence directory. The recorded dataset used separate ten-pair cohorts; this command runs the equivalent twenty-pair matrix with fresh contexts and the base/base control.The retained focused unit commands were:
The observer correction checks were:
The tooling-config invocation executed the suppression file; auto-classification assigns the observer smoke to unit-fast, so only that new file then ran under its owning config. The first CI run (
40251832346) failed the production suppression allowlist because the original observer introduced a new unbound-method suppression. The correction removes it without extending the allowlist; the test passes locally.The retained historical integrated checks were:
Historical runtime timing, rejected candidate and limitations
Corrected V3: head/base median / p95 change; positive means slower. These runtime samples use the retained historical build, not the current integrated build.
Local A/A first-open wall p95 rose 5.89%; host load median/p95/max was 38.80/55.61/56. The pooled affected task/script CPU cells stay within the acceptance band. Remote first-open layout p95 rose 17.31% and local first-open style p95 rose 15.09%. No new V8 coverage, idle or Memory run was made for V3. Native input and native-ready timestamps were not captured, so the adverse wall tails cannot be proved wholly external.
The rejected V2 candidate had remote immediate first-open wall 1,968.30 → 2,401.45 ms (+22.01%), p95 2,068.20 → 2,458.90 ms (+18.89%), while A/A was −0.16% / +0.77%. V3 overlaps the previously serial MCP-view load. The rejected result remains disclosed separately from the cold-load win.
All corrected V3 cohorts and measured subphases:
Paired CPU differences retain cohort+pair identity; they are not differences of reduced medians.
Historical V2 cells, retained for comparison; warmup is an automation/idle interval, not user-ready latency:
Historical Memory controls passed 120/120 contexts and admitted zero MCP App requests. They do not establish exact V3/integrated-head Memory timing. The current emitted-source witness establishes absence of an explicit renderer edge only; payload/parse cost remains.
Inspected synthetic before/after screenshots (historical V2 layout evidence)
These retained frames demonstrate the catalog and native Count0 layout. They are historical V2 captures, not exact V3/integrated-head runtime or visual proof.
Catalog before:
Catalog after:
Native Count0 before:
Native Count0 after: