Commit Graph

407 Commits

Author SHA1 Message Date
Jeff Emmett d998409b7d fix(landing): remove (you) prefix from hero wordmark
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 11:27:08 -04:00
Jeff Emmett e2e9bc42fd feat(landing): full redesign — 8-section layout with tabbed app categories
Hero with animated CSS orbs + grid overlay, stats bar, flow stories with
accent borders, 9-category tabbed showcase (all 37 rApps), 3-step how-it-works
with dotted connectors, EncryptID, final CTA, categorized footer columns.
Fixes hero hiding behind 56px header. New lp-* CSS prefix, reduced-motion
support, light/dark mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 10:43:18 -04:00
Jeff Emmett 70cb919541 fix(rnetwork): add auth headers to graph viewer API calls; add Blender multi-user
- Fix 401 errors on rNetwork by passing encryptid-token as Bearer auth
  on /api/info, /api/graph, /api/workspaces fetch calls
- Add blender-multiuser replication server (multi-user-server:0.5.8)
  to docker-compose with health check and resource limits
- Add Multiplayer tab to folk-blender shape with connection info,
  server status check, and setup instructions
- Add /api/blender-multiuser/status endpoint for TCP health probe

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 23:32:33 -04:00
Jeff Emmett e78b768f04 feat(security): harden MI endpoints — CORS, rate limiting, prompt sanitization
- Restrict CORS to known rSpace domains (no more open wildcard)
- Add tiered rate limiting per IP (anon vs authenticated, per endpoint tier)
- UA filtering blocks scrapers/scanners, allows browsers and AI agents
- Prompt injection sanitization: strip MI_ACTION markers, system tags, and
  known attack patterns from user-supplied content before LLM ingestion
