cleanup jun 1 - #4
Open
samiskin wants to merge 2 commits into
Open
Conversation
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.
Cleanup pass on the Havn tutorial/demo workspace: collapse to a single root
package.json/node_modules, fix stale config & docs, restructure every canvas to the correct Tempo registry convention, and strip a pile of editor/render cruft.Two commits, described below.
1. Single
package.json(move to a single package json)Goal: one root
package.json+node_modules. The Tempo sidecar devserver runs directly from it instead of maintaining its own duplicate manifest/tree.tempo/package.json+tempo/package-lock.json; folded the Tempo-only devDeps (tempo-sdk,vite-tsconfig-paths,@tailwindcss/vite) into the rootpackage.json. Keptvite6 /@vitejs/plugin-react4 / React types 18 —tempo-sdksupports vite^5 || ^6 || ^7, and the app's React runtime is 18.tempo/tempo.config.json:install→cd .. && npm install;start→../node_modules/.bin/vite. This runs the Tempo vite config directly with no npm-script indirection. (A previous attempt keptstart: "npm run dev", which broke oncetempo/package.jsonwas gone — npm walked up to the root and ran the main app's dev server.)tempo/vite.config.ts: removed the React/framer-motionresolve aliases +dedupe. They only existed to merge twonode_modulestrees into one React copy; with a single tree Vite dedupes on its own (verified the host resolves one React copy).pnpm-lock.yaml(the repo installs via npm everywhere), dead.tempo/types.ts, and a leftover pasted PNG asset.demo-assets/tree, the wrong canvas count/path, andpnpm; now describes the real structure and uses npm.<link>from bothindex.htmlfiles (the design is Geist-only).public/favicon.svg(the rootindex.htmlreferenced/favicon.svg→ 404).2. Canvas + React cleanup (
react fixes)Canvas registry convention. Every
tempo/designs/canvases/*/index.canvas.tsxwas a 300–870-line file implementing all of its storyboards inline. Each is now a pure registry — theTempoPagedefault export plus oneexport const X: TempoStoryboard = { render: () => <XBoard/>, name, layout }per storyboard. Each storyboard's JSX moved into its own sibling*Board.tsx, and helpers shared across a canvas moved into a per-canvasshared.tsx.nameliterals, andlayoutliterals preserved exactly.index.canvas.tsxdropped from 873 → ~60 lines.Removed
contentEditablecruft from the canvas JSX:contentEditable/suppressContentEditableWarningattribute pairs.outline: "none"focus-ring leftovers that paired with the removedcontentEditable.<p>placeholder subtitles.Fixed the shared
src/design-system/canvas-chrome/index.tsx:CanvasCovernow renders itsdescriptionprop (every cover was showing the same hardcoded blurb); removed the deadslugprop and its 8 call sites.Eyebrow,DarkSheet's caption, andTitleSpread's meta now render their content (all were stubbed to<></>); fixedDarkSheetdouble-rendering its title.Annotation,DarkRow,DarkSwatch,DarkPanel.03-colors/06-icons(usedLucideIconinstead of a hand-rolledComponentType<…>), clearing 44 pre-existing type errors.Verification
import.meta.hotwarnings in generated.tempo/*files; the 44 canvas type errors are fixed.canvas-chrometransform200through the Tempo host with no errors.canvas-chromecomponents in a throwaway harness — covers, eyebrows, captions, and meta all display correctly.Note / follow-up
Running Tempo's
canvas_initon this sidecar layout re-scaffoldstempo/package.json+tempo/node_modules(the default sidecar expectation). Deleting them restores the single-package setup, but it will recur on re-init unless Tempo's sidecar init respects a parent-delegating config, or the project switches to the root layout.🤖 Generated with Claude Code