Commit Graph

16 Commits

Author SHA1 Message Date
Jeff Emmett 84c3c318d8 feat: async 3D gen, calendar reminder widget, cross-module drag, subdomain URL fixes
- Make /api/3d-gen async with job queue + email notification on completion
- Add reminder mini-calendar widget to canvas (top-right on shape select)
- Make items draggable across 6 modules (rNotes, rTasks, rFiles, rSplat, rPhotos, rBooks)
- Upgrade rCal drop handler with time-picker popover instead of confirm()
- Show reminder indicators (dots + badges) on calendar days
- Fix subdomain routing: remove space slug from server-rendered sub-nav,
  tab bar, and module links in production (/{moduleId} not /{space}/{moduleId})
- Add buildSpaceUrl() helper for correct external URL generation
- Fix rcart payment URLs for subdomain routing
- Fix rSchedule email links to use subdomain format

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 22:18:51 +00:00
Jeff Emmett 55b47901ab fix(rsplat): use fal.ai queue API to avoid timeout on Hunyuan3D
Synchronous fal.run endpoint times out for textured mesh generation.
Switch to queue.fal.run submit/poll/result pattern with 5-minute
deadline. Update client progress phases for longer generation time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 14:46:30 -07:00
Jeff Emmett 26c1e72bb1 feat(rsplat): switch to Hunyuan3D v2.1 for reliable image-to-3D
SAM 3D was designed for object segmentation, not full-scene
reconstruction — failed on arbitrary images. Hunyuan3D v2.1 produces
high-quality textured GLB meshes from any single image reliably.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 14:37:57 -07:00
Jeff Emmett 0f1090db44 feat(rsplat): switch AI generation from Trellis 2 to SAM 3D
SAM 3D outputs native Gaussian splat .ply files (rendered via existing
initSplatViewer) instead of GLB meshes, with full-scene support including
people and backgrounds. Faster generation (5-30s vs 45-75s), $0.02/gen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 14:03:39 -07:00
Jeff Emmett cf93b33c8b feat(rsplat): add % progress bar for 3D generation, fix auth token lookup
Replace indeterminate sliding animation with a realistic percentage fill
bar using logarithmic curve (asymptotes at 95%, based on ~60s typical
Trellis 2 timing). Jumps to 100% on completion.

Fix "sign in to save" showing for authenticated users by checking both
localStorage and cookie for auth token, and improving the 401 message
to "Session expired" when a token exists locally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 13:02:38 -07:00
Jeff Emmett 21b1e8fa0a feat(rsplat): image staging endpoint, viewer improvements, SW updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:24:40 -07:00
Jeff Emmett d008b78727 fix(rsplat): save-to-gallery, remove broken media upload, fix leaks
- Add POST /api/splats/save-generated so AI-generated 3D models persist
- Add "Save to Gallery" button in viewer after AI generation
- Remove non-functional "Upload Photos/Video" tab (no processing worker)
- Add 120s server-side timeout on fal.ai Trellis 2 fetch
- Fix GLB viewer memory leak (animation loop + resize listener on disconnect)
- Show elapsed time + phase messages during generation progress
- Bump CSS v3, JS v4 cache versions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 00:56:33 -07:00
Jeff Emmett 8a82223b6f fix: remove deprecated PWA meta tag, add 3D gen timeout, quiet WS errors
Remove apple-mobile-web-app-capable (redundant with manifest.json display),
add AbortController timeout + 524 handling for /api/3d-gen fetch, and
downgrade CommunitySync WS error to console.warn since reconnect is automatic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 22:23:00 -07:00
Jeff Emmett c233f1338b fix(rsplat): use three/addons/ import path to match importmap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 17:18:19 -07:00
Jeff Emmett c5f757d050 fix(rsplat): resize images client-side before 3D generation, pass through fal.ai errors
Mobile photos (12MP+) were causing generation failures due to large base64 payloads.
Now resizes to max 1024px before sending. Server now returns actual fal.ai error
messages instead of generic "3D generation failed".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 16:56:35 -07:00
Jeff Emmett ccca8318a3 feat: payment email notifications, GLB viewer, and EncryptID email lookup
- Add EncryptID internal endpoint for email lookup by userId
- rcart: send "Payment Sent" to payer and "Payment Received" to recipient
- rcart: resolve emails via EncryptID when not provided in request
- rsplat: add GLB/GLTF 3D viewer using Three.js GLTFLoader
- rsplat: enable publicWrite for photo uploads without space membership
- docker-compose: add SITE_URL and SPLAT_NOTIFY_EMAIL env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 04:02:07 +00:00
Jeff Emmett d79d560771 feat(rsplat): interactive demo scenes + AI image-to-3D generation
Replace fake demo data with real HuggingFace CDN Gaussian splats (train,
truck, garden) that open in an inline 3D viewer without server round-trips.
Add "Generate from Image" tab that sends images to fal.ai Trellis for
AI-powered 3D model generation. Add gallery header and progress UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:29:15 -07:00
Jeff Emmett 31b088543e feat: add ViewHistory for in-app back navigation, rename rWork to rTasks
Add shared ViewHistory<V> utility class that provides a proper navigation
stack for rApps with hierarchical views. Replaces hardcoded data-back
targets with stack-based back navigation across 10 rApps: rtrips, rmaps,
rtasks, rforum, rphotos, rvote, rnotes, rinbox, rschedule, rcart.

Rename rWork module to rTasks — directory, component (folk-tasks-board),
CSS, exports, domains, and all cross-module references updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:04:13 -07:00
Jeff Emmett 4cc420d0f6 feat: wire offline-first Automerge sync to all 13 rSpace modules
Add shared RSpaceOfflineRuntime singleton that coordinates IndexedDB
persistence (EncryptedDocStore), WebSocket sync (DocSyncManager), and
in-memory Automerge docs (DocumentManager) for all module web components.

- Phase 0: runtime.ts singleton, shell integration, beforeunload flush
- Phase 1: rstack-offline-indicator status dot in shell header
- Phase 2: service worker stale-while-revalidate for API GETs + offline fallback
- Phase 3: storage-quota.ts with LRU eviction (30d) and quota warnings (70%)
- Phase 4: Tier 1 single-doc modules (rFlows, rCal, rBooks, rSplat)
- Phase 5: Tier 2 multi-doc modules (rNotes, rWork, rInbox, rVote, rTrips, rFiles)
  with doc-list-request/response wire protocol for document discovery
- Phase 6: Tier 3 special cases (rCart hybrid, rForum global doc, rSchedule)

Data now loads instantly from IndexedDB, syncs via WebSocket when online,
and remains browsable offline. rNotes migrated from inline Automerge WS
to shared runtime. All modules fall back to REST when runtime unavailable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:07:59 -08:00
Jeff Emmett 75b148e772 Merge branch 'dev'
# Conflicts:
#	modules/rcal/mod.ts
#	modules/rfiles/mod.ts
#	modules/rforum/mod.ts
#	modules/rmaps/mod.ts
#	modules/rnetwork/mod.ts
#	modules/rswag/mod.ts
#	modules/rwork/mod.ts
#	shared/module.ts
2026-02-28 19:51:51 -08:00
Jeff Emmett 5613370817 refactor: rename module directories to match r-prefixed module IDs
All 22 module directories under modules/ now match their module IDs
(e.g. modules/cart → modules/rcart, modules/canvas → modules/rspace).
Updated all import paths, vite build config, HTML template asset refs,
docker-compose standalone commands, and .gitignore accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:49:26 -08:00