Repository navigation
Modernize to Vite + React 19, deploy with pm2, adopt tooltheme, add rounded corners - #1
Merged
Merged
Conversation
boxbuilder is a static site, so the config defines no pm2 process. pm2 deploy checks out the repo on josh.earth, runs `npm ci && npm run build`, and nginx serves <path>/current/dist at /boxbuilder/. User, host, key, ref and path can be overridden with BOXBUILDER_DEPLOY_* environment variables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unded corners Toolchain - Create React App -> Vite 8; React 17 -> 19; TypeScript 4.7 -> 6.0 (7 isn't supported by typescript-eslint yet); zod 3 -> 4. - Jest -> Vitest + Testing Library + user-event. Add ESLint (typescript-eslint, react-hooks) and Prettier. npm audit: 80 vulnerabilities -> 0. - CI workflow now typechecks, lints, tests and builds on Node 22. The gh-pages deploy is removed; deployment is pm2 (ecosystem.config.cjs). 3D viewer - jscad-react pinned React 17 and is unmaintained. Replace it with src/viewer/: orbitView.ts (pure camera transitions), viewerEngine.ts (canvas, WebGL context, frame loop, outside React) and JscadViewer.tsx (pointer events with capture, pinch zoom, keyboard rotate/pan/zoom). The GL context is released on unmount. UI - Use tooltheme (vendored tarball; its repo is private) as an app shell: header, viewer, inspector of property rows, status bar. App.css mirrors the shell rules onto #root because tooltheme's shell only matches direct children of <body>. - Viewer colors come from tooltheme tokens and follow light/dark mode. - autoform.tsx is typed against zod 4. Fixes: int() fields reported MAX_SAFE_INTEGER as max, making the width slider unusable; clearing a number box and retyping produced e.g. "1042". Geometry - Corner radius now works: vertical edges are rounded by extruding rounded rectangles, with inner outlines inset so walls stay even. Previously the setting was ignored. - Small boxes with thick walls no longer fall back to a 1mm cube: the lid insert becomes solid, or is dropped, when there's no room for it. - Box logic moved from App.tsx to box.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
ecosystem.config.cjs. It's a static site, so pm2 checks out the repo on josh.earth and runsnpm ci && npm run build; nginx serves/projects/boxbuilder/current/distat/boxbuilder/.npm auditgoes from 80 vulnerabilities to 0.jscad-react(pinned to React 17, unmaintained) is replaced bysrc/viewer/, built on@jscad/regl-renderer. It supports mouse, touch (pinch) and keyboard (arrows, shift+arrows,+/-).Bugs fixed along the way
.int()reportsMAX_SAFE_INTEGERas its max, which made the width slider unusable (regression test added).<tr>without<tbody>.Before merging / deploying
vendor/joshmarinacci-tooltheme-0.1.0.tgzbecause its GitHub repo is private. Merging puts its CSS, JS helpers and examples in this public repo. Switch to the npm package once it's published./projects/boxbuilder/current/dist. The old GitHub Pages deploy is removed; CI now only checks.src/App.csscopies tooltheme's shell layout onto#root. It can shrink if tooltheme learns to attach its shell to a container.Known issues, not changed here
width − wall thickness). The README describes it as it is. Worth deciding whether walls should be the full value.Testing
npm run typecheck,npm run lint,npm test(35 tests across box geometry, camera math, URL state, the viewer and the form),npm run build: all pass.pm2 deployagainst josh.earth.🤖 Generated with Claude Code