Commit Graph

396 Commits

Author SHA1 Message Date
Jeff Emmett c55e28a400 style: gradient background + (you)rSpace wordmark on landing page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:58:15 -08:00
Jeff Emmett a8395aa0d6 docs: fix Twenty CRM deploy guide container name + boot time
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:54:49 -08:00
Jeff Emmett 272624b0c7 feat: add feeds/acceptsFeeds to rsplat, rdesign, rdocs, rschedule
Ensures all 26 rApp modules have proper feed declarations for the
canvas layer/stack flow wiring UI. Adds landingPage functions to
rdesign and rdocs for canvas embedding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:41:55 -08:00
Jeff Emmett 24cc3ffe95 fix: feed view DOM restore + toolbar cleanup
Save/restore DOM child order when toggling feed view so element
positions revert correctly on exit. Remove unused Feed and Connect
toolbar buttons (connect mode still works via 'A' key). Rename
Memory panel to Recent Changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:39:08 -08:00
Jeff Emmett 59b1ae2d05 feat: add rSchedule module — persistent cron-based job scheduling
New module providing in-process, Automerge-backed job scheduling to
replace system-level crontabs. Includes email, webhook, calendar-event,
broadcast, and backlog-briefing action types with a 60-second tick loop.

- modules/rschedule/ — schemas, mod, landing page, web component UI
- Seed jobs: morning/weekly/monthly backlog briefings
- SMTP env vars added to docker-compose for email actions
- ONTOLOGY.md updated (26+ modules, rSchedule in Planning & Spatial)
- Also: Twenty CRM docker-compose aligned to rspace-internal network

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:34:53 -08:00
Jeff Emmett acc0faca01 feat: wire up recent tools tracking + favorites pin menu in bottom toolbar
Tracks last 2 sidebar tools used and shows them at the right end of the
bottom toolbar. [+] button opens a grouped menu to pin up to 4 favorite
tools. Pins and recents persist in localStorage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:31:39 -08:00
Jeff Emmett d988e0b112 refactor: slim Note toolbar, move rApps to Embed/Creative
Remove Card, Rich Note, rNotes, rBooks, rPubs, rForum from the Note
toolbar group. Move rNotes/rBooks/rForum to Embed as interactive
embeds (data port-ins). Move rPubs to Creative. Remove Card and
Obsidian Note from MI tool schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:26:04 -08:00
Jeff Emmett 63ac2a268e perf: parallelize local-first init — batch IDB loads, cache crypto keys, preload sync states
Sequential document loading during init() was the main bottleneck: each cached
doc required a serial IDB read + key derivation + decryption + Automerge.load.
With N documents this meant N× single-doc latency instead of 1×.

