- Shipped
- August 26, 2026 at 4:03 AM UTC
- Author
- kamo
- Commit
- 0fd292a
The market settings page imported all 24 tabs statically, so every market shipped every tab — a retail market carried the seven mortgage tabs, the four personal-loans tabs and the five subscription tabs it can never open. The render below already gates each one on market.commerceType; only the import ignored it. 424 KB of tab source across the 23 type-specific tabs, before their transitive imports. They are code-split now. MarketOverviewTab stays eager because it is the default landing tab. This is the item the audit flagged as too risky to take, on the grounds that the initially-selected tab would show a loading state where it is instant today. Two things about this page make that not apply, and both were worth checking rather than assuming: SettingsView renders ONE tab at a time — React.Children.toArray, then pick the child whose `tab` prop matches — and creating a React element does not invoke the component. So exactly one chunk is ever fetched, the active one, not the whole matching set. And the tab bodies fetch their own data on mount; MarketVendorsTab and MarketProductsTab are 773 and 1,102 lines with their own loading states. The chunk fetch runs in parallel with a data fetch that was already there, inside a page that only renders any of this after the market itself has loaded. Nothing that was instant becomes a wait. The other pages in that survey are left alone: settings/member/[memberID] has 11 tabs and platform/configuration has 8, both without the commerceType-style gating that makes this one a clear win. Verified: tsc --noEmit clean over the page and its transitive imports; all 10 guards pass.