Commit Graph

447 Commits

Author SHA1 Message Date
Jeff Emmett f5b455f83c feat(rpubs): port full feature parity from rpubs-online
Flipbook preview (pdf.js + StPageFlip), saddle-stitch imposition
(pdf-lib), DIY print guides, email PDF, printer discovery (curated
+ OSM Overpass), rCart order/batch integration, publish panel with
Share/DIY/Order tabs. 5 new API routes, 6 new files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:55:10 -07:00
Jeff Emmett 77f2e9ae56 fix(rpubs): allow public PDF generation + fix zine auto-spawn
- Add publicWrite to rpubs module (PDF gen is computational, not a write)
- Fix zine auto-spawn: wait for community-sync-ready event instead of
  fragile 800ms timeout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:20:08 -07:00
Jeff Emmett d39c24c61b fix(rpubs): fix shadow root double-attach and PDF generate route
- Guard attachShadow with existing check to prevent crash on reconnect
- Fix API path: /pubs/api/generate → /rpubs/api/generate (module ID is rpubs)
- The "Unexpected non-whitespace character" error was HTML 404 parsed as JSON

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:14:16 -07:00
Jeff Emmett ae73e20c28 fix(rcal): fix Invalid Date crash + add reminder button to day detail
- folk-calendar: fix data-date format for prev/next month padding days
  (month=0 produced "2026--1-28" which split into NaN month → Invalid Date)
- folk-calendar: guard toJSON against invalid dates to prevent toISOString crash
- folk-calendar-view: add "+" button to expanded day detail panel
  with inline title input + time picker for creating reminders
