Commit Graph
347 Commits
Author SHA1 Message Date
wass08 d819249d07 fix level window tools 2026-02-20 18:34:49 +09:00
wass08 ce41228e58 fix level move / create item 2026-02-20 18:30:20 +09:00
wass08 33c81045bb duplicate item 2026-02-20 18:06:59 +09:00
wass08 96865a8ce7 window move tool + duplicate 2026-02-20 17:24:52 +09:00
wass08 4572c36da5 threejs version upgrade #91 2026-02-20 16:17:56 +09:00
88cdbc6806 fix: add Supabase branching safety check for preview deployments (#109)
- Removed 9 stale branch-specific env vars on Vercel that were locked
  to the deleted feat/refactor-supabase-setup branch
- Added runtime warning when a preview deployment detects it's using
  the production Supabase instance (branching skipped/misconfigured)

The root issue: Supabase branching only creates preview branches for
PRs that include migration changes. PRs without migrations get SKIPPED
and fall through to the generic env vars, which include 'preview' in
their targets and point to production Supabase.

To fully fix: configure Supabase branching to always create preview
branches, or remove 'preview' from generic Supabase env var targets
on Vercel (requires branching to be working first).

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-20 05:34:54 +00:00
557781950d fix: reduce autosave function invocation spam (25x anomaly) (#108)
* fix: reduce autosave function invocation spam (25x anomaly)

Root cause: useProjectScene() was mounted in BOTH editor/index.tsx
AND project-dropdown.tsx, creating duplicate zustand subscriptions
that each independently triggered saveProjectModel() server actions.

Combined with a 2-second debounce and the fact that each server
action also calls getSession() (another function invocation), active
editing was generating ~120+ invocations/minute.

Changes:
- Remove duplicate useProjectScene() from project-dropdown.tsx
- Increase autosave debounce from 2s to 10s
- Skip auto-save on initial scene load from server (was saving the
  scene right back after loading it)
- Add pending-save coalescing: changes during in-flight saves get
  batched into one follow-up save instead of queuing concurrently

* fix: flush unsaved scene to cloud on page exit / unmount

Adds two safety nets so the 10s debounce doesn't lose data:
- beforeunload listener: fires saveProjectModel() when the user
  closes the tab or navigates away externally
- cleanup flush on unmount: fires when navigating within the SPA
  (e.g. switching projects, going to settings)

Both are fire-and-forget — if the browser kills the request,
localStorage still has the data and will sync on next load.

* style: fix biome import ordering in project-dropdown

---------

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-20 05:01:59 +00:00
2dcb80554c feat: add terms, privacy pages, email notification preferences, and sign-in consent (#107)
- /terms — Terms of Service for editor + pascal.app platform
- /privacy — Privacy Policy (data collection, third parties, user rights)
- Email notification toggle in Settings (new column + migration)
- Sign-in consent text linking to terms/privacy
- Effective date: February 20, 2026

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-20 04:02:08 +00:00
f4f9f8a220 feat: add project visibility settings for scans and floorplans (#106)
- Add show_scans_public and show_guides_public columns to projects table
- Add visibility toggles to editor sidebar settings panel (auto-save)
- Add visibility toggles to project settings dialog (auto-save)
- Propagate settings to community viewer (hide scans/guides for non-owners)
- Add updateProjectVisibility server action
- Fix username onboarding dialog stuck after DB reset (validate update affected rows)
- Add error handling to UsernameGate for stale sessions

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-19 16:59:23 -05:00
AntonandGitHub ff85765728 fix: resolve react-doctor errors (hooks order, reduced motion, key prop) (#105)
- Move useCallback hooks before early return in ReferencesDialog
  to fix conditional hook call violation (Rules of Hooks)
- Add useReducedMotion hook and apply to all motion animations
  for WCAG 2.3.3 accessibility compliance
- Replace useEffect state reset with key prop on ItemCatalog
  for proper React reconciliation on category change
- Add global prefers-reduced-motion CSS media query

Fixes 4 react-doctor errors, bringing score from 81 to ~85+.
2026-02-19 19:20:05 +00:00
9a0f83a1ec feat: SEO improvements, OG image endpoint, favicon, and metadata (#104)
- Add dynamic OG image generation endpoint (/og) adapted from monorepo
- Replace favicon with monorepo version, remove unused icon.svg
- Add seo.ts config, robots.ts, sitemap.ts for better search indexing
- Add per-page metadata (editor, viewer, settings, profile, community)
- Remove stale package-lock.json that caused ENOWORKSPACES errors with Next.js
- Add OG fonts (Geist Regular, Plus Jakarta Sans SemiBold)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-19 13:38:34 -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 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
Wassim SAMADandGitHub 8603e8953f Merge pull request #100 from pascalorg/feat/window-editor
Feat/window editor
2026-02-18 16:31:05 +09:00
wass08 e8fcc840d5 surface placement 2026-02-18 16:26:17 +09:00
wass08 c0676f684e item surfaces 2026-02-18 16:06:23 +09: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
wass08 c816295e18 fix camera initial load 2026-02-18 14:39:41 +09:00
wass08 5d61e60f95 free mode for slabs and ceiling 2026-02-18 14:00:28 +09:00
wass08 586bd9f16c fix number input 2026-02-18 13:37:46 +09:00
wass08 47373eadef adjusting wall system + adding panel 2026-02-18 13:35:12 +09:00
wass08 be013d26e5 window panel 2026-02-18 13:14:55 +09:00
wass08 076faae7df window building 2026-02-18 10:41:12 +09:00
wass08 9a2c89547b feedback feature 2026-02-18 10:26:57 +09:00
wass08 1cceb50ab6 fix thumbnail issues 2026-02-18 09:49:57 +09:00
Anton Pascal 84e933f705 feat: add project name editing, remove address fields from settings
- Add updateProjectName server action
- Project settings dialog now shows editable name field
- Removed address editing section from settings (per Wassim's request)
- Privacy toggle and delete project remain
2026-02-17 23:07:38 +00:00
Anton Pascal ee30f17129 feat: rename properties to projects
- Rename all DB tables: properties → projects, properties_addresses → projects_addresses, properties_models → projects_models, property_likes → projects_likes
- Add projects_likes as proper Drizzle schema table (was SQL-only before)
- Rename ID prefixes: property_xxx → project_xxx
- Rename auth_sessions column: active_property_id → active_project_id
- Simplify project creation: address is now optional (no longer required to get started)
- Update all actions, stores, types, components, and routes
- Rename route: /editor/[propertyId] → /editor/[projectId]
- Add SQL migration for table/column/index/policy/function renames
- Update RPC functions: increment_project_views, get_project_like_count
- Update storage bucket reference: project-thumbnails
- All types/exports follow existing Drizzle patterns (pgTable, relations, zod schemas)
2026-02-17 20:40:52 +00:00
wass08 dd5f63df64 wall tool draft 2026-02-17 16:22:45 +09:00
wass08 13fd1848d1 polish catalog 2026-02-17 14:23:02 +09:00
wass08 101db7b34d free placement 2026-02-17 13:22:17 +09:00
wass08 d833245fbf esc key cancel tool 2026-02-17 12:29:00 +09:00
wass08 078b2500a3 handle thumbnails (manual) 2026-02-17 12:07:32 +09:00
wass08 144a2bd18f camera controls enhancement 2026-02-17 08:52:58 +09:00
wass08 06e6ccb88f fix nested button 2026-02-17 07:33:23 +09:00
wass08 3e10fd4c56 fix build 2026-02-16 14:43:09 +09:00
wass08 0b200bfe5d hub 2026-02-16 14:11:40 +09:00
wass08 66e8453db3 hub features 2026-02-16 13:43:19 +09:00
wass08 e6442ad473 adding missing sounds 2026-02-16 09:31:34 +09:00
wass08 052efea2cb polished placements 2026-02-16 09:12:04 +09:00
wass08 13070a5630 ceiling holes 2026-02-16 08:59:28 +09:00
wass08 0797a828f8 fix build issues 2026-02-12 10:56:56 +09:00
wass08 83cd28b01b clear selection when switching to build mode 2026-02-12 10:50:02 +09:00
wass08 cfa7b8bfc1 handle holes in spatial grid manager 2026-02-12 10:46:07 +09:00
wass08 29e7fa09ef slab holes 2026-02-12 10:41:37 +09:00