Commit Graph

330 Commits

Author SHA1 Message Date
Jeff Emmett 88d618c1af feat: replace My Account submenu with consolidated popup modal
Consolidates email, device, recovery, postal address, data storage,
and dark mode settings into a single scrollable modal with collapsible
section cards — matching the existing My Spaces modal pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:22:13 -08:00
Jeff Emmett 25174b87e6 fix: bump rCal JS cache version to v=4
Bust Cloudflare CDN cache after unified layout deploy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:18:29 -08:00
Jeff Emmett 2ce0b4730c feat: rCal unified layout — no tabs, auto-map, lunar overlay, scroll zoom
Remove the 3-tab system (Temporal/Spatial/Lunar) in favor of a unified view:
- Calendar always primary with floating/docked/minimizable map panel
- Lunar phases as compact overlay bar below nav (click to expand synodic detail)
- Scroll/trackpad zoom controls temporal granularity with 120ms debounce
- 'm' key cycles map panel: floating → docked → minimized → floating
- Mobile: floating map full-width, docked stacks vertically
- cal-demo.ts cleaned up (dead tab-switching code removed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:07:31 -08:00
Jeff Emmett 22db2f439f feat: client-side encryption wiring + space scoping UI (Phase 5+6)
Phase 5 — EncryptID → DocCrypto bridge:
- Add EncryptedDocBridge connecting WebAuthn PRF to document encryption
- Add per-doc relay mode to SyncServer (encrypted spaces bypass participant mode)
- Wire encryption toggle to syncServer.setRelayOnly() on PATCH /:slug/encryption
- Restore relay mode for encrypted spaces on server startup
- Initialize DocBridge from PRF on login, clear on sign-out (both login-button + identity)
- Use bridge helpers for encrypted backup toggle in My Account

Phase 6 — Space scoping UI:
- Add "Modules" tab to Edit Space modal (enable/disable modules, scope toggles, encryption)
- Auto-filter app switcher by space's enabledModules via renderShell()
- Show "G" badge on global-scoped modules in app switcher
- Show lock icon in header for encrypted spaces
- Add getSpaceShellMeta() helper for auto-populating shell options

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:50:16 -08:00
Jeff Emmett 33156cc249 fix: resolve all pre-existing tsc --noEmit errors (10 errors across 5 files)
- folk-map-viewer.ts: remove explicit return type, let TS infer
- test-x402.ts: cast account as any (test script, readContract unused)
- key-derivation.ts: cast Uint8Array at WebCrypto boundaries (BufferSource/ArrayBuffer)
- wallet-store.ts: cast .buffer as ArrayBuffer
- webauthn.ts: cast PRF output as ArrayBuffer | undefined

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:48:37 -08:00
Jeff Emmett 03a7b6d063 feat: add explicit ports with drag-to-connect wiring to rFunds canvas
Adds named, colored ports to every node type (source outflow, funnel
inflow/spending/overflow, outcome inflow/overflow) with a full wiring
state machine supporting both click-to-wire and drag-to-wire interaction.
Edges now originate from specific port positions. Outcomes gain overflow
allocations so fully-funded outcomes can cascade surplus onward.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:30:14 -08:00
Jeff Emmett ef3d0ce447 feat: batch local-first migration for 10 modules (Phase 3)
Add Automerge schemas, lifecycle hooks (onInit, docSchemas), and
local-first client wrappers for all remaining PG modules:
rWork, rVote, rCal, rFiles, rCart, rBooks, rTrips, rInbox, rSplat, rFunds.

Each module now:
- Defines typed Automerge document schemas (schemas.ts)
- Registers docSchemas and onInit hook with SyncServer reference
- Moves initDB() from top-level to onInit for unified startup
- Has a client-side local-first wrapper (local-first-client.ts)

Dual-write route handlers will be wired incrementally per module
following the rNotes pattern established in Phase 2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:01:58 -08:00
Jeff Emmett 6a7f21dc19 feat: rNotes local-first pilot migration (Phase 2)
Migrate rNotes from PostgreSQL to Automerge local-first stack with
dual-write support. Reads go Automerge-first with PG fallback; writes
go to both backends during the migration window.

- Add Automerge schemas for NotebookDoc (schemas.ts)
- Add lifecycle hooks (onInit, onSpaceCreate) to rnotes module
- Dual-write all 8 API routes (notebooks + notes CRUD)
- Add NotesLocalFirstClient wrapping DocSyncManager + EncryptedDocStore
- Enhance migration runner with --dry-run, --module, --verify flags
- Add listDocs() to SyncServer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:51:31 -08:00
Jeff Emmett b2ea5e04cf feat: unified space lifecycle & module scoping contract (Phase 0+1)
Extend RSpaceModule with scoping, lifecycle hooks (onInit, onSpaceCreate/Delete
with SpaceLifecycleContext, onSpaceEnable/Disable), and DocSchema support.
Add scoping to all 25 modules (8 space, 11 global-configurable, 6 global-fixed).
Consolidate 4 space creation endpoints into shared createSpace() function.
Add enabledModules enforcement middleware and module configuration API
(GET/PATCH /api/spaces/:slug/modules). Deprecation header on /api/communities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:35:41 -08:00
Jeff Emmett 347c7193d0 fix: rcal API base URL — match /rcal path and fall back to space attribute
The regex matched /cal instead of /rcal, so getApiBase() always returned
empty string, causing 404s on api/events, api/lunar, and api/sources.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:27:49 -08:00
Jeff Emmett f0d27bde16 feat: replace static rFunds diagram with interactive flow canvas
Transform the Diagram tab from a read-only SVG into a full interactive
canvas with draggable nodes, zoom/pan, Sankey-width edges with +/-
allocation controls, slide-in editor panel, live simulation, node CRUD,
keyboard shortcuts, and lz-string URL sharing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:16:55 -08:00
Jeff Emmett b252004f48 fix: disconnect from spaces and redirect on EncryptID sign-out
Prevents stale WebSocket reconnect loops after sign-out by adding an
intentional-disconnect flag to CommunitySync. Canvas and shell pages
now redirect to homepage when the user signs out.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:15:09 -08:00
Jeff Emmett e7f9507d9d test: add stack view + wiring test page
Standalone test harness for flow tubes, particle animation, and
interactive port wiring with event logging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:03:29 -08:00
Jeff Emmett 4ebbf9f116 feat: add Copy to Space context menu for shapes
Right-click shapes (single or multi-selected) to copy them to another
space the user owns or is a member of. Server endpoint handles ID
remapping, arrow reference preservation, and position centering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:58:44 -08:00
Jeff Emmett 1f0ef59369 feat: add flow tubes, stable particle animation, and interactive port wiring
Replace invisible particle-only flow visualization with colored 3D tubes
between layers, spread horizontally to avoid overlap. Particles now travel
along tube paths. Add click-to-wire interaction on I/O port chips with
visual feedback (glow/breathe/dim). Prevent animation restart on Automerge
sync by surgically updating flow elements in-place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:55:16 -08:00
Jeff Emmett 91494a9c5c feat: port spatio-temporal calendar from standalone rcal-online
Rewrite folk-calendar-view with 5 views (Day/Week/Month/Season/Year),
3 tabs (Temporal/Spatial/Lunar), Leaflet map with event markers and
transit polylines, temporal-spatial zoom coupling, and lunar phase display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:45:24 -08:00
Jeff Emmett 5c21b64a99 feat: add My Account submenu with dark mode + encrypted backup toggles
Reorganize user dropdown into expandable "My Account" submenu containing
account actions (Add Email, Add Device, Recovery) plus Dark Mode and
Encrypted Backup toggle switches. Move theme toggle from toolbar into
account settings, default to dark mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:45:11 -08:00
Jeff Emmett a402caacd8 fix: app-switcher routes through tab system + canvas fills viewport in tab pane
- App-switcher now dispatches module-select event instead of full page navigation
  for same-origin links; shell routes through TabCache for instant tab switching
- Tab pane gets height:100% in canvas-layout mode so #canvas fills the viewport
  (fixes pan/zoom not working on empty canvas background)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:35:38 -08:00
Jeff Emmett be271de7fb feat: add Gnosis Safe + EncryptID passkey wallet abstraction
Derive a deterministic secp256k1 EOA from the passkey's PRF output via
HKDF-SHA256, enabling hardware-backed signing for x402 micropayments and
Safe treasury proposals without storing private keys.

Key changes:
- EOA key derivation with domain-separated HKDF (eoa-derivation.ts)
- Key manager integration with PRF-only EOA path (key-derivation.ts)
- Encrypted client-side wallet store for Safe associations (wallet-store.ts)
- Passkey-backed x402 signer replacing EVM_PRIVATE_KEY (passkey-signer.ts)
- Safe propose/confirm/execute proxy routes in rwallet (mod.ts)
- Wallet capability flag in JWT via users.wallet_address (server.ts)
- Payment operation permissions: x402, safe-propose, safe-execute (session.ts)

Privacy: Safe wallet associations stored client-side only (AES-256-GCM
encrypted localStorage). Server only knows user has wallet capability.

108 tests passing across 5 test suites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:18:34 -08:00
Jeff Emmett c8e63b5c9f fix: mobile/touch UX for toolbar buttons and ghost tool placement
- Switch ghost tracking from mousemove to pointermove (fires for touch/pen/mouse)
- Add cancel button (✕) on ghost outline for mobile (no ESC key available)
- Center ghost on viewport for touch devices instead of (0,0)
- Add touch-action: manipulation to all toolbar buttons (eliminates 300ms tap delay)
- Bump mobile touch targets to 44px min-height with larger padding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:18:07 -08:00
Jeff Emmett 74b15ba1b7 feat: add x402 test endpoint and payment test script
Add POST /api/x402-test — a standalone payment-gated endpoint with
no auth required, for testing the x402 flow end-to-end.

Add scripts/test-x402.ts using @x402/fetch to automatically handle
the 402 → sign → retry cycle on Base Sepolia.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 00:28:55 -08:00
Jeff Emmett 2a7071edb4 fix: use correct x402 facilitator URL (www.x402.org)
The bare domain x402.org/facilitator returns a 308 redirect that
breaks payment verification. Use www.x402.org/facilitator instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:39:07 -08:00
Jeff Emmett 5090676eda fix: remove DATABASE_URL from docker-compose, now in Infisical
DATABASE_URL, ADMIN_DIDS, and ENCRYPTID_DEMO_SPACES are now stored
in Infisical and injected via the entrypoint. Remove the last
docker-compose.yml reference that was temporarily re-added.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 21:41:16 -08:00
Jeff Emmett 15812195f1 fix: set canvas-layout class on initial server render
When loading the rspace canvas directly (not via tab navigation),
#app lacked the canvas-layout class. Without it, #canvas collapses
to 0 height and pointer events for panning miss the canvas element.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 21:33:55 -08:00
Jeff Emmett 424152415a fix: add DATABASE_URL to docker-compose environment
The shared/db/pool.ts requires DATABASE_URL but it was missing from
both docker-compose.yml and Infisical, causing the container to
crash-loop on startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:31:02 -08:00
Jeff Emmett 19e9455f1d fix: make folk-rapp header a drag handle so shapes can be grabbed
folk-rapp used class "rapp-header" but the drag detection in
folk-shape checks for ".header" or "[data-drag]". Added both so
the rapp header works as a drag handle like every other shape type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 18:11:30 -08:00
Jeff Emmett 7850b9d34c feat: move rApp secrets to Infisical, add seed script
Remove DATABASE_URL and ADMIN_DIDS from docker-compose.yml (now
injected via Infisical entrypoint). Add scripts/seed-infisical.sh
to interactively populate 21 module-specific secrets (R2, Immich,
Twenty, Discourse, FAL, RunPod, etc.) into the rspace Infisical
project. Update Dockerfile to include scripts/ in the image.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 18:06:21 -08:00
Jeff Emmett 5e0f30567a fix: prevent pointer events from hijacking two-finger touch pan
On touch devices, both pointer and touch events fire. When a second
finger was added, the pointer handler re-captured the interaction,
fighting the touch-based pan/pinch. Now the touch handler releases
pointer captures and sets a flag that blocks the pointer handler
during two-finger gestures. Also cancels shape drag on multi-touch
and closes the context menu on touchstart for reliable mobile dismiss.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 18:02:53 -08:00
Jeff Emmett 658eb966d6 fix: push overlapping siblings instead of displacing the dragged shape
The overlap resolver now moves siblings in the drag direction rather
than snapping the dragged shape away from them. Supports chain-pushing
(A pushes B into C) with a recursion depth of 3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:51:34 -08:00
Jeff Emmett 7db6068229 feat: add forgotten-shape tooltip and "Hide Faded" toggle
Hovering a forgotten shape now shows a tooltip explaining the state.
A new "Hide Faded" toolbar button lets users hide all forgotten shapes
entirely, with the preference persisted in localStorage. Hidden shapes
reappear automatically when another user remembers them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:05:20 -08:00
Jeff Emmett 384ef23ae1 chore: add backlog tasks 74-76
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:04:39 -08:00
Jeff Emmett 3808b51a64 feat: strip demo pages to show just the interactive component
Demo pages now render the same clean shell as regular spaces — just the
<folk-*> component full-page, no marketing wrapper (hero, feature cards,
CTA). Descriptions belong on landing pages, not demos.

- Remove demo branch from 7 module route handlers (rcal, rcart, rfunds,
  rnotes, rtrips, rtube, rvote)
- Delete 7 demo.ts files (~1200 lines of dead markup)
- Remove renderDemoShell() and DEMO_PAGE_CSS from server/shell.ts
- Remove demoPage field from RSpaceModule interface
- Rename top rApp dropdown item from "rSpace" to "rStack"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:03:46 -08:00
Jeff Emmett 6bd23a6778 fix(rspace): serve canvas through renderShell like all other rapps
The rspace module was serving raw canvas.html as a standalone page
(bypassing renderShell) because canvas-module.html didn't exist.
This meant navigating to rspace caused a full page replacement with
no shared shell, tabs, or TabCache support — appearing to open in a
"new window."

Now extracts body content, styles, and scripts from canvas.html at
startup (stripping the duplicate shell chrome) and renders through
renderShell like every other module. This makes rspace fully
interoperable with the tab system and TabCache.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:55:36 -08:00
Jeff Emmett a39cf6e1c2 feat: auto-provision personal spaces on first visit + redirect logged-in users from demo
Server-side middleware creates the user's personal space when they visit
{username}.rspace.online for the first time (token in cookie, verified once).
Client-side redirect sends logged-in demo users to their personal space.
"Try Demo" button sets a sessionStorage flag to bypass the redirect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:31:32 -08:00
Jeff Emmett 1a615c29c9 feat(rphotos): fix gallery API routing and embed Immich at /album
Fix getApiBase() regex to match /rphotos instead of /photos, add
/album route with iframe embed via renderExternalAppShell, and update
Immich links to navigate within rSpace instead of opening externally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:31:19 -08:00
Jeff Emmett b66e9b44de feat: hide "Try Demo" header button when logged in
The header demo button is now hidden via data-hide when the user has
an active EncryptID session. Reacts to auth-change events so it
appears on logout and disappears on login without page reload.
Landing page hero CTAs already swap to "Go to My Space" when logged in.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:16:59 -08:00
Jeff Emmett f7ecf50588 feat: upgrade 6 module demos to use real interactive components
Replace static HTML mockups and WebSocket skeleton demos with the actual
self-contained web components (with built-in demo data) for rcart, rtube,
rfunds, rnotes, rtrips, and rvote — matching the rcal demo pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:10:52 -08:00
Jeff Emmett ef1d93d7e9 feat(encryptid): persist login across subdomains via cross-domain cookie
EncryptID sessions were lost when navigating between rspace.online
subdomains (e.g. demo→cca) because localStorage is per-origin. Now
stores a domain-wide cookie (eid_token, domain=.rspace.online, 30 days)
alongside localStorage. On new subdomain visits, the cookie is synced
to localStorage at module load time. Expired tokens are auto-refreshed
via the server before being discarded. Sign-out clears both stores.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:10:36 -08:00
Jeff Emmett 5408eb0376 feat: add outputPaths to module interface and browsable list pages
Add OutputPath type to RSpaceModule so each module declares what content
types it produces (e.g. notebooks, routes, campaigns). Auto-generate
browsable list pages at /:space/:moduleId/:path that render a card grid
inside the standard shell, fetching items from the module's API.

Declares outputPaths across 23 modules (rwallet/rinbox skipped).

Move campaign demo from standalone campaign-demo space to
/rsocials/campaign route with a dedicated timeline view and
/api/campaigns endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:55:29 -08:00
Jeff Emmett 4979c3d80c feat(rcal): replace static demo with interactive folk-calendar-view
The demo page was a frozen July 2026 static HTML grid with no real
functionality. Now embeds <folk-calendar-view space="demo"> which
provides full month/week/day views, navigation, lunar overlay, source
filtering, event modals, keyboard shortcuts, and 37 demo events.
Keeps hero, temporal zoom showcase, feature cards, ecosystem
integrations, and CTA sections around the interactive component.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:49:13 -08:00
Jeff Emmett 317bc46de6 feat: three-state FUN — present, forgotten (faded), deleted
Shapes now have three states instead of two. "Forgetting" a shape fades
it (35% opacity, greyscale) for all connected clients rather than hiding
it. Other users can then choose to "forget too", "remember" (restore),
or "delete" (hard-remove from DOM). A forgottenBy map tracks who forgot,
enabling social signaling around shared attention.

- folk-shape.ts: :state(forgotten) CSS + forgotten property
- community-sync.ts: forgetShape(id,did), rememberShape, hardDeleteShape,
  getShapeVisualState, hasUserForgotten, getFadedShapes, getDeletedShapes
- community-store.ts: forgottenBy map server-side, rememberShape clears map
- canvas.html: right-click context menu, two-section memory panel (Fading/
  Deleted), close button fades instead of removes, Delete key escalates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:44:02 -08:00
Jeff Emmett a61f562bbf feat: persistent tab bar, offline save improvements, and shape validation
- Tab bar state persists to localStorage per space
- Emergency synchronous localStorage fallback for beforeunload saves
- Merge Automerge full-sync instead of replacing (preserves local changes)
- Validate shape coordinates before applying (prevent NaN/Infinity)
- Save on visibilitychange for mobile browser tab backgrounding
- Add OutputPath type for module browsable content types
- Fix canvas module ID from "canvas" to "rspace" in tab-cache

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:11:14 -08:00
Jeff Emmett f69ee9f977 fix: shape resize sync and transform event name alignment
- Sync #attrWidth/#attrHeight during resize so CSS reflects new dimensions
- Call #dispatchTransformEvent() directly for immediate visual update
- Fix TransformEvent to fire "folk-transform" matching CommunitySync listeners
- Reduce min-width/min-height on folk-markdown and folk-wrapper to 80x40px

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:11:02 -08:00
Jeff Emmett c7674ac526 feat: color-coded visibility badges and contextual space display names
- Visibility badges now color-coded: green (public), yellow (permissioned),
  red (private) with matching card border tints
- Public spaces show eye icon instead of lock
- Private spaces display as "username's (you)rSpace" instead of raw name
- Applied consistently across space switcher dropdown and My Spaces modal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:42:06 -08:00
Jeff Emmett aeb9247f96 fix: shape resize/rotate by converting screen coords to canvas space
Resize and rotation handlers in folk-shape.ts passed raw event.clientX/Y
(screen coordinates) to toLocalSpace/angleFromOrigin, but those methods
expect canvas-parent coordinates. With any zoom/pan, the two coordinate
systems diverge, making resize non-functional and rotation erratic.

Added #screenToParent() to convert viewport coords to the parent's
coordinate space using getBoundingClientRect + parent scale. Applied to:
- Resize handle drag (pointermove → toLocalSpace)
- Rotation start (pointerdown → angleFromOrigin)
- Rotation drag (pointermove → angleFromOrigin)

Also syncs ghost placeholder size with zoom changes so the dotted
preview stays accurate if user zooms while in placement mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:38:06 -08:00
Jeff Emmett 7616fe0757 feat: show resize handles on selected shapes + pan-first canvas navigation
Resize handles now appear when a shape is highlighted/focused, not just during
active drag. Canvas left-click+drag now pans by default; hold 250ms then drag
for marquee selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:13:22 -08:00
Jeff Emmett 2bbe50991d fix: exclude server paths from space-to-subdomain redirect
The bare-domain routing logic was redirecting all multi-segment paths
like /api/modules → api.rspace.online/modules. Add exclusion for
known server path prefixes (api, admin, admin-data, admin-action,
.well-known) so they fall through to Hono route handlers instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 23:11:49 -08:00
Jeff Emmett 85ac897a1a fix: use single-segment admin endpoints to bypass Cloudflare redirect
Cloudflare has a wildcard rule that redirects any multi-segment path
on rspace.online to a subdomain (e.g. /foo/bar → foo.rspace.online/bar).
This broke both /api/* and /admin/api/* paths.

Replace with single-segment endpoints:
- GET /admin-data — returns spaces + modules (admin-only)
- POST /admin-action — handles mutations like delete-space

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:58:37 -08:00
Jeff Emmett caae204c2b fix: bypass Cloudflare /api/* redirect for admin dashboard
Cloudflare has a redirect rule that rewrites rspace.online/api/* to
http://api.rspace.online/*, causing Mixed Content errors in the browser.
Add a separate /admin/api router that serves the same admin data at
paths that don't trigger the redirect rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:51:23 -08:00
Jeff Emmett 8d77c6eee8 fix: canvas tools place shapes exactly where the ghost placeholder shows
- newShape() with explicit position now places directly at click point
  instead of routing through findFreePosition spiral which could nudge
  the shape away from the cursor
- Sticky note converted to setPendingTool so it shows dotted placeholder
  before placement instead of instantly spawning at viewport center
- Feed tool converted to setPendingTool with __postCreate for the same
  click-to-place UX
- Removed wb-sticky from mobile keepOpen list since it's now a
  placement tool that should close the menu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:42:33 -08:00