- Styles for the add-reminder form matching existing dark theme

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 19:28:12 -07:00
Jeff Emmett 8ff3e83a12 feat(rcal): full-width spectrum bars + draggable map resize
Move temporal/spatial zoom bars to always-visible full-width position
above the calendar+map area. Replace fixed 400px map panel with
draggable resize handle (200-800px range). Responsive: handle hidden
and layout collapses to single column at ≤900px.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:45:33 -07:00
Jeff Emmett 02b9feb760 feat(rflows): overhaul river view with tap/faucet sources and trapezoid vessel funnels
Replace plain rectangles with tap/faucet SVG graphics for source nodes
(draggable valve handle, metallic gradients, animated water stream) and
trapezoid vessel shapes for funnel nodes (water fill, wave surface,
threshold markers, overflow lips with pour animations). Overflow pipes
now render as 3-layer bezier connections from vessel lips. Add amount
popover with date scheduling, event delegation for interactivity, and
rAF-throttled valve dragging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:23:33 -07:00
Jeff Emmett befd70c72b feat(rdata): add content tree view with search, tags, and sort
Adds a new Content Tree tab (default) to rData that indexes all Automerge
docs in a space. Includes /api/content-tree endpoint, folk-content-tree
web component with search, tag filtering, sort modes, expand/collapse,
and demo data fallback. Analytics moves to second tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:19:16 -07:00
Jeff Emmett 1827b34f6b fix(rcal): seed sample data for all spaces, not just demo
Auto-seed calendar sources and events on first visit to any space's
rcal page, and during space creation via seedTemplate hooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:14:17 -07:00
Jeff Emmett 93b7251054 fix(rvote): remove /demo route, use subdomain links consistently
Spaces are always subdomains — no path-based space routing or redirects.
Landing page demo links now point to demo.rspace.online/rvote.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:31:34 -07:00
Jeff Emmett 8d8ae7e351 fix(rvote): serve demo at demo.rspace.online/rvote instead of /rvote/demo
Extract demo body into renderDemoBody(), serve it from the / route when
space=demo (which is what demo.rspace.online/rvote resolves to via
subdomain routing). Legacy /demo path now 301-redirects to the canonical
demo.rspace.online/rvote URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:29:26 -07:00
Jeff Emmett 05459ec8a9 feat(rwallet): pagination, transaction tables, and reset view buttons
Paginated transfers endpoint (up to 3000 txs with exponential backoff),
collapsible incoming/outgoing transaction tables below visualizations,
and Reset View buttons on all three D3 charts (Timeline, Flow, Sankey).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:27:06 -07:00
Jeff Emmett f9fc0ca6ec feat(rvote): add QPR explanations and conviction voting simulator to demo
Add ELI5 cards (quadratic, reddit-style ranking, vote decay) and an
interactive conviction voting simulator with credit budget, quadratic
costs, proposal ranking, and promotion threshold progress bars.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:21:50 -07:00
Jeff Emmett 34ece96927 feat(rnotes): import converters for Evernote, Roam, file upload & sync
New converters: Evernote (.enex), Roam Research (JSON), generic file
import, and sync service. Enhanced existing Obsidian, Logseq, Google
Docs, and Notion converters. Updated import-export dialog, schemas,
and server routes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:53:57 -07:00
Jeff Emmett df489d698c feat(rsocials): newsletter editor with Listmonk integration
Full campaign editor with HTML body textarea, live iframe preview,
list selector with subscriber counts, save draft, send now, and
schedule send. Added edit/delete actions on draft campaigns and
GET/PUT/DELETE single-campaign proxy routes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:53:35 -07:00
Jeff Emmett 16b975cf5a fix(rvote): align demo page content with rvote.online
Match the standalone site's demo page: badge, title, description, loading
text, and CTA card for feature parity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:38:13 -07:00
Jeff Emmett 0c9b07525f feat(rsocials): merge Posts & Threads nav + Postiz API integration
Rename "Threads" to "Posts & Threads" in hub nav, route title, and subPageInfos.
Thread gallery now shows draft/scheduled posts from campaigns alongside threads.
Add Postiz API client (postiz-client.ts) with settings schema for URL + API key.
Proxy routes: /api/postiz/status, integrations, posts, threads.
Wire workflow executor to call real Postiz API for post/thread/cross-post nodes.
Add "Send to Postiz" button in thread builder (editor + readonly views).
Add approval queue: PendingApproval schema (v5), GET/POST /api/approvals routes,
wait-approval workflow node creates pending approvals and pauses execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 14:28:22 -07:00
Jeff Emmett ed8274961e chore(rsocials): rename Threads to Posts & Threads
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 14:19:41 -07:00
Jeff Emmett d4972453a3 feat(onboarding): add module-specific connect/import/create CTAs
Declarative onboardingActions on RSpaceModule lets each rApp define its
own onboarding cards (import, upload, link, create). renderOnboarding()
renders them as a responsive card grid with upload handling. Adds ICS
import endpoint to rCal (POST /api/import-ics). 15 modules wired up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 14:17:19 -07:00
Jeff Emmett 8741f5dbd5 feat(rnotes): add presence indicators on notebook cards and note items
Show colored dots on notebook cards and note list items indicating which
peers are currently viewing/editing. Uses existing presence message relay
with zero server changes — heartbeat every 10s, stale peer GC at 20s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:43:04 -07:00
Jeff Emmett ad9e54dbe9 refactor(rinbox): replace forwarding banner with popup modal
Convert inline forwarding banner to a click-triggered modal overlay.
Fix API field name bug (data.target → data.forwardsTo). Add email
input for no-email state with sovereignty messaging. Remove dismiss
logic in favor of modal open/close.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:15:53 -07:00
Jeff Emmett 42a84cb72e refactor(rsocials): consolidate threads + thread editor into single nav item
The thread gallery already has a "New Thread" button linking to the editor,
so a separate hub button and subnav pill for the editor is redundant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:11:24 -07:00
Jeff Emmett 88c6c70f9e fix(rmaps): add cache-busting version to JS/CSS script tags
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:56:35 -07:00
Jeff Emmett db61e54d7b feat(rmaps): mobile UX overhaul — floating FAB menu, self-marker, bottom sheet, privacy consolidation
- Fix QR code (replace broken Node.js import with api.qrserver.com API)
- Rename "Share Room" → "Share rMap" across UI
- Add "hidden" precision level replacing ghost mode toggle
- Unified 5-level privacy panel (Exact → Hidden/Ghost) as button list
- Pulsing blue dot self-marker (replaces emoji circle for own position)
- Locate-me FAB (bottom-left, both mobile and desktop)
- Mobile: edge-to-edge map, floating FAB menu with staggered animations
- Mobile: bottom sheet for participants (peek/expand with touch drag)
- Mobile: hide sidebar/controls/privacy panel, overlay compact nav bar
- Extract shared participant list helpers for desktop sidebar + mobile sheet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:23:41 -07:00
Jeff Emmett 1c93e3bb67 feat(rinbox): add email forwarding prompt banner and fix auth token reading
Replace broken encryptid-token localStorage reads with getAccessToken/getUsername
from rspace-header. Add forwarding status check against EncryptID API with
enable/disable/dismiss banner on mailboxes view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:23:01 -07:00
Jeff Emmett 15c118923b fix(spaces): match owner DID format in space list + resolve all TS errors
Space dropdown showed "Request Access" for the owner's own space because
the /api/spaces endpoint only checked claims.sub against ownerDID, missing
the did🔑 format used by auto-provisioned spaces. Now uses dual-check
matching the resolveRole helper pattern.

Also fixes 15 pre-existing TypeScript errors:
- server/index.ts: add Hono AppEnv type for context variables
- modules/rnetwork/mod.ts: cast tuple index to number for arithmetic
- modules/rsplat/folk-splat-viewer.ts: type CDN-loaded three.js as any
- modules/rtube/mod.ts: cast Uint8Array to BlobPart for FormData

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:11:32 -07:00
Jeff Emmett 73ad020812 fix(spaces): fix space creation routing and use /rspace URLs
Space creation was broken because the canvas module has id "rspace" but
all navigation URLs used "/canvas". On production subdomain routing this
resulted in 404s after creating a space.

