- Fix param sliders: Viewer now fits camera once per design (fitKey), not on every param change — size changes are visible again. Better slider ranges. - Progress UX: full-stage overlay with spinning cube + pipeline stepper, animated thinking dots in chat, send-button spinner, staged status. - B (vision verify): capture canvas → /api/verify (Claude vision) → auto-refine one pass on mismatch. Fail-open so a flaky judge never blocks. - C (persistence): D1 designs table + anonymous cookie identity, save/load/list, designs drawer, autosave, shareable ids. no-store on all /api responses. - D (STEP scaffold): /api/step + build123d prompt + service client (step.ts), Download STEP button. Needs STEP_SERVICE_URL to go live. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
528 B
SQL
13 lines
528 B
SQL
-- Saved designs. The script is the source of truth; messages preserve the chat
|
|
-- so a design reopens mid-conversation. uid scopes ownership (anonymous cookie).
|
|
CREATE TABLE IF NOT EXISTS designs (
|
|
id TEXT PRIMARY KEY,
|
|
uid TEXT NOT NULL,
|
|
title TEXT NOT NULL DEFAULT 'Untitled',
|
|
script TEXT NOT NULL DEFAULT '',
|
|
messages TEXT NOT NULL DEFAULT '[]',
|
|
created_at INTEGER NOT NULL,
|
|
updated_at INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_designs_uid ON designs (uid, updated_at DESC);
|