perf(platform): lazy-load route setup groups - #29757
Conversation
Co-authored-by: Okou <okou@vm0.ai>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
API preview: https://pr-29757-api.vm6.ai |
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
|
Parent Mode C preview gate — exact head Classification: PASS for PR-specific regression risk. Connectors checkpoint is baseline-blocked/non-attributable and does not block this PR. Environment:
Measured anonymous mobile startup against an equivalent production capture:
Functional/regression coverage:
Connectors attribution gate:
Therefore the Connectors loop is a pre-existing baseline issue to track separately. No correction or head change is warranted for #29757 from the current evidence. |
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Preserve lazy target preparation and active-route ownership while integrating history-state synchronization from #29898. Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
Co-authored-by: Okou <okou@vm0.ai>
|
Exact-head staging-browser QA passed for 3500569. Deployment under test
Desktop cold route-boundary checks (1440x900)
Desktop evidence: https://cdn.vm0.io/artifacts/0rd4rl3vh5.png iPhone 17 Chat -> mobile sidebar -> Connectors
Mobile evidence: https://cdn.vm0.io/artifacts/9w5ypmgh5z.png CI is fully green, including all 8 app shards, all 8 API shards, lint/type/Knip, CodeQL, Semgrep, deploy, e2e, and ci-gate-turbo. GitHub currently reports OPEN, MERGEABLE, CLEAN. No merge or pr-auto action was taken. |
Summary
Refs #29576
Route lifecycle
Each in-flight setup has an identity-scoped failure and completion path. A stale abort, rejection, or continuation cannot clear or overwrite a newer attempt's pending/successful marker. A setup is marked activated only after its command resolves, its signal remains live, and root ownership is revalidated. Failed first setup attempts therefore remain cold; after another route becomes active, retry clears the outgoing page before its lifecycle is aborted.
On initial bootstrap, the existing skeleton remains visible through preparation and setup until the selected page calls
hideAppSkeleton$. On client navigation, noshowAppSkeleton$call is made, so module fetch/parse time is not presented as a second bootstrap.Intent prefetch
Linkinvokes consumer pointer/focus/touch handlers first and respectspreventDefault().requestIdleCallback, timer, or all-route warmup.Build evidence
Method: production
vite build --manifest; eager graph is the recursive static-import closure ofindex.htmlplus the criticalsrc/main.tsentry. Transfer proxies sum independently compressed JS assets using gzip level 9 and Brotli quality 4.9a0a6cf813eagerddd6342a81eagerd63d4744dbeager1ffc139b86eagerThe attempt-identity correction costs 891 raw bytes, 200 gzip bytes, and 157 Brotli-q4 bytes versus
d63d4744db, with no eager chunk-count change. Total emitted JS assets are 456; 45 are in the eager closure.All coarse route groups remain
isDynamicEntry=trueand outside the eager closure:activity-D6-t78Xi.jsbrowser-BTQ4uacX.jschat-BSo97GNH.jshome-DpfLG_lc.jsmisc-BvBod969.jsonboarding-DNptKKVZ.jssettings-DogsmjXo.jsworkflows-CqMb079t.jsThe sidebar layout is also a non-eager dynamic entry (
sidebar-layout-Ca9CS5rN.js, 102,432 raw / 20,902 gzip-9 / 21,592 Brotli-q4). The minimal layout stays in a non-eager shared chunk.Largest remaining eager chunks are unchanged in kind: realtime (2,299,181 raw), main (1,147,253), runners (857,171), clipboard (578,290), and Clerk client (389,330). No minification, manual chunking, Clerk/PostHog entry point, service worker, or cache-policy changes are included.
Exact eager JS assets at 1ffc139
alert-CnkZWFVT.js,app-skeleton-ScyQDx5T.js,arrow-up-right-tF4dEQw7.js,attachment-url-CCB_8Q-0.js,avatar-svg-preview-D5rpKCZs.js,billing-M5bX22Fc.js,chat-threads-Cg3EzWJj.js,chevron-right-BwzJZwwR.js,chunk-C_YJxL4P.js,client-BNIv8351.js,clipboard-CpFPzUFC.js,components-DhGyjOOI.js,constants-CMrrKKh_.js,constants-ijs49fxA.js,document-title-BSpBcMPb.js,emotion-react-jsx-runtime.browser.esm-sywq2dAg.js,error-BZ5yOgGa.js,error-uYOdvTDm-CDgY7MAQ.js,eye-LC_8sh8H.js,fetch-D5yY4_VF.js,floating-ui.react-dom-ptEAfu16.js,image-annotation-CieYHe6f.js,image-annotation-marks-BFSs1rFP.js,index-Df17u1jY.js,link-DSvv81Sj.js,mail-xswUZYTH.js,main-uPpp599P.js,org-member-routes-C5GxCN2U.js,pencil-CVbZljwS.js,platform-assets-D4fkvcAE.js,providers-DhrAmi5t.js,pwa-install-CxXaxkHB.js,queryParams-CPRBc80S.js,queryStateParams-CqgTDpqh.js,react-52BX-0De.js,react-E3W10DUO.js,react-dom-BqSYs1o-.js,realtime-BF7g2Fia.js,run-routes-DDJoPda3.js,runners-CY98t2iu.js,slack-redirect-DJhPCufL.js,standalone-mode-p8lAs8IT.js,trash-2-C0ioeiwV.js,useClerkModalStateParams-oGL1cSNr.js,warnAboutCustomizationWithoutPinning-Dpwb_Rfk.js.Validation
pnpm -F @okouai/app check-types(production and tests)route-lazy-loading.test.ts: 12/12link-navigation.test.tsx: 9/9 (21/21 loader/Link matrix)pnpm -F @okouai/app exec vite build --manifest(7,541 modules, 22.65s)git diff --checkNo full local Vitest suite, dev server, staging-browser, pr-auto, enqueue, or merge was used.