Client bundles: no drizzle in the browser, lazy palette, one copy of the painting

- The enum arrays move from schema.ts to src/lib/db/enums.ts (no imports),
  which schema.ts re-exports. The endpoint form and benchmark start imported
  ENDPOINT_ENGINES/QUALITY_SECTIONS from the schema, which put drizzle-orm,
  every table definition and ulid (18 KB gzipped) on the endpoint pages. An
  ESLint rule now refuses value imports from the schema in client code.
- The ⌘K palette dialog is its own chunk, loaded on first open and preloaded
  when you hover or focus Search or press ⌘/Ctrl.
- The dot painting's brightness grid was copied into 10 page chunks (~10 KB
  gzipped each); it is now one async chunk, parsed once per tab. The canvas
  skips redraws when size, pixel ratio and theme are unchanged (the
  ResizeObserver's first callback drew everything a second time) and draws at
  most once per frame while resizing.

First-load JS per route drops by 10-29 KB gzipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EooZ9biu7kFNB4eDJrwQc5
This commit is contained in:
Claude committed 2026-11-01 20:57:53 +00:00
1 parent 2e56351e96
commit d10a491042
9 files changed
+458 -339

No files matched your search

+4
View File
@@ -22,6 +22,10 @@ step 1 (Hugging Face downloader) is released as a minor version.
- **Lighter benchmark lists**: the Benchmarks and Endpoints pages, a model's sidebar and the ⌘K
search load only what they show (headline numbers, the quality score), not every run's full
results; the list refreshed every 3 s during a run now sends a fraction of the data.
- **Less JavaScript per page** (10–29 KB gzipped less on every page): the dot painting's data is
loaded once and cached instead of being part of each page, the ⌘K search loads when you first
reach for it, and the endpoint pages no longer include database code. The painting is drawn once
per page view instead of twice, and at most once per frame while the window is resized.
## [0.16.0] - 2026-10-30