Repository navigation
feat(studio): rewrite the Studio UI in Svelte 5; smoother 3D kitchen - #182
Merged
Merged
Conversation
Studio's browser UI moves from hand-written DOM code to Svelte 5 components compiled by Vite into studio/app/ (committed and shipped). Svelte and Vite are devDependencies; the CLI keeps no runtime deps. - Projects snapshots patch only the rows, labels and chips that changed instead of rebuilding panels with innerHTML, so focus, typed names and running animations survive refreshes. - 3D kitchen: overlay labels read sizes from a ResizeObserver cache instead of forcing a layout per label per frame; pixel ratio capped at 1.5 and dropped to 1x when frames run slow. - Server serves the built app; hashed assets are cached immutably and a rebuild is picked up without restarting Studio. - npm run build:studio / check:studio (drift check in CI and prepublish); CI and publish run npm ci. - Tests render components through Svelte SSR; new tests cover the 3D layout fix, asset caching, rebuild pickup and sketch frame state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Studio felt heavy: animations and the 3D kitchen stuttered. Two causes:
innerHTML, causing large style/layout recalcs on the main thread that competed with the render loop.style.transformwrites withoffsetWidth/offsetHeightreads for each overlay label, forcing ~10 synchronous layouts per frame.What changed
studio/src/):App.sveltereplacesstudio/js/main.js; components for the project list, overview, Run head, details, ring overlay, room, sheets, order book and sketch. Updates patch only what changed, so focus, typed names and running animations survive refreshes. Pure helpers and the three.js scene stay instudio/js/.studio/js/restaurant.js): overlay sizes come from aResizeObservercache (no forced layout per frame);--guest-his written only on change; pixel ratio capped at 1.5, dropping to 1x when frames run slow.studio/app/(committed and shipped, like the generated skills).npm run build:studio/npm run check:studio; the drift check runs in CI andprepublishOnly. Svelte, Vite and the plugin are devDependencies; the CLI still has no runtime dependencies.lib/studio-server.js): serves onlystudio/app/(+diners.json). Content-hashed assets getprivate, max-age=31536000, immutable; the page staysno-cache. An unknown hashed asset triggers a rescan, so a rebuild is picked up without restarting Studio. Old/js/*,/vendor/*,/styles.cssURLs now 404. CSP unchanged (no inline script/style in the build).filesshipsstudio/app/andstudio/diners.jsoninstead of all ofstudio/; doctor updated; Svelte license added toTHIRD_PARTY_NOTICES.mdandstudio/app/licenses/.npm ciadded (tests now needsvelteto SSR components); package job runscheck:studio.tests/helpers/svelte.js, a Node loader hook). New tests cover the layout-thrash fix, pixel-ratio cap, asset caching, rebuild pickup, freeze button states, and the sketch frame-loaded reset.core/local-workflow-studio.md, CHANGELOG.Reviewer notes
npm test: 927/929 pass. The 2 failures (setup --yes with no coding agent…,setup without a TTY…) also fail on a cleanmainon the author's machine because a localopencodehost is detected; unrelated to this change.check:skills,check:studio,doctor,eval,audit:package,measurepass.&and<in text, so some test assertions now expect>rather than>; output is still safe.check:studioon Node 22.🤖 Generated with Claude Code