Commit Graph
29 Commits
Author SHA1 Message Date
Aymeric RabotandClaude Opus 4.6 48979ec014 fix raycaster layers, polygon drag, slider undo, and grid events
- 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>
2026-03-03 14:41:19 -05:00
Aymeric Rabot 2ddf10f3f0 Play SFX when placing doors and windows
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.
2026-02-28 01:39:35 -05:00
Aymeric Rabot 7dde5dc578 Update ground-occluder.tsx 2026-02-28 01:34:41 -05:00
Aymeric Rabot 5077011c26 Initialize WebGPU renderer before post-processing
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.
2026-02-27 14:28:31 -05:00
Aymeric RabotandClaude Opus 4.6 64de2a8e63 feat(editor): direct-to-Supabase uploads with progress for large scans
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>
2026-02-27 14:19:06 -05:00
Aymeric RabotandClaude Opus 4.6 77f41ba8b7 fix(db): add missing drizzle metadata for storage buckets migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 13:15:21 -05:00
Aymeric Rabot 18307761b5 Revert "chore(editor): remove instrumentation.ts bucket creation logic"
This reverts commit da3168ccb8.
2026-02-27 12:58:18 -05:00
Aymeric Rabot da3168ccb8 chore(editor): remove instrumentation.ts bucket creation logic
Made-with: Cursor
2026-02-27 12:43:09 -05:00
Aymeric Rabot efa97444f6 fix(db): create missing storage buckets in migration
Made-with: Cursor
2026-02-27 12:39:59 -05:00
Aymeric RabotandClaude Opus 4.6 31c09bacdd Fix scan/guide visibility with per-project preferences
- 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>
2026-02-27 01:38:10 -05:00
Aymeric RabotandClaude Opus 4.6 d0e0fe7e1e UX polish round 4: action button component, keyboard shortcuts dialog, and build fixes
- 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>
2026-02-27 01:19:13 -05:00
Aymeric Rabot 659c01052e Update .gitignore 2026-02-19 15:43:44 -05:00
Aymeric RabotandClaude Opus 4.6 867681e1da feat: add env.mjs for centralized env validation (t3-env)
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>
2026-02-19 01:47:36 -05:00
Aymeric RabotandClaude Opus 4.6 4c0d0885a3 fix: declare env vars in turbo.json so Vercel build receives them
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>
2026-02-19 01:45:09 -05:00
Aymeric RabotandClaude Opus 4.6 48397917a9 feat: auto-create avatars storage bucket on server startup
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>
2026-02-19 01:41:48 -05:00
Aymeric RabotandClaude Opus 4.6 23a71c376f feat: avatar upload, connected accounts, round navbar avatar, Vercel analytics
- 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>
2026-02-19 01:40:17 -05:00
Aymeric RabotandClaude Opus 4.6 b53cb984eb chore: add missing feedback migration to match remote
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-19 01:32:02 -05:00
Aymeric RabotandClaude Opus 4.6 6f7613818b feat: account linking for magic link + Google, last login method hint
- 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>
2026-02-19 01:29:30 -05:00
Aymeric RabotandClaude Opus 4.6 a0ac904dfc fix: lazy-init Supabase and Drizzle clients for build compatibility
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>
2026-02-19 01:21:41 -05:00
Aymeric Rabot d6e6954877 Update .gitignore 2026-02-19 01:19:52 -05:00
Aymeric RabotandClaude Opus 4.6 62dde6ef5a feat: add Google OAuth, user profiles, community hub improvements
- 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>
2026-02-19 01:04:37 -05:00
Aymeric Rabot 40c1c9f651 Update .gitignore 2026-02-18 15:44:45 -05:00
Aymeric Rabot e2ecbf48da Create drizzle.config.ts 2026-02-18 01:51:17 -05:00
Aymeric RabotandGitHub 8f70e8b53e Merge pull request #99 from pascalorg/feat/refactor-supabase-setup
Refactor Supabase setup and fix local dev ports
2026-02-18 01:49:05 -05:00
Aymeric RabotandClaude Opus 4.6 aa27e0dd7a refactor: move supabase config to repo root, fix port and env setup
- 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>
2026-02-18 01:48:53 -05:00
Aymeric RabotandClaude Opus 4.6 7a871be792 Add slab polygon editing with drag, add, and delete vertices
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>
2026-02-07 14:49:53 -05:00
Aymeric Rabot 31a560e2c5 Use raycast cursor & level Y fallback
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.
2026-02-07 11:58:17 -05:00
Aymeric Rabot 6c99851006 Refactor asset types and improve UI primitives
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.
2026-01-30 22:01:25 -05:00
Aymeric Rabot 5b0682ea54 Update bun.lock 2026-01-30 17:32:05 -05:00