- Space access control: private/permissioned spaces gate MI data to members
- Auth required on /triage, /execute-server-action, data-driven /suggestions
- MCP guard: require auth or agent UA for /api/mcp/*
- Anonymous WebSocket cap: max 3 per IP with proper cleanup on close
- Knowledge index + conversation memory gated to members+ (viewers get
  public canvas data only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 13:26:53 -04:00
Jeff Emmett 698a630b8b feat(rdocs+mi): add MarkItDown integration for PDF/DOCX/PPTX/XLSX conversion
Office documents dropped onto canvas or imported via rDocs are now converted
to Markdown using Microsoft's markitdown CLI. Canvas drops trigger triage;
rDocs imports create rich notes with the original file kept as an attachment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 10:17:49 -04:00
Jeff Emmett 6e36b87a45 fix(sync): prune stale DOM shapes + make tab reconciliation user-authoritative
community-sync: remove DOM shapes that are deleted/forgotten from doc.
shell: treat user's saved tabs as authoritative over Automerge, pass
fromUserAction flag to reconcileRemoteLayers to allow intentional close-all.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:15:22 -04:00
Jeff Emmett 48c7f15de4 feat(app-switcher): add badges for all rApps, sort toggle, and pin favorites
- Add r<emoji> badges for rDocs, rDesign, rSheets, rTime, rGov, rAgents,
  rExchange to both MODULE_BADGES and FAVICON_BADGE_MAP
- Add MODULE_CATEGORIES entries for all new modules
- Add "Govern" category for rGov
- Sort modules alphabetically within each function category
- Add sort toggle (By Function / A-Z) at bottom of sidebar, persisted
  in localStorage
- Add star/pin button on each rApp — pinned items appear in a "Pinned"
  section above "Recent", persisted in localStorage
- Fix rAuctions module ID: 'auctions' → 'rauctions' for consistency,
  with alias in MODULE_ALIASES for backward compat
- Change rAuctions emoji from 🏛 to 🎭

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 08:49:52 -04:00
Jeff Emmett 75fd5cf4be feat(mi): per-space knowledge index with ranked context injection
Replace the 265-line data dump (35 modules × 3 items) in MI system prompts
with a trigram-ranked knowledge index that surfaces only the top-18 most
relevant entries per query. Adds per-space conversation memory persisted
to disk for cross-session context.

New files:
- server/mi-trigrams.ts — trigram + Jaccard similarity utilities
- server/space-knowledge.ts — SpaceKnowledgeIndex with 5-min TTL cache
- server/space-memory.ts — SpaceMemory with debounced disk persistence

Changes:
- mi-routes.ts: ~280 lines removed, replaced with ranked index call
- sync-instance.ts: cache invalidation on doc changes
- rauctions/mod.ts: fix ModuleScoping type (defaultScope, userConfigurable)
- mcp-tools/ragents.ts: fix AccessResult property access (claims.username, claims.sub)

~80% token reduction per MI request (~6,300 → ~1,320 tokens).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 22:19:07 -04:00
Jeff Emmett 0b1e33e1d2 fix(video-gen): use fal.ai status_url from submit response + add logging
Use the status_url returned by fal.ai submit instead of constructing
it manually. Add logging for submit success and poll HTTP errors to
debug Seedance queue status polling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 20:27:59 -04:00
Jeff Emmett c682bc7076 feat(ragents): add agent-to-agent exchange module
Moltbook-inspired agent exchange where members' MI agents can:
- Register with name, capabilities, and avatar per space
- Post to topic-based channels (general, packages, custom)
- Reply in threaded discussions
- Share structured JSON data packages alongside posts
- Upvote/downvote to surface the best contributions

Includes Automerge CRDT schemas, 9 REST API endpoints,
6 MCP tools, MI data query integration, and landing page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:27:29 +00:00
Jeff Emmett 3865e7d7b2 fix(video-gen): correct Seedance 2.0 fal.ai model paths
Remove erroneous fal-ai/ prefix for bytedance models and fix fast
variant path (seedance-2.0/fast/ not seedance-2.0-fast/).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 18:59:22 -04:00
Jeff Emmett 7db4171ddd feat(video-gen): add Seedance 2.0 model support + fix data port wiring
Add Seedance 2.0 / 2.0 Fast to video gen with model selector UI,
duration/resolution/aspect-ratio/audio controls. Fix broken port
outputs on both video-gen and image-gen shapes so arrow connections
propagate generated content to downstream shapes. Add input port
listeners for prompt and image data flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 18:47:52 -04:00
Jeff Emmett 58586334bf feat(landing): overhaul homepage — interop messaging, flow cards, reduced dashboard flash
- Remove "Try Demo" header button for consistency with other pages
- Reduce hero top padding (136px → 88px)
- Replace nostalgia copy with interop-focused messaging
- Replace 6-card feature grid with 4 interop flow cards (rCal→rTasks→rChats, etc.)
- Promote ecosystem grid from section 6 to section 2
- Remove ASCII interop diagram (replaced by flow cards)
- Trim philosophy section
- Redirect non-demo unauth subdomain visitors to rspace.online/ (eliminates dashboard flash)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 16:18:38 -04:00
Jeff Emmett 086ac02205 fix(auth): add missing same-origin proxy routes for EncryptID session APIs
The auth proxy only covered /api/auth/*, /api/register/*, /api/account/*
but the identity component also calls /api/session/verify, /api/session/refresh,
/api/guardians, /api/user/*, /api/device-link/*, /api/recovery/* — all of which
were hitting 404 on the rspace server. The session verify 404 was interpreted
as "session revoked", clearing localStorage and logging users out on every page
load after the 5-minute validation interval.

Also fix profile/recovery links in header that opened empty string (same-origin
root) instead of auth.rspace.online.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 11:53:45 -04:00
Jeff Emmett 0eb721d12e feat: object visibility membrane — per-object access filtering
Add per-object visibility levels (viewer/member/moderator/admin) across
all rSpace modules. Objects default to 'viewer' (open), so existing data
remains visible. Server-side GET handlers resolve caller role and filter;
MCP tools filter lists and check single-item access; frontend components
do defense-in-depth filtering with visibility picker (mod+) and lock badges.

- shared/membrane.ts: types + isVisibleTo, filterByVisibility, filterArrayByVisibility
- 9 schema files: visibility field on TaskItem, NoteItem, CalendarEvent, etc.
- 8 module routes: GET handlers filter by caller role
- 6 MCP tool files: list filtering + single-item visibility checks
- 4 frontend components: client filtering, picker, lock badges
- 18 unit tests (all passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 11:09:44 -04:00
Jeff Emmett 5c88922b13 fix: MI bar z-index, SW force-update, rtime mobile layout
- MI bar z-index lowered to 1 so dropdowns render above it; panel
  gets z-index 10001 only when open
- SW registration URL bumped to v=8 to match cache version
- rtime: pool and weaving are now two separate scrollable sections
  on mobile (50vh/60vh min-heights) with a "Commitment Weaving"
  section header visible on constrained screens

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 23:17:53 +00:00
Jeff Emmett 44cc47ecf1 fix(auth): same-origin passkey proxy + PRF fallback for Safari
- Add /api/auth/*, /api/register/*, /api/account/* proxy routes to
  rspace-online server, forwarding to encryptid container internally.
  This eliminates cross-origin requests that Safari blocks via ITP or
  Cloudflare security challenges.
- Change client auth URLs from https://auth.rspace.online to same-origin
  in rstack-identity, rspace-header, login-button, and session modules.
- Add PRF extension try/catch fallback in webauthn.ts — Safari throws
  TypeError on the unsupported PRF extension, now retries without it.
- Bump SW cache version v7→v8 to bust stale cached bundles.

Fixes passkey login for Safari/macOS users (e.g. christina) who were
getting "Network error when attempting to reach resource".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:31:59 +00:00
Jeff Emmett c8622bd82b fix: show sign-in gate on private spaces instead of redirecting away
Previously, visiting a private space on *.rspace.online without a session
redirected to rspace.online, causing a redirect loop after login. Now shows
the sign-in gate in-place so the user logs in and stays on the same page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 09:05:44 -04:00
Jeff Emmett e6328581a7 feat: customizable dashboard with persistent home icon and widget system
Adds always-visible home button in tab bar, toggleable dashboard overlay,
widget card system with 8 widgets (tasks, calendar, activity, members,
tools, quick actions, wallet, flows), customize mode with toggle/reorder,
and dashboard summary API endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 23:10:27 -04:00
Jeff Emmett 2f4258aa32 feat: refresh landing page with glow animation, SVG icons, interop diagram
Restore personality from old Next.js landing: animated hero glow, playful
"MySpace → (you)rSpace" copy, SVG feature cards with teal/indigo accents,
shield graphic for EncryptID, interoperability ASCII diagram, sharper
philosophy copy, ecosystem grid with r*.online domains, richer footer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 22:30:55 -04:00
Jeff Emmett 53c757e68e fix: comprehensive memory leak and performance fixes across 44 files
Browser-side:
- Fix switchSpace() to LRU-evict idle space WebSocket connections (cap: 3)
- Add runtime.unsubscribe() to disconnectedCallback in 24 components
- Fix DocSyncManager.unsubscribe() to clean up syncStates, timers, listeners
- Fix 14 components leaking RAF loops, ResizeObservers, MutationObservers,
  document/window listeners, setIntervals, MapLibre WebGL contexts, and
  AbortControllers on disconnect
- Deduplicate Automerge WASM: module builds now use global shim from
  shell-offline instead of bundling ~2.5MB each (8 modules affected)

Server-side:
- Add LRU eviction to SyncServer.#docs (cap: 500, evicts idle docs with
  no subscribers, persists to disk before eviction)
- registerWatcher() now returns unsubscribe function

Data:
- Cap unbounded CRDT arrays: rexchange chatMessages (200), rcart events (200)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 22:26:24 -04:00
Jeff Emmett 76df746e15 feat: cross-browser/cross-device compatibility sweep
Browser compat gate (WASM/ESM check + structuredClone polyfill),
structured WebAuthn error handling with user-facing messages,
email-only login mode when passkeys unavailable, Firefox passphrase
fallback for document encryption (salt storage, modal UI, key
derivation bridge), CSS flex gap fallbacks for Safari <14.1,
MapLibre CDN load error handling, and server-side auth error
improvements with proper HTTP status codes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 19:57:59 -04:00
Jeff Emmett c6cb875ba4 feat(rcal): add Google Calendar sync integration with connectors menu
- Google Calendar API client (server/google-calendar.ts): token auto-refresh,
  list calendars, fetch events with incremental sync, create events, mapping
- OAuth scopes: added calendar.readonly + calendar.events, returnTo param
- rCal routes: subscribe, sync, sync-all, unsubscribe, push-to-Google endpoints
- Background sync loop: 10-minute interval with incremental sync tokens
- Frontend: calendar picker modal, sync button, per-event Google export
- MCP: source_type filter on rcal_list_events, new rcal_sync_google tool
- Connectors menu: Google shows services (Docs/Drive/Calendar) + calendar count,
  added Obsidian & Logseq as file-based connectors, Notion shows services
- Fix: import-export dialog API base corrected from rnotes to rdocs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 19:45:52 -04:00
Jeff Emmett 18b61fa5e6 feat: rebuild rNotes as vault browser, editor code now in rDocs
Phase 2-3 of the rNotes/rDocs split. Rewrites rNotes from a full TipTap
editor (~1800 lines) into a lightweight Obsidian/Logseq vault sync and
browse module (~560 lines). Rich editing features remain in rDocs.

rNotes vault browser:
- VaultDoc schema: metadata-only in Automerge (title, tags, hash, wikilinks)
- ZIP vault uploads stored on disk at /data/files/uploads/vaults/
- File tree browser, search, read-only markdown preview
- Wikilink graph data endpoint for visualization
- 5 MCP tools: list_vaults, browse_vault, search_vault, get_vault_note, sync_status
- Browser extension compat shim redirects old API calls to rDocs

Cleanup:
- Removed dead editor files from rnotes (converters, components, local-first-client)
- Updated MI integration to use getRecentVaultNotesForMI
- Updated ONTOLOGY.md with new module descriptions
- Bumped JS cache versions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 18:05:35 -04:00
Jeff Emmett 857a25e625 feat: add MakeReal canvas shape (sketch-to-HTML via Gemini vision)
New folk-makereal shape converts hand-drawn wireframes into functional
HTML/CSS using Gemini Flash 2.5 vision. Drawing canvas + live iframe
preview with framework selector (HTML/Tailwind/React), code view toggle,
and copy/open-tab actions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 17:25:28 -04:00
Jeff Emmett de9cc21301 feat(rmeets): require username on join, fix settings/background, add MI toolbar
- Enable prejoin page so users must enter a display name before joining
- Add requireDisplayName, SETTINGS_SECTIONS, disableVirtualBackground config
- Add floating Meeting Intelligence button with recordings/search links
- Add chat, settings, participants-pane to folk-jitsi-room toolbar
- Also includes: rDocs module expansion, tab-cache/view-history updates,
  converter rewrites, MCP tool additions, OAuth fixes, backlog tasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 14:06:47 -04:00
Jeff Emmett 8887e18dda fix: rename rsheet module to rsheets (fixes missing module crash)
The rsheet→rsheets rename was partially applied - server/index.ts
imported rsheets/mod but the files still lived at rsheet/. This
caused a crash on startup: "Cannot find module '../modules/rsheets/mod'".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 11:19:32 -04:00
Jeff Emmett 1de038eeab feat(comments): spatial comment pins on all rApp module pages
Adds Figma-style threaded comment markers anchored to data-collab-id
elements across all module pages. Comments stored in per-space Automerge
doc, synced via existing local-first stack. Bell is now context-aware
(canvas pins on canvas, module pins on module pages). Notifications
route through existing WS/push/email system with new module_comment
and module_mention event types.

New files: module-comment-types, module-comment-schemas,
rstack-module-comments component. Updated: shell, comment bell,
notification routes. Added data-collab-id to crowdsurf, rtime, rmeets.
Fixed pre-existing SKILL_LABELS import error in rtime/mod.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 11:15:05 -04:00
Jeff Emmett 2e8e702d75 feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration
- Add centralized auth helper (_auth.ts) with resolveAccess() enforcing
  space visibility (public/permissioned/private) and role-based access
- Retrofit 5 existing tool groups (rcal, rnotes, rtasks, rwallet, spaces)
  with resolveAccess gates
- Add 30 new MCP tool files covering all remaining rApps:
  rsocials, rnetwork, rinbox, rtime, rfiles, rschedule, rvote, rchoices,
  rtrips, rcart, rexchange, rbnb, rvnb, crowdsurf, rbooks, rpubs, rmeets,
  rtube, rswag, rdesign, rsplat, rphotos, rflows, rdocs, rdata, rforum,
  rchats, rmaps, rsheet, rgov
- Add ForMI data exports to all module mod.ts files
- Wire 6 core modules into MI context (mi-data-queries.ts, mi-routes.ts)
- forceAuth for sensitive modules (rinbox, rchats)
- Omit sensitive fields (storagePath, fileHash, bodyHtml) from responses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 10:25:17 -04:00
Jeff Emmett dd38dcb631 feat(tabs): close-all button with confirmation dialog
Adds a ✕ button next to the + tab button that closes all open rApp tabs
and returns to the user dashboard. Shows a confirm() prompt with tab count
before proceeding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 15:56:30 -04:00
Jeff Emmett de698a2aa3 feat(comments): notify all space members on new comments and replies
Broadcasts in-app, push, and email notifications to all space members
when a comment pin is created or replied to. @mentioned users get their
specific mention notification instead (no double-notify). Fixes pre-existing
TS error in rtasks local-first-client (missing dueDate default).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 14:12:09 -04:00
Jeff Emmett 85cf54b811 feat: global bug report button — floating widget on every page
Adds a small bug icon (bottom-right) that opens a modal to collect
errors, device info, comments, and optional screenshots, then emails
the report to jeff@jeffemmett.com via the existing SMTP transport.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 14:03:27 -04:00
Jeff Emmett 83267a2209 fix(link-preview): add ca-certificates to Docker + implement design-agent route
The oven/bun:1-slim image lacks system CA certs, causing TLS verification
failures on outbound HTTPS for link-preview. Also implements the
/api/design-agent SSE endpoint — Gemini Flash tool loop driving the
Scribus bridge for DTP layout generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:57:16 -04:00
Jeff Emmett 5ddde13b0d feat: magic link responses for polls and RSVPs
HMAC-signed stateless tokens let external respondents vote on rChoices
polls or RSVP to rCal events via a single tap — no account required.
Routes mounted at /respond/:token bypass space auth. Typed EventAttendee
schema replaces unknown[] on CalendarEvent.attendees. Invite endpoints
on both modules generate tokens and optionally send email invitations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:41:17 -04:00
Jeff Emmett 35c3a48296 fix(sidecar): bump Docker API version from 1.43 to 1.44
Docker Engine 29.0.4 on Netcup requires minimum API version 1.44,
causing all sidecar starts (Blender, FreeCAD, KiCad, Ollama) to fail
with "client version 1.43 is too old".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 12:43:24 -04:00
Jeff Emmett ccaef33a20 fix(rtasks): exempt rtasks API from space auth middleware
The clf space is private, so all API calls were getting 401'd by the
space access middleware before reaching the rtasks routes. Add
/rtasks/api/ to the public endpoint exemption list (like rwallet,
rdesign, rvote already are).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 19:00:38 -04:00
Jeff Emmett 6c1298b796 fix(routing): prevent cached 301 redirects on root and standalone domains
Root route now sends no-cache headers to bust stale 301s from the
rcal standaloneDomain mishap. Standalone domain redirects changed from
301 (permanent/browser-cached) to 302 (temporary) so misconfiguration
can never stick in user browsers again.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 12:27:53 -04:00
Jeff Emmett 7e07170304 fix: ranking drag-drop, spider slider drag, video gen timeout & progress
- Ranking: replace broken :hover drop-target with getBoundingClientRect hit testing
- Spider: add #isSliding guard to prevent slider destruction during drag
- Video gen: bump timeout to 10min, show real fal.ai queue position/status
- Fix NotificationCategory type to include 'payment' in db.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 16:03:58 -04:00
Jeff Emmett b1c54a6e66 fix: update rCal landing, de-spam info popups, fix stale URLs & banner persistence
- rCal landing: strip inline style overrides, use standard rl-* CSS classes
- rCal mod: update standaloneDomain from rcal.online to rspace.online
- Info popup: change from per-rApp auto-show to global one-time auto-show
- Update banner: track dismissal in sessionStorage so it stops re-showing
  on every page load within the same session (likely the "persistent banner")
- rpubs landing: fix stale rcart.online URLs → demo.rspace.online/rcart

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 19:14:27 -04:00
Jeff Emmett bf8e11d426 feat(rexchange): add P2P crypto/fiat exchange module with escrow & reputation
Community members post buy/sell intents for CRDT tokens (cUSDC, $MYCO, fUSDC)
against 8 fiat currencies. Bipartite solver matches intents every 60s. Escrow
via token-service burn/mint trio. Reputation scoring with badges. 14 API routes,
canvas shape with physics orbs, and landing page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 18:32:16 -04:00
Jeff Emmett 7f98dfcdb1 fix: load persisted docs before module onInit to prevent re-seeding
Module onInit functions (rvote, rtasks, rcal, etc.) call seedDemoIfEmpty
which checks the sync server for existing docs. Previously onInit ran
as an IIFE before loadAllDocs completed, so it always found empty docs
and re-seeded demo data — overwriting user deletions/changes. Now
onInit runs inside the loadAllDocs .then() chain, ensuring persisted
data is loaded before any seed checks run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 04:05:51 +00:00
Jeff Emmett 0e2eebf890 feat(encryptid): add wallet lookup + payment notification APIs
Add internal endpoints for payment infrastructure integration:
- GET /api/internal/user-by-wallet — resolve wallet to email/username
- POST /api/internal/notify — trigger in-app notifications by wallet/DID
- Add 'payment' notification category and payment_sent/received event types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 01:28:33 +00:00
Jeff Emmett 42546c9a63 fix: use internal mailcow relay (port 25) for all SMTP transports
SMTP auth on port 587 was broken across all modules due to stale
credentials. Since rspace is on the mailcow Docker network, all 6
SMTP transports now use unauthenticated relay on port 25 when the
host is the internal postfix container. Fixes emails for: payment
receipts, space invitations, inbox approvals, agent notifications,
scheduled emails, and publication sharing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 15:12:42 -07:00
Jeff Emmett d4612d6fb8 fix(ascii-gen): handle raw HTML response from ascii-art service
The ascii-art service returns raw HTML, not JSON. Wrap response in
{html, text} JSON envelope and strip tags for plain text version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 14:31:22 -07:00
Jeff Emmett 46c326278a feat: ASCII art canvas tool, video gen fixes, scribus/notebook sidecars
- Add folk-ascii-gen canvas shape with pattern/palette selectors
- Add POST /api/ascii-gen proxy to ascii-art service
- Register create_ascii_art in canvas tools + triage panel
- Fix WAN 2.1 t2v endpoint URL (fal-ai/wan/v2.1 → fal-ai/wan-t2v)
- Convert video gen to async job queue (avoids Cloudflare timeouts)
- Fix Docker API Content-Type bug in sidecar-manager
- Convert scribus-novnc and open-notebook to on-demand sidecars
- Add ensureSidecar("scribus-novnc") to rDesign bridge proxy
- Fix Hono ContextVariableMap and handleTransakMessage type errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 14:25:48 -07:00
Jeff Emmett 4a54e6af16 fix: enforce subdomain routing — spaces are subdomains, never path segments
Audit and fix ~60 violations across 47 files where URLs were constructed
as /{space}/moduleId instead of /moduleId (subdomain provides the space).

- Add getModuleApiBase() helper to shared/url-helpers.ts
- Fix client components: use getModuleApiBase() for fetch URLs,
  rspaceNavUrl() for navigation
- Fix server routes: use c.get("isSubdomain") for redirects and
  JSON response URLs
- Fix OAuth callbacks (notion, google, clickup): subdomain-aware redirects
- Fix email notification URLs (rvote): use {space}.rspace.online format
- Fix webhook registration (rtasks/clickup): subdomain-aware endpoint URL
- Replace broken #getSpaceSlug() methods in folk-feed, folk-splat
- Replace NODE_ENV checks with proper isSubdomain checks (rdata, rnetwork)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 14:09:53 -07:00
Jeff Emmett f375eb1b43 feat(rgov): add rGov governance decision circuit module
Implements 5 new FolkShape web components for visual governance:
- folk-gov-binary: Yes/No signoff gates
- folk-gov-threshold: Numeric progress gates with contributions
- folk-gov-knob: SVG rotary parameter knobs with temporal viscosity
- folk-gov-project: Circuit aggregators (walks arrow graph backward)
- folk-gov-amendment: Modification proposals with approval voting

Also adds "satisfied" gate condition to folk-arrow, 5 AI canvas
tools, module registration, and all canvas.html wiring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 13:01:08 -07:00
Jeff Emmett d8e954dfb6 fix: persist docs created via setDoc (fixes payment not found)
SyncServer.setDoc() was not calling onDocChange, so documents created
via setDoc (including payment requests) were only stored in memory and
lost on container restart. This caused "Payment request not found"
errors after deploys. Now setDoc triggers the same persistence callback
as changeDoc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 02:54:11 +00:00
Jeff Emmett 6364eb8deb feat(shell): add Request Access button and Go to My Space fallback on access gate
When a logged-in user visits a private space they don't have access to,
the gate now shows a "Request Access" button (calls POST /api/spaces/:slug/access-requests)
and a "Go to {username}'s Space" secondary link. Handles already-pending (409) gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 16:20:56 -07:00
Jeff Emmett 1cdbce0bcc fix(shell): update space-switcher on landing pages to show user's space or demo
Landing, module-landing, and sub-page-info pages showed a stale "Spaces"
dropdown. Now checks encryptid_session and sets the switcher to
{username}'s Space (logged in) or demo (logged out).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 16:05:14 -07:00