- Switch create-space form from deprecated /api/communities to /api/spaces
- Replace all /canvas navigation URLs with /rspace to match module ID
- Fix DID matching in space listing to check both sub and did:key formats
- Add proper client DID support in EncryptID registration flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:07:01 -07:00
Jeff Emmett 8bd6e61ffc feat(rsocials): add campaigns dashboard with workflow thumbnail grid
New gallery landing page at /campaigns showing all campaign workflows as
cards with miniature SVG previews. Click a card to open the editor at
?workflow=<id>. Editor gains back-link to dashboard and workflow attribute
for deep-linking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:47:03 -07:00
Jeff Emmett 39ec09bb3b fix(compat): improve cross-browser support for Firefox, Safari, and older browsers
Add global polyfills for AbortSignal.timeout() (Safari <17, Firefox <122)
and crypto.randomUUID() (Safari <15.4, Firefox <95) in shell HTML templates.
Add -webkit-backdrop-filter prefix across 13 files for older Safari support.
Add Firefox scrollbar (scrollbar-width/scrollbar-color), range input
(::-moz-range-thumb/track), and color-mix() rgba fallbacks. Create shared
compat.ts utility module. Lowers browser floor from Safari 17/Firefox 122
to Safari 15.4/Firefox 95.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:43:38 -07:00
Jeff Emmett a736321189 feat(rnotes): add real-time Yjs collaboration, comments, and suggestions
Replace whole-content Automerge sync with character-level Yjs CRDT for
NOTE-type notes. Adds cursor presence, inline comments with threaded
replies, and track-changes suggesting mode.

- Custom Yjs WebSocket provider bridging over existing rSpace WS
- Server-side yjs-sync/yjs-awareness message relay (pure broadcast)
- y-indexeddb for offline persistence, periodic plaintext sync to Automerge
- Comment mark + panel with resolve/reply/delete
- Suggestion insert/delete marks with accept/reject support
- Schema v3→v4 (collabEnabled, comments fields)
- Collab toolbar: comment button, suggesting toggle, peer indicators

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:36:09 -07:00
Jeff Emmett 1f97a2ceba fix(smtp): use noreply@rmail.online as sender across all modules
Mailcow rejects noreply@rspace.online because the authenticated user
is noreply@rmail.online. Updated all SMTP_FROM and SMTP_USER defaults
to use rmail.online consistently: spaces invites, rSplat notifications,
EncryptID auth emails, and rCart payment receipts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 21:00:41 -07:00
Jeff Emmett d5d3f09b28 feat(rvnb): add (you)rVnB — community RV & camper rental module
Peer-to-peer RV/camper rentals within community trust networks.
Forked from rBnb with vehicle-specific concepts: specs, mileage
policies, pickup/dropoff locations, and dry humor throughout.

4 seed vehicles, full CRUD API, Leaflet map with pickup/dropoff
markers, rental request flow, endorsement tags including
"suspiciously_clean" and "smells_like_adventure".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 19:26:59 -07:00
Jeff Emmett 362bdd5857 fix(rchoices): move CrowdSurf under rChoices sub-nav, fix header overlap
- Hide CrowdSurf from app switcher (hidden: true) since it's now a
  sub-tab of rChoices
- Replace dead outputPaths (Polls/Results with no routes) with actual
  tabs: Spider Chart, Ranking, Voting, CrowdSurf
