Commit Graph
578 Commits
Author SHA1 Message Date
wass08 1117e0cb5f prevent 0m long wall creation #103 2026-02-26 09:56:50 +09:00
09e212ad40 feat: Esc exits build mode back to select mode (#120)
When in build mode, pressing Escape now switches back to select mode
in addition to canceling any in-progress tool operation.

Requested by Julien.

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-25 18:25:12 -05:00
48d5091bb3 UX polish: selection behavior, styling, and site panel improvements (#119)
* Remove .env.local guard; add portless dep

Remove the check that blocked a local .env.local in apps/editor's dev script and simplify the dev startup to source the root .env. Add portless@^0.4.2 to the project dependencies in package.json. Lockfile updated accordingly.

* Improve tool cursors, previews, and contextual tools

Revamp editor tool visuals and behaviour: replace mesh cursors with a new CursorSphere Group (adds ground marker, vertical indicator and optional tool icon tooltip), unify preview colors to #818cf8, add ground-level previews and ghost lines for ceiling and roof tools, and update slab/zone/wall visuals to match. Add automatic build-mode switching and contextual highlighting for structure tools via a new useContextualTools hook, and relax action-menu visibility checks so tool rows are shown even when not in build mode. Minor typing/import adjustments and small opacity/placement tweaks across multiple tool components.

* Keep tools active and refine action-menu styles

Stop auto-deactivating tools in RoofTool and ZoneTool by removing setTool(null) (and setMode('select') in roof). Add hasActiveTool checks and small layout padding to FurnishTools and StructureTools, and update button classes to improve visual emphasis: smoother transitions, stronger active rings/scale, and dimming/grayscale of non-active tools when another tool is active. These changes improve UX by keeping the selected tool active and giving clearer visual feedback in the action menu.

* Improve selection behavior and refresh UI styling

SelectionManager: add global enter/leave/double-click handlers to support cross-phase hovering and auto-switching into structure/furnish on double-click; normalize click handling (explicitly coalesce shiftKey). Remove per-strategy enter/leave listeners.

UI panels & controls: unify and modernize styles across many panels (ceiling, door, item, reference, roof, slab, wall, window) and action buttons — rounded-md, neutral borders, subtle shadows, translucent headers and consistent hover/focus states. Update view toggles icons and toggle styling.

NumberInput: integrate @number-flow/react NumberFlow for formatted value display, add visual drag progress indicator and refine input/label interactions and styling.

Sidebar: replace rename-popover with inline-rename-input and update tree nodes to use inline editing. Add slider-demo and tweak slider implementation. Update package.json accordingly.

* Use Barlow font across editor UI

Add the Google Barlow font and expose it as a CSS variable, update theme font variables in globals.css, and apply the new font across the editor UI. Imports: add Barlow in app/layout.tsx and include its variable on <html>, set body to use font-sans. Apply font-barlow or font-mono classes to headings, labels, numeric readouts and buttons across multiple panels and primitives to standardize typography. Also update button base variant to include font-barlow. Remove the PhaseSwitcher component and its import/usage from the action menu.

* Replace button wrapper with div in LevelItem

Replace the outer <button> around the LevelItem content with a <div> to avoid nesting interactive button elements (and the resulting invalid HTML/interaction issues). Preserves the original classes and onClick/onDoubleClick handlers so behavior remains the same and allows the PopoverTrigger/button children to function correctly.

* Refine site panel list styles and spacing

Update the SitePanel and TreeNode UI to use compact, border-bottom list rows instead of rounded, card-like items. Simplified active/hover states to use bg-accent variants and reduced shadow/ring styles for a cleaner look. Adjusted paddings (pl/px/py) and container layouts (many sections switched to flex-col) and increased tree node indent/paddingRight for consistent alignment. These changes unify spacing and visual hierarchy across levels, buildings, zones and tree nodes.

* Add auto-scroll to selected items and refine icon styles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:05:02 -05:00
94e5f37983 fix: create project-thumbnails bucket in instrumentation.ts (#118)
The thumbnail upload (uploadProjectThumbnail) writes to a
'project-thumbnails' storage bucket, but instrumentation.ts only
bootstrapped the 'avatars' bucket.  This caused:

  Upload failed: Bucket not found

Add the missing bucket creation with matching constraints (public,
10 MB limit, image/png only).  Also refactor the bucket-exists check
to use a Set so it scales cleanly as more buckets are added.

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-25 12:22:10 -05:00
Wassim SAMADandGitHub 157b323c0d Merge pull request #117 from pascalorg/feat/polish-editing-experience
Feat/polish editing experience
2026-02-25 16:13:20 +09:00
wass08 d3ef5fc08a door panel 2026-02-25 16:10:21 +09:00
wass08 ced76b0475 fix placement 2026-02-25 15:21:19 +09:00
wass08 b114e60df7 fix hinge + materials 2026-02-25 14:50:17 +09:00
wass08 7608cad748 nice progress on doors 2026-02-25 14:05:32 +09:00
wass08 27e4afb757 draft custom door 2026-02-25 13:28:42 +09:00
wass08 d9317bfba2 automated thumbnail + position enhancement 2026-02-25 12:43:14 +09:00
wass08 4be3291d64 vertical line ceiling 2026-02-25 10:46:41 +09:00
wass08 53ed21ba0b fixed ceiling item not selectable in viewer 2026-02-25 09:33:31 +09:00
wass08 8a0c7d31cc default scale top grid ceiling for viewer 2026-02-25 09:28:47 +09:00
wass08 31927da543 event handlers for ceiling 2026-02-25 09:25:00 +09:00
wass08 c53f1f9679 ceiling system + reveal/hide 2026-02-25 08:59:04 +09:00
wass08 9b9398c5ff remove ceiling from depthcalc 2026-02-25 07:35:03 +09:00
Wassim SAMADandGitHub 2182fe535d Merge pull request #116 from pascalorg/fix/community-feedback-pass-3
Fix/community feedback pass 3
2026-02-24 16:17:44 +09:00
wass08 aee8ac5e76 fix build 2026-02-24 16:16:07 +09:00
wass08 63cf407cac persist viewer preferences 2026-02-24 16:13:37 +09:00
wass08 14708c041a fix tools visibility 2026-02-24 16:09:03 +09:00
wass08 81ede241d5 save site + camera build position 2026-02-24 14:48:59 +09:00
Aymeric RabotandGitHub db05c86120 Add scene graph viewer and persist migration (#115)
Render an interactive Scene Graph in the Settings panel using @visual-json/react. Introduces SceneNode/SceneGraphNode types and buildSceneGraphValue to build a tree (handles missing nodes and cycles), and adds handlers to block drag/drop/context/delete mutations inside the viewer. Adds @visual-json/react to apps/editor package.json and updates the dev script to forbid .env.local and source the root .env instead. Also adds a persistence migration in use-scene to preserve existing nodes and rootNodeIds when the persist version changes.
2026-02-24 00:40:18 -05:00
5781e98270 feat: add YouTube social link to user profiles (#114)
* feat: add YouTube social link to user profiles

- Add youtube_url column to auth_users schema
- Add DB migration for the new column
- Update updateProfile action with YouTube URL validation
- Update getUserProfile and getPublicProfile to include youtubeUrl
- Add YouTube input field to settings page
- Display YouTube icon on public profile pages

* fix: use drizzle-kit generate for youtube_url migration

Replaces manually created migration with proper drizzle-kit generated
migration that includes meta snapshot and journal entry.

---------

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-24 05:38:40 +00:00
wass08 0863f5e632 fix z-index viewer 2026-02-24 13:07:53 +09:00
wass08 0dea6a2205 fix zones in viewer too 2026-02-24 13:06:45 +09:00
wass08 db81a62722 fix radio 2026-02-24 12:46:33 +09:00
wass08 28b44fe92d fix zones 2026-02-24 12:46:27 +09:00
wass08 20f5f7ab4a fix wall elevation with slab holes 2026-02-24 10:27:51 +09:00
wass08 3791739b5b mark nodes as dirty after deletion 2026-02-24 08:19:49 +09:00
wass08 5deb0b363e fix render priority for item-system 2026-02-24 07:47:03 +09:00
c476d30303 feat: enhance feedback form with image upload, user/project context, and scene graph (#113)
* feat: enhance feedback form with image upload, user/project context, and scene graph

- Add invisible drag-and-drop zone that reveals on hover+drag with dashed border overlay
- Multi-image upload (max 5, max 5MB each) to Supabase Storage feedback-images bucket
- Subtle attach button + thumbnail previews with remove on hover
- Auto-capture authenticated user email/name from Better Auth session
- Pass projectId from editor context
- Snapshot scene graph (nodes + rootNodeIds) on submit
- DB migration adds user_email, user_name, project_id, images (jsonb), scene_graph (jsonb) columns
- Storage bucket + RLS policies for public read / service role write

* refactor: use existing user_id FK instead of denormalized email/name columns

Removed user_email and user_name — the user_id already links to the users table.
Simpler schema, no data duplication.

* fix: guard against undefined in removeImage

* refactor: direct Supabase Storage upload via signed URLs

Bypass Vercel's 4.5MB serverless body-size limit by uploading images
directly from the client to Supabase Storage.

- New createImageUploadUrls server action generates signed upload URLs
- Client PUTs files directly to Supabase (no bytes through Vercel)
- submitFeedback now receives only image paths, not FormData with files
- No migration changes needed (existing RLS policies support signed URLs)

* fix: remove relative class that broke dialog centering

twMerge was replacing the Dialog's fixed positioning with relative,
pushing the dialog to the bottom of the viewport.

---------

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-02-22 23:52:42 -05:00
Wassim SAMADandGitHub c0a7fd8067 Merge pull request #112 from pascalorg/fix/community-feedback-pass-2
Fix/community feedback pass 2
2026-02-23 12:42:54 +09:00
wass08 49c4794ecb fix item scale surface 2026-02-23 12:41:55 +09:00
wass08 6581e25e9f handle better item scales 2026-02-23 11:11:22 +09:00
wass08 d15f601107 item scale 2026-02-23 10:59:42 +09:00
wass08 3894d7c8bf fixing system orders for ensuring level calculation comes last 2026-02-23 09:08:15 +09:00
wass08 4555325389 fix wall items wrong level + elevation 2026-02-23 08:43:38 +09:00
wass08 16ba5bf9c6 fiix adjacent walls pushed up 2026-02-23 08:22:06 +09:00
Wassim SAMADandGitHub b9c28a627e Merge pull request #110 from pascalorg/fix/community-feedback-pass
Fix/community feedback pass
2026-02-23 07:42:18 +09:00
wass08 373d9310ee fix build 2026-02-23 07:41:17 +09:00
wass08 9129a5b847 doesn't work, removing it 2026-02-23 07:28:03 +09:00
wass08 3cf133e832 try adding vercel.json 2026-02-23 07:27:07 +09:00
wass08 5edd5e4235 trying to fix build 2026-02-20 20:12:39 +09:00
wass08 66b4efba09 fix build 2026-02-20 19:45:15 +09:00
wass08 c58d5ab535 level height 2026-02-20 19:33:59 +09:00
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