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:
9 files changed
+458
-339
No files matched your search
@@ -9,7 +9,7 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { NativeSelect } from "@/components/ui/native-select";
|
||||
import { type BenchmarkPhase, QUALITY_SECTIONS, type QualitySection } from "@/lib/db/schema";
|
||||
import { type BenchmarkPhase, QUALITY_SECTIONS, type QualitySection } from "@/lib/db/enums";
|
||||
import { SECTION_HINT, SECTION_LABEL } from "@/lib/quality-view";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { NativeSelect } from "@/components/ui/native-select";
|
||||
import { ENGINE_LABEL } from "@/lib/benchmark-meta";
|
||||
import { ENDPOINT_ENGINES, type EndpointHardware, type EndpointProbe } from "@/lib/db/schema";
|
||||
import { ENDPOINT_ENGINES } from "@/lib/db/enums";
|
||||
import type { EndpointHardware, EndpointProbe } from "@/lib/db/schema";
|
||||
import type { EndpointView } from "@/lib/endpoints";
|
||||
|
||||
type Field = { key: keyof EndpointHardware; label: string; placeholder?: string; kind?: "number" | "int"; hint?: string };
|
||||
|
||||
Reference in new issue
Block a user