Files
zeekay 75e4ba9102 Every page's first load sheds the palette, the toaster and the menus' copy
What the site's header and root mount on every page carried three things no
page draws until the reader acts:

- The header's Solutions and Hanzo OS rows imported lib/data/solutions.ts and
  lib/layers.ts whole, every solution's page copy and every layer's
  operations, to draw a column of links that is not open. The rows are now
  derived at prebuild (scripts/sync-menu.mjs → lib/data/menu.json: names and
  addresses), so a solution or a layer is still added in its list and nowhere
  else; e2e/unit/menu.spec holds the file to the lists.
- The ⌘K palette and the toast viewport load once React owns the page
  (components/shell/later.tsx): the palette listens for its own chord, and a
  toast is always something the reader did after the page was theirs.
  components/shell/lazy.ts names one export of each package, so the import
  takes them and not the barrels.

An empty page's first load is 354 KB (was 367), the landing's 430 KB gzip
against weight.spec's 445 (was 457), and the pages over perf.budget.json go
from 124 to 64.

Claude-Session: https://claude.ai/code/session_01BLLMyBFSvAfCt7ZGqYuiEz
2026-10-22 13:05:18 -07:00

11 lines
423 B
TypeScript

'use client'
/**
* Controls every page mounts and no page draws until the reader acts: the ⌘K
* palette and the toast viewport. Named here, one export each, so a dynamic
* import of this module takes only them and not the packages' whole barrels;
* components/shell/later.tsx loads it once React owns the page.
*/
export { HanzoCommandPalette as Palette } from '@hanzogui/shell'
export { Toaster } from '@hanzo/ui'