- Add /:tab route handler so sub-nav pills link to working URLs
- Component reads tab attribute for initial tab selection
- Remove internal .demo-tabs (shell sub-nav replaces them)
- Bump JS cache version to v=6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 17:43:18 -07:00
Jeff Emmett 383441edf7 feat(rchoices): inline CrowdSurf swipe cards with sortition
Replace CrowdSurf tab placeholder with working swipe-card interface
populated from rChoices session data (or demo fallback). Uses seeded
PRNG (mulberry32 + djb2 hash) for deterministic daily sortition per
user, preventing position bias. Right-swipe = approve (casts vote via
local-first client), left-swipe = skip. Swipe state persists in
localStorage across page reloads. Includes summary view with
session-grouped approvals and reset functionality.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 17:29:50 -07:00
Jeff Emmett 1811f5e7b4 fix(rchoices): bump JS cache version to v=5 for tab CSS fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 17:14:04 -07:00
Jeff Emmett 352ad33fff fix(rchoices): responsive tabs — icon-only on mobile to prevent overflow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 17:11:49 -07:00
Jeff Emmett d4c0fdf7eb fix(rsplat): stop polling on 404 when job lost after server restart
In-memory gen3dJobs are lost on container restart. The poll was silently
swallowing 404s and looping forever. Now stops after 3 consecutive 404s
with a clear "server restarted" message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:51:34 -07:00
Jeff Emmett b80275abcb fix(rchoices): fix tab overlap + show icons-only on mobile
Adds margin-top to demo-tabs to prevent overlap with shell nav.
Hides tab labels on narrow screens (<=480px), showing only icons
so all 4 tabs fit. Bumps JS cache to v=4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:47:10 -07:00
Jeff Emmett 2eb9ca2d8f fix(rsplat): use queue API for Hunyuan3D + fix controls z-index
Also fix canvas.html null reference crash when share-badge is stripped
by extractCanvasContent() header removal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:37:36 -07:00
Jeff Emmett 077bcf260a feat(rchoices): add CrowdSurf tab to choices dashboard
Adds a fourth sub-tab linking to the CrowdSurf module with teaser content.
Bumps JS cache version to v=3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:37:31 -07:00
Jeff Emmett dae8f72acb fix(rsplat): importmap must precede model-viewer module script
Browser ignores importmap when a <script type="module"> appears before it,
breaking Three.js imports and causing the 3D gen UI to hang at staging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:33:48 -07:00
Jeff Emmett 6b3fbd36b0 feat(rsplat): gallery thumbnails via model-viewer + fix 3D gen error handling
GLB models now render inline 3D previews using Google's <model-viewer> web
component with auto-rotate. AI-generated models show source image thumbnails.
Fixed fal.ai result fetch with retry logic and detailed logging for diagnosis.
Save flow now uses save-generated API with thumbnail_url passthrough.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:22:31 -07:00
Jeff Emmett 7da90088c4 fix(rsplat): fix GLB viewer not rendering on mobile
Defer initThreeViewer to next animation frame so the DOM has laid out
before reading container dimensions. Fall back to viewport size instead
of hardcoded 800x600 when container reports zero dimensions. Add proper
MIME types for GLB/GLTF file serving.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 23:15:24 +00:00
Jeff Emmett 2ea6fee951 feat: add CrowdSurf module — swipe-based community activity coordination
Implements the Crowdsurfing protocol (gospelofchange/Crowdsurfing) as an
rSpace module with full local-first Automerge CRDT sync. Users propose
activities with commitment thresholds, others swipe to join and declare
contributions, and activities trigger when enough people commit.

Module includes schemas, local-first client, swipe UI dashboard with
pointer gesture detection, landing page, seed template data, and
Vite build integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 23:12:19 +00:00
Jeff Emmett 51da13ac46 feat(rbnb): add community hospitality module — trust-based space sharing
New rSpace module for couch surfing and space sharing within community networks.
Gift economy as first-class option, rNetwork trust graph for auto-accept,
messages embedded in CRDTs, endorsements feed back into trust graph.

- schemas.ts: Listing, StayRequest, Endorsement, AvailabilityWindow, SpaceConfig types
- mod.ts: 18 API endpoints (listings, availability, stays, endorsements, search, stats, config)
- landing.ts: Marketing page with warm amber/red/pink palette
- local-first-client.ts: Automerge sync wrapper (BnbLocalFirstClient)
- components: folk-bnb-view (grid+map), folk-listing (card shape), folk-stay-request (detail)
- bnb.css: Economy badges, status indicators, message thread styles
- Registered in server/index.ts, added r🏠 badge to app switcher under "Sharing"
- 6 demo listings (gift couch, exchange farm, suggested tent, sliding loft, gift hub, fixed cabin)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 16:01:50 -07:00
Jeff Emmett de828c4247 fix(rsplat): bump JS cache version to v=9
Force browsers to fetch updated folk-splat-viewer.js with
error handling fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 15:57:13 -07:00
Jeff Emmett f1de3b654e fix(rsplat): handle formData parse errors in image-stage endpoint
Wrap formData() in try/catch with logging to diagnose Content-Type
issues through Cloudflare tunnel. Also fix client-side error handling
to clear progress timer and show actual error message on failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 15:53:59 -07:00
Jeff Emmett d950354dfd feat(rsplat): default to image upload tab + clickable drop area
- Default upload mode is now "Generate from Image" instead of splat upload
- Clicking anywhere in the dotted drop area opens the file browser
  (not just the "browse" link)
- Add cursor: pointer to upload mode areas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 15:47:39 -07:00
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 3e4c070fea fix(rsplat): use queue API for Hunyuan3D + fix controls z-index
- Switch to fal.ai queue API (submit/poll/result) with 5-min deadline
  to avoid synchronous timeout on long-running textured mesh generation
- Bump controls z-index to 100 so buttons aren't obscured by the
  GaussianSplats3D canvas overlay
- Update progress phases for Hunyuan3D timing (60-180s)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 14:49:24 -07: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