Commit Graph

6 Commits

Author SHA1 Message Date
Jeff Emmett a5c7bb784e fix(rsocials): subdomain-aware link generation
Links on subdomain routing (e.g. jeff.rspace.online) were including
the space in the path (/demo/rsocials/campaigns) instead of just
/rsocials/campaigns. Added basePath getter to all components and
detect subdomain in the server-rendered hub page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 23:31:45 -07:00
Jeff Emmett a689445af5 feat(rcal): add swipe/pan navigation and pinch-to-zoom gestures
Add pointer-based gesture handling to the calendar for lateral navigation
(drag/swipe left/right) and pinch-to-zoom between temporal layers. Also
fix dark mode across 30+ canvas shape components by replacing hardcoded
white backgrounds and input styles with --rs-* CSS custom property
references (with light-mode fallbacks).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:12:47 -07:00
Jeff Emmett c73635dcd3 fix(rsocials): remove redundant /demo space prefix from internal URLs
Subdomain routing (demo.rspace.online) already prepends the space,
so links should use /rsocials/... not /demo/rsocials/...

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:38:57 -07:00
Jeff Emmett 6173e17bb9 feat(rsocials): hub navigation page, route renames, and campaigns listing
Restructure rSocials landing to a hub with navigation cards for Campaigns,
Threads, and Thread Editor. Rename /thread routes to /thread-editor for
clarity. Render campaigns listing inline instead of redirecting. Also
improve rNotes notebook creation to auto-open first note for editing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:31:23 -07:00
Jeff Emmett 0abfce2991 fix: thread builder save crash — await Automerge doc open before write
Two bugs fixed:
- attachShadow called unconditionally in connectedCallback, crashing on
  re-insertion ("Shadow root cannot be created on a host which already
  hosts a shadow tree")
- saveToAutomerge/deleteFromAutomerge called runtime.change() before the
  async subscribeOffline() had resolved, causing "Document not open" errors

Now tracks the subscribe promise and awaits it before any write operation.
Also guards shadow root creation in gallery and campaign manager components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:38:50 -08:00
Jeff Emmett 831c8b1c24 feat: refactor rSocials from monolith to full rApp
Decompose the 2,116-line mod.ts into a canonical rApp matching the
rFlows/rBooks pattern with Automerge sync, web components, and
extracted CSS.

New files:
- schemas.ts: SocialsDoc, ThreadData, Campaign types + Automerge schema
- local-first-client.ts: browser-side sync client
- lib/types.ts: shared types, DEMO_FEED, PLATFORM_LIMITS
- lib/image-gen.ts: server-only fal.ai + file upload helpers
- components/folk-thread-builder.ts: compose/preview/readonly component
- components/folk-thread-gallery.ts: thread listing grid component
- components/folk-campaign-manager.ts: campaign viewer with import modal
- components/socials.css: all extracted CSS (~550 lines)

mod.ts slimmed to ~616 lines: ensureDoc, image APIs, page routes
injecting <folk-*> web components, file→Automerge migration, seed
template, and module export. Thread/campaign CRUD moved from REST
to Automerge local-first sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:42:18 -08:00