Changes:
- Add loadMany() to EncryptedDocStore for parallel Promise.all() batch loading
- Cache derived space/doc CryptoKeys in DocCrypto (one derivation per session)
- Add preloadSyncStates() to DocSyncManager for parallel sync state loading
- Update all 11 module local-first-client init() methods to use batch APIs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:18:55 -08:00
Jeff Emmett 7a34239071 chore: backlog tasks 87-101 for recent untracked work
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:03:40 -08:00
Jeff Emmett 96e1afb143 feat: add conviction timeline chart + dynamic option reordering
SVG chart plots each option's conviction growth over time with colored
lines and area fills. Options now sort by conviction score (highest
first) and reorder every 10s as conviction accumulates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:03:03 -08:00
Jeff Emmett 588a52f2cc fix: rename Twenty CRM containers to twenty-ch-* prefix to avoid conflicts
Existing Twenty instances on Netcup use twenty-server/twenty-db/twenty-redis
names. Renamed to twenty-ch-server/twenty-ch-db/twenty-ch-redis for the
commons-hub instance. Updated TWENTY_API_URL accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:56:53 -08:00
Jeff Emmett 07e53d6aa1 feat: add Twenty CRM /crm route + deploy stack for commons-hub lead funnel
Adds dedicated /crm sub-route to rNetwork module embedding Twenty CRM
via ExternalAppShell iframe. Updates TWENTY_API_URL to use internal Docker
networking (http://twenty-server:3000). Includes full Twenty CRM Docker
stack (server, worker, postgres, redis) with Traefik routing for
crm.rspace.online and deployment instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:53:50 -08:00
Jeff Emmett 80e42596b3 fix: normalize visibility enums + tab tracking across remaining files
Update remaining references from legacy 4-value visibility model
(public/public_read/authenticated/members_only) to simplified 3-value
model (public/permissioned/private) in rInbox, rVote, identity component,
admin panel, and create-space page. Add tab trackRecent calls in shell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:29:01 -08:00
Jeff Emmett eb2859d849 refactor: normalize space visibility enums + inline space create form
Align visibility values across server and UI to the canonical set:
public, permissioned, private (replacing public_read, authenticated,
members_only). Add inline space creation form to the space switcher
dropdown and tab bar instead of navigating to /new.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:27:31 -08:00
Jeff Emmett fb26324929 fix: rNetwork graph viewer now fetches /api/graph and normalizes CRM data
The folk-graph-viewer component was never calling /api/graph — it only
fetched /api/workspaces and /api/info, leaving nodes/edges empty for
non-demo spaces. Now loadData() fetches the graph endpoint and maps
server field names (label→name, works_at→work_at) to match the client
interface. Force layout and org colors are now dynamic instead of
hardcoded for 3 demo orgs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:25:11 -08:00
Jeff Emmett de4da8429f feat: rChoices drawers + conviction wiring in canvas
Add conviction component to canvas toolbar, SHAPE_DEFAULTS,
newShapeElement switch, CSS position selectors, and connect-mode
selectors. Complete the wiring for folk-choice-conviction alongside
existing spider/rank/vote drawer enhancements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:24:18 -08:00
Jeff Emmett 6801916c60 feat: conviction voting button handler, server import cleanup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:21:36 -08:00
Jeff Emmett 06f7d67cd3 chore: slash-command refinements, server import fixes, misc cleanup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:21:04 -08:00
Jeff Emmett f86c6234af fix: register FolkChoiceConviction component in canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:20:43 -08:00
Jeff Emmett b52aa8298b feat: conviction voting component, rNotes refinements, space visibility endpoints
- Add folk-choice-conviction library and register in lib/index
- Refactor rNotes app layout and interaction
- Space visibility normalization in server/spaces
- Minor canvas.html tweaks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:19:45 -08:00
Jeff Emmett daa6013fd0 fix: add migrateVisibility runtime migration, fix participant→member role label
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:17:53 -08:00
Jeff Emmett 0d8d8202a5 fix: normalize legacy space visibility values to 3-type model
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:16:06 -08:00
Jeff Emmett 35a5a5f29a feat: workflow template, choice components, space settings, EncryptID vault, UI polish
- Pre-populated 4-node workflow template (trigger→action→condition→output) with blue arrows
- Add folk-choice-vote, folk-choice-rank, folk-choice-spider component libraries
- New rstack-space-settings component
- EncryptID encrypted vault schema and server endpoints
- Space management and community store enhancements
- Shell, landing, and module CSS refinements
- Tab bar, app switcher, identity, and MI component updates
- rNotes app improvements
- rFunds diagram adjustments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:15:13 -08:00
Jeff Emmett 6dae60ea1f feat: single-click text inputs to edit, drag/resize on shape body
Shapes are now grabbable/draggable/resizable on first click (body or
handles), editable on double-click, but clicking directly on a text
input (textarea, contenteditable, text input) immediately enters edit
mode and focuses the input — no double-click required.

Works by hit-testing text inputs at pointer coordinates before
initiating drag, checking both light DOM and shadow DOM of slotted
content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 12:03:33 -08:00
Jeff Emmett 8bd899d146 fix: persist theme via html[data-theme] + theme.css custom properties
- Blocking <head> script restores canvas-theme from localStorage
  with prefers-color-scheme fallback (no FOUC)
- New theme.css with CSS custom properties for dark/light
- Removed data-theme from body/header/tab-row (now on <html>)
- Theme toggle writes to documentElement instead of body

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:56:51 -08:00
Jeff Emmett b77fb30001 fix: persist light/dark theme preference across sessions
Restore canvas-theme from localStorage on page load with a blocking
script before first paint (body) and a fixup for header/tab-row.
Applied to all three shell renderers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:50:49 -08:00
Jeff Emmett 161f7a10de feat: fall back to demo data when rPhotos/rInbox APIs return empty
Show sample data with an info banner instead of blank empty states
when Immich isn't configured or no mailboxes exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:16:22 -08:00
Jeff Emmett 023a88352f fix: deep-clone shape data to prevent Automerge proxy re-assignment error
Break Automerge proxy chain in #shapeToData() and #updateShapeInDoc()
to fix "Cannot create a reference to an existing document object" on
canvas load and WS sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:14:42 -08:00
Jeff Emmett e2e12afc96 feat: add encrypted server-side account vault for EncryptID
Zero-knowledge vault stores account data (profile, emails, devices,
wallets, preferences) as AES-256-GCM encrypted blob via backup API.
Key derived from WebAuthn PRF — server never sees plaintext. Dashboard
UI with save/restore buttons triggers passkey re-auth for encryption.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:13:41 -08:00
Jeff Emmett 91cafc92ce fix: cursor world-coords, loading skeleton, WebSocket readyState guard
- Convert cursor positions to canvas world coordinates (screen→world on
  send, world→screen on render) so remote cursors appear at correct
  canvas locations regardless of pan/zoom
- Add PresenceManager.setCamera() to reproject cursors on pan/zoom
- Add loading spinner overlay dismissed on first cache hit or sync
- Guard WebSocket open handler with readyState check after async load

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 10:40:13 -08:00
Jeff Emmett fef419f572 fix: folk-wrapper crash, service worker API exclusion, fal.ai endpoint
- folk-wrapper: createRenderRoot crashed because innerHTML="" removed the
  slot from DOM, making parentElement null on the next line. Save parent
  ref before clearing.

- sw.ts: module API paths (/space/module/api/...) weren't excluded from
  caching. Changed startsWith("/api/") to includes("/api/"). Also fixed
  catch handler returning undefined instead of a Response.

- image-gen: changed queue.fal.run to fal.run for synchronous responses.
  The queue endpoint returns request_id, not the actual image data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:36:15 -08:00
Jeff Emmett 4f9b036cc0 fix: preserve shape x/y/size on reload + fix eraser Automerge persistence
createRenderRoot() was unconditionally reading x/y/width/height from HTML
attributes, overwriting values already set via JS properties before DOM
insertion. This caused all shapes to stack at (0,0) with auto dimensions
on page reload. Now only reads from attributes when they exist.

Also fixed eraser: hardDeleteShape() was only in the click handler which
never fired because pointerdown already removed the target element.
Moved Automerge deletion into the pointerdown handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:07:41 -08:00
Jeff Emmett 4819852b14 fix: extract inline <style> blocks in tab-cache for canvas toolbar rendering
The tab cache's extractContent() only collected <link> stylesheets, missing
inline <style> blocks. The canvas toolbar CSS is entirely inline, causing
unstyled toolbar when switching to the rSpace tab via tab cache.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:51:35 -08:00
Jeff Emmett 1635b08704 feat: add seed template data for rCart, rChoices, rFiles, rForum, rFunds, rInbox, rSplat
Each module now seeds starter content when a new space is created,
giving users something to interact with immediately rather than
an empty state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:49:21 -08:00
Jeff Emmett 9ed9757a2a fix: remove auto-redirect from demo space for logged-in users
Signed-in users can now browse the demo space without being
automatically redirected to their personal space.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:27:06 -08:00
Jeff Emmett ebdda1e443 feat: enhanced rinbox multisig approval UI, module landing pages, help guide
- Rinbox: visual multisig approval cards with signer avatars, progress bars,
  email previews, status-colored borders, and compose-for-approval form
- Rinbox: help/guide popout with feature cards, how-it-works steps, use cases
- Rinbox: rich demo data with threaded comments, signer lists, multiple mailboxes
- Module landing pages: improved UX descriptions for rBooks, rCal, rNotes,
  rTrips, rVote, rWork with proper feature descriptions
- Added landingPage support to RSpaceModule interface and server routing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:05:08 -08:00
Jeff Emmett e3c4d74b1a fix: update Gemini model names from deprecated -exp to current versions
gemini-2.0-flash-exp was removed from the API. Updated to:
- gemini-2.5-flash for text generation
- gemini-2.5-pro for outline/reasoning
- gemini-2.5-flash-image for image generation with responseModalities

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:43:42 -08:00
Jeff Emmett e644797001 feat: Sankey-proportional edges + node satisfaction bars in rFunds diagram
Edge widths now reflect actual dollar flow (source rates, overflow excess,
spending drain) instead of just allocation percentages. Zero-flow paths
render as ghost edges. Edge labels show dollar amounts alongside percentages.
Funnel nodes display an inflow satisfaction bar showing how much of their
expected inflow is actually arriving. Outcome progress bars enhanced to 8px
with dollar labels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:30:12 -08:00
Jeff Emmett 74a5142349 feat: Gemini AI integration + zine generator + fix Ollama network
- Add /api/prompt multi-provider endpoint (Gemini Flash/Pro + 4 Ollama models)
- Add /api/gemini/image with fallback cascade (gemini-2.0-flash → imagen-3.0)
- Add /api/zine/outline, /api/zine/page, /api/zine/regenerate-section
- Create folk-zine-gen.ts: 8-page MycroZine generator with editable text
  and per-section regeneration (text + image independently)
- Update folk-prompt.ts: multi-provider model dropdown (Gemini + Ollama)
- Update folk-image-gen.ts: add Gemini provider toggle + new styles
- Connect rspace to ai-internal Docker network for Ollama access
- Fetch GEMINI_API_KEY from Infisical claude-ops/ai (no plaintext secrets)
- Update entrypoint.sh: dual Infisical project support (primary + AI)
- Install @google/generative-ai, @google/genai SDKs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:27:11 -08:00
Jeff Emmett 20ef1e9ec4 fix: single-click opens editor on rFunds flow nodes
Previously only double-click opened the editor/modal. Now single click
(without dragging) opens the side editor panel. Double-click still
opens rich modals for outcome/source nodes. Added drag threshold (5px)
so clicks don't accidentally start dragging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:10:31 -08:00
Jeff Emmett b6ddd4a833 fix: getApiBase() across all 16 rApp modules for subdomain routing
All modules had getApiBase() matching wrong module names (e.g. /vote
instead of /rvote) and requiring /{space}/ prefix in the URL path.
On subdomains like jeff.rspace.online, the browser URL is /rfunds/...
not /jeff/rfunds/..., so the regex never matched.

New pattern: /^(\/[^/]+)?\/rmodule/ handles both:
- Subdomain: /rfunds/... → base = /rfunds
- Direct: /demo/rfunds/... → base = /demo/rfunds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:01:06 -08:00
Jeff Emmett cb5952c770 fix: allow tool placement over existing shapes on canvas
Move pendingTool check before the e.target gate so clicking
anywhere on the canvas places the tool, even over existing elements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:44:15 -08:00
Jeff Emmett e4ad1b68e9 fix: move encryptid containers to rspace-internal network
The encryptid-internal network had persistent Docker networking issues
(TCP CONNECT_TIMEOUT between containers on the same bridge). Using the
rspace-internal network which already works for rspace↔rspace-db.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:28:35 -08:00
Jeff Emmett 7d8f64d17c fix: make pencil tool temporary, return to selector on ESC
Drawing tools (pencil, rect, circle, line) now auto-clear after one
stroke, returning to the default selector tool. ESC clears any active
whiteboard tool. Switching to another toolbar tool also clears the
active whiteboard tool.

This fixes the resize issue — when a whiteboard tool was stuck active,
canvasContent had pointer-events:none which blocked all shape
interactions including resize handles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:24:09 -08:00
Jeff Emmett cb828fc605 fix: add retry logic to EncryptID database init for Docker networking delays
Docker container networking can take a moment to stabilize even after
depends_on health checks pass. This adds 5 retries with exponential
backoff (2s, 4s, 6s, 8s, 10s) to survive transient CONNECT_TIMEOUT errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:23:26 -08:00
Jeff Emmett 6d1661a4f3 feat: template seeding system for new spaces
Every non-demo space gets generic "Getting Started" content (~25 shapes)
covering all rApp modules so users see what each module can do immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:03:45 -08:00
Jeff Emmett 4e9284fa5a feat: feed view — mobile-friendly infinite scroll for canvas
Add a toggle that switches the 2D spatial canvas into a vertical
scrollable feed layout. Shapes flow as a flex-column list, sortable
by position, creation time, type, or alphabetically. Pan/zoom/drag
gestures are suppressed in feed mode while shape editing stays active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:57:24 -08:00
Jeff Emmett dfa09a39f6 feat: email invite endpoint, canvas share panel, backlog task-77 done
- Add POST /:slug/invite email endpoint (nodemailer via Mailcow SMTP)
- Add share badge + panel UI to canvas whiteboard
- Mark task-77 (encrypted VPS backup) as Done with updated references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:39:43 -08:00
Jeff Emmett 1ff4c5ace7 refactor: consolidate EncryptID into main docker-compose.yml
Merge encryptid + encryptid-db services from separate docker-compose.encryptid.yml
into the main compose file. Update Dockerfile.encryptid to use additional_contexts
for encryptid-sdk (matching main Dockerfile pattern) instead of fragile context: ..

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:36:17 -08:00
Jeff Emmett 94c5346eda fix: account completion indicators, email verify token type, SW cache
- Add /api/account/status endpoint returning email, multi-device,
  social recovery completion state
- Show red/green status dots on Account modal section headers for
  incomplete vs complete steps (email, device, recovery, data storage)
- Highlight Data Storage section with red warning when using local-only
  storage so users know they're responsible for their own data
- Fix email verification 500 error: change token type from
  'email_verification' to 'email_verify' to match DB check constraint
- Fix service worker: skip non-http(s) schemes to prevent
  chrome-extension:// cache put errors

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