Openings now host on the walls a roof segment generates — the base
walls under the roof and the coplanar gable/shed/gambrel end faces, so
a window can sit in a gable pediment.
- core: roof-segment-walls.ts models the four vertical faces as 2D
frames (u along face, v height) with convex profile polygons that
mirror the wall volume getRoofSegmentBrushes builds; rect-in-profile
clamping and anchored resize limits via half-plane algebra.
- schemas: optional roofSegmentId on door/window; position is the
segment-local wall mid-plane center, rotation[1] the face yaw.
- cut: reuses capabilities.roofAccessory.buildCut; new cutScope: 'wall'
subtracts from the wall brush only. cascadesViaHostSegment keeps the
roof-merge loop from consuming door/window dirty marks (their own
systems cascade via parentId).
- tools: roof:* handlers in door/window tool + move-tool (the Build-tab
preset path), with roofSegmentId cleared/restored across every
roof<->wall re-anchor and revert; shared hit resolver normalizes
normals through world space (merged mesh vs painted segment frames).
- fix: RoofSystem no longer rebuilds per-segment CSG in accessory-reveal
mode — the uncut rebuild used to draw over the merged shell's fresh
opening until deselect.
- fix: the walkthrough collider world now prunes by renderer-effective
visibility; stale uncut segment CSG inside the hidden segments-wrapper
blocked the player at openings the merged shell had cut through.
Known gap: painted segments render per-segment CSG without accessory
cuts (pre-existing, also affects skylight/dormer). Twice Codex-reviewed;
details in private-editor plans/editor-roof-wall-openings.md.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The site ground collider was sized to the scene footprint with a 30 m
minimum — exactly the default site polygon, so one step past the site
boundary left nothing under the character controller and the player
fell into the void. The ground collider now extends 2 km (still a
single BVH box) so the ground plane acts unbounded, and a respawn net
in the first-person frame loop recovers the controller if it ever ends
up below every collider (e.g. scenes with no site node), preferring the
live spawn node over the mount-time start position.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- registry: getRoofAccessoryKinds() enumerates kinds declaring the
roofAccessory capability, in deterministic builtin-list order (mirrors
getSelectableKinds); exported from the registry barrel.
- apps/editor build-tab: a "Features" group under the Roof tile, discovered
from the registry (no DB) and activating each kind's roof-attach tool —
parity with the community editor's roof features.
- site-boundary-editor: hide the flag handle group around thumbnail captures
(they render on SCENE_LAYER so the thumbnail camera can't layer-filter them),
matching handle-arrow.tsx — keeps flags out of preset/snapshot thumbnails.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two gaps in the first-person walkthrough collider world:
- The visible default ground is the site node's mesh, but `site` is a
`site`-category node and excluded from the generic collider sweep. The
per-level fallback floor only fires for a level without a slab, so a
spawn on the bare ground (no slab) had no floor and fell through. Add a
dedicated site-ground collider derived from node data (not the rendered
mesh, so it's immune to geometry-mount timing) covering the scene
footprint at the site's ground plane.
- Ceilings are `structure`-category and were swept in as colliders, so the
player was held up as if standing on a floor slab. Exclude nodes whose
registry `surfaceRole` is 'ceiling' so the player passes through them
(they're a transparent mount surface for lights/fans), while walls,
slabs and stairs keep colliding.
Adds tests for both behaviors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
npm version triggers npm install which fails on peer dependency
resolution in workspace monorepos. Use jq for version bumping instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bump devDependencies in package.json: @biomejs/biome ^2.4.4→^2.4.6, turbo ^2.8.12→^2.8.15, ultracite ^7.2.4→^7.2.5. Regenerate bun.lock to reflect these updates and related transitive changes (e.g. @clack, glob, path-scurry/minipass, minimatch).
Adds a Preview button next to Radio Pascal that switches the editor
into a viewer-like experience without leaving the page. The preview
mode swaps in the viewer's selection manager (hierarchical drill-down),
zone system, camera controls (left-click pan, auto-navigate), and
interactive item system while hiding editor-only UI (tools, panels,
sidebar, grid). Back arrow in the viewer overlay returns to the editor.
Also widens the default sidebar from 288px to 432px for better
project title visibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Enable EDITOR_LAYER on R3F raycaster for proper hit detection
- Fix polygon editor drag using refs and direct position passing
- Handle pointercancel events and fix pointerId access in polygon editor
- Fix slider undo by reverting to start value before resuming temporal state
- Allow grid:move during camera drag so polygon editor works while panning
- Bump better-auth to ^1.5.2 and turbo to ^2.8.12
- Remove explicit return type on createAuth for better inference
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add audio feedback for item placement by importing sfxEmitter and emitting 'sfx:item-place' in DoorTool and WindowTool. This change triggers a placement sound when a door or window node is created, improving UX by confirming successful placement.
Make the gl prop synchronous and move/await renderer initialization inside the post-processing component. index.tsx: remove async gl factory and the await renderer.init() so renderer is created synchronously. post-processing.tsx: add isInitialized state, an async initRenderer that calls renderer.init(), and guard post-processing setup until init completes (with mounted cleanup and updated effect deps). This ensures the WebGPU renderer is fully initialized before building the render pipeline and avoids using an async gl factory.
Upload files directly to Supabase Storage via signed URLs, bypassing
the Next.js 100MB body size limit. Supports scans up to 200MB with
real-time progress tracking that persists across sidebar panel switches.
- Add Zustand upload store for persistent upload state
- Add createAssetUploadUrl/confirmAssetUpload server actions
- Add XHR-based upload orchestrator with progress events
- Scene node creation works even if sidebar panel unmounts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Store showScans/showGuides preferences per project so toggling
persists when switching between projects
- Apply showGuides/showScans directly on guide and scan renderer groups
- Set projectId in both editor and viewer pages on mount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add reusable ActionButton component with tooltip and shortcut display
- Add keyboard shortcuts dialog in settings panel
- Fix ButtonProps import error (derive type from Button component)
- Fix AnyNodeId type mismatch in tree-node-actions visibility toggle
- Various UI refinements across action menu, sidebar, and editor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validates all required env vars at runtime with zod schemas.
Skips validation during build via SKIP_ENV_VALIDATION flag.
Replaces scattered process.env access with typed env imports.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Turbo was stripping env vars during build on Vercel. Added all required
vars to turbo.json build task. Also hardened Supabase and BetterAuth
init with fallback placeholders for build-time safety.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses Next.js instrumentation.ts to ensure the Supabase "avatars"
bucket exists on first boot — no manual setup needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Avatar upload to Supabase Storage with pencil overlay in settings
- Show username initials as avatar fallback (instead of name initials)
- Round avatar in navbar (rounded-full with natural shadow)
- Connected Accounts section in settings showing Google status
- Connect Google directly from settings without signing out
- Add Vercel Analytics, Speed Insights, and Toolbar
- Update page title to "Pascal Editor"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move account linking config out of Google conditional so it's always active
- Trust both 'google' and 'email' providers for automatic account linking
- Add lastLoginMethod plugin to track how users last signed in
- Show "Last signed in with Google/email link" hint in sign-in dialog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Defer database client creation until first use via Proxy so Next.js
builds succeed without POSTGRES_URL and SUPABASE_URL env vars present.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Google OAuth sign-in alongside magic link authentication
- Username onboarding: require username selection after first sign-in
- Public profile pages at /u/[username] with social links (GitHub, X)
- Settings page for managing username and social links
- Viewer header: unified floating card with project name, @username, breadcrumb
- Guest CTA on viewer page prompting sign-in
- Show owner avatar + username on community project cards
- Redesigned project cards (larger preview, avatar + stats row below)
- Consistent navbar across hub and profile pages with GitHub link
- Footer with links to GitHub repo and npm packages
- Borderless design with natural shadows throughout
- Apple corner smoothing (squircle) progressive enhancement
- cursor:pointer globally on buttons and links
- DB migrations: username, github_url, x_url columns on auth_users
- Root-level db:generate/migrate/push/studio scripts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move supabase/ from packages/db/ to repo root for simpler CLI usage
- Use custom ports (553xx) to avoid conflicts with other local Supabase instances
- Add --env-mode=loose to turbo dev so root .env vars reach Next.js
- Remove hardcoded --port 3000 from next dev (reads PORT env var instead)
- Add .env.example with Supabase env var placeholders
- Add supabase local state dirs to .gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reuse the shared PolygonEditor for slab boundary editing with levelY
and surfaceHeight support. Handles render as 3D cylinders that adapt
to slab thickness. Prevent deselection after drag by suppressing
grid:click propagation, and reset preview state on undo/redo.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ceiling and slab tools: switch cursor tracking to per-frame raycasting onto a level plane (useFrame) instead of relying on grid:move events, and memoize Raycaster/Plane to reduce allocations. Update line geometry updates to be performed imperatively from the frame loop, ensure previews only trigger React updates when the snapped display position changes, and keep cursor/preview snapping consistent with user-visible pointer. Add sceneRegistry-based fallback to resolve a level's Y position (used by Grid, CeilingTool and SlabTool) when the level mesh isn't registered yet, computing Y from level node data and viewer levelMode. Misc: import/add necessary three.js types and small refactors to visibility/reset logic.
Replaces usage of the Asset type with AssetInput across editor components and hooks for consistency with core types. Adds default dimensions fallback for asset placement logic. Refactors UI primitives (button, sidebar, opacity control) to support forwarding refs and asChild prop, and updates imports for primitives. Updates Radix UI dependencies in package.json and bun.lock.