onChange handler was resetting _tweetImages on every sync event,
undoing local deletions before they could round-trip. Now only
updates state in readonly mode; edit mode preserves local changes.
Also add cache-busting timestamps to uploaded/generated image URLs
to prevent browser from showing stale cached images.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Automerge proxy objects silently ignore property writes outside
change() calls. When this._thread was a proxy, removeTweetImage's
assignment to this._thread.tweetImages was silently discarded,
causing deleted photos to reappear.
Fix by deep-cloning all Automerge reads (subscribeOffline, onChange,
loadDraft) so this._thread is always a plain mutable object.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the title input and header image upload/generate section from
the thread builder editor. Title is now auto-derived from first tweet.
Add link preview cards that render inline in tweet content, similar to
Twitter's URL card unfurling. Server-side /api/link-preview endpoint
fetches OG metadata (title, description, image) with caching.
URLs in tweet text are rendered as clickable links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace infographic/typography prompts with atmospheric abstract art
prompts. Images now use flowing gradients, organic shapes, and moody
lighting to evoke the tweet's theme without any text or typography.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace generic "dark themed, minimal" prompts with detailed
infographic-style prompts that generate bold, shareable visuals
with typography overlays, iconic symbols, and data-viz elements.
Add try/catch error handling around fal.ai calls to prevent
unhandled network errors from crashing the request handler.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass /data/ paths through subdomain routing without rewriting so
generated image files are accessible on *.rspace.online subdomains.
Move image upload/generate section above the compose textarea in the
thread builder editor layout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Automerge throws "Cannot create a reference to an existing document
object" when assigning an Automerge proxy object back into the doc.
Now JSON round-trips the thread data before writing, and strips null
fields that should be absent rather than null in the document.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- tweetImages and imageUrl set to null instead of undefined when empty
(Automerge rejects undefined as invalid JSON)
- Updated ThreadData schema to allow null for optional fields
- This was the root cause of the 404 on image generation: saveDraft
threw on undefined, so the thread never synced to the server, and
the server-side route returned "Thread not found"
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs:
- subscribeOffline() bailed if runtime wasn't initialized yet (race with
shell.ts init). Now waits for runtime to appear, then awaits init().
- getDoc() called runtime.getDoc() which doesn't exist — method is
runtime.get(). Caused "e.getDoc is not a function" crash in listThreads.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All callers of saveDraft() and saveToAutomerge() in generateImage,
uploadImage, uploadTweetImage, generateTweetImage, removeTweetImage,
and share handler now properly await these async methods. Without await,
runtime.change() fires before the Automerge doc subscription resolves,
causing "Document not open" errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
basePath was always returning /{space}/rsocials/ which works for path-based
routing (rspace.online/jeff/rsocials/) but double-prefixes on subdomain
routing (jeff.rspace.online/jeff/rsocials/ → rewritten to /jeff/jeff/rsocials/).
Now detects subdomain hosts (*.rspace.online, *.rsocials.online) and returns
/rsocials/ without the space prefix, since the space is the subdomain.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
The reverse proxy couldn't work for a Next.js SPA — it caused double
space prefix in redirects and couldn't handle /_next/* static assets.
Switch to iframe approach with demo.rsocials.online directly. Fix
template literal bugs where getSchedulerUrl() was passed as a string
literal instead of being evaluated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The rSpace Traefik router catches demo.rsocials.online (priority 120)
before the Postiz container can serve it, making iframe embedding fail.
Replace the iframe approach with a reverse proxy: /rsocials/scheduler/*
proxies to the Postiz container (postiz:5000) on the Docker network.
Rewrites redirect headers to stay within the scheduler path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The rSocials refactor commit overwrote the canvas route changes.
Re-adds: default canvas view, ?view=feed for old demo feed,
?view=landing for landing page, and vite build entry for
folk-socials-canvas.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The folk-flows-app sub-build imports Automerge which requires WASM support.
Added wasm() plugin, esnext target, and Automerge alias to the sub-build config.
Also adds folk-socials-canvas.ts and socials-canvas.css that were on the server
but missing from git, causing the vite build to fail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Space subdomain /rsocials now renders the same marketing landing page
as the bare domain, instead of the bare Community Feed placeholder.
Demo space still shows the demo feed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the always-visible Upload/AI button bar below each tweet with a
compact camera icon in the top-right corner that fades in on hover and
expands into a dropdown menu. Hides when an image is already attached.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each tweet in a thread can now have its own image — uploadable or
AI-generated via inline buttons in the preview cards. Images persist
across save/load, display in read-only view, and clean up on delete.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bare-domain URLs like rspace.online/rsocials/thread now render an info
page with CTAs instead of silently serving the functional app. The
functional app only appears inside a {space} context (e.g.
demo.rspace.online/rsocials/thread). API routes still pass through.
- Add SubPageInfo interface to shared/module.ts
- Add renderSubPageInfo() renderer to server/shell.ts
- Modify bare-domain routing: api/ passthrough → info page → demo fallback
- Add subPageInfos to 8 modules (rsocials, rflows, rnetwork, rtrips,
rbooks, rphotos, rinbox, rsplat)
- Add window.__rspaceSaveGate() auth prompt on write operations
- Wire save-gate into rsocials Thread Builder save handler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaced remaining hardcoded dark colors in campaign page CSS and
rsocials social feed CSS with theme custom properties so they
respond to light/dark mode toggle.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move <rstack-space-settings> outside the header element so its position:fixed
is relative to the viewport instead of the 56px header (backdrop-filter creates
a containing block for fixed descendants). Bump panel z-index above all canvas
elements. Also migrate hardcoded colors to CSS theme variables across shell
components.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The bare-domain rewrite (rspace.online/rsocials/thread → /demo/rsocials/thread)
injected /demo/ into __BASE_PATH__, causing fetches to /demo/rsocials/api/threads
which triggered a 301 redirect to http://demo.rspace.online (mixed content blocked).
Now derives the base path from the actual browser URL. Also fixed layout so compose
input is on the left and thread preview is on the right.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The space role middleware was blocking all POST/PUT requests from
unauthenticated users with a 403, preventing the thread builder's
save draft and share buttons from working. Added publicWrite module
flag to bypass the role check for modules with public API endpoints.
Also fixed saveDraft() to properly surface server errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow users to upload their own image as a thread preview alongside the
existing AI generation option. Adds upload-image API endpoint with file
type/size validation and two side-by-side UI buttons.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Thread builder now persists drafts to disk (JSON files in /data/files/threads/),
supports shareable permalink URLs with OG/Twitter meta tags, and generates
AI preview images via fal.ai for social card previews.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add /thread route with two-column tweet thread composer and live preview
- Add /campaigns redirect to /campaign
- Add "Import from Markdown" modal to campaign page with platform select
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
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>
Add ?view=app iframe integration for 4 existing modules (rNetwork→Twenty CRM,
rSocials→Postiz, rForum→Discourse, rFiles→Seafile) and 2 new modules
(rDocs→Docmost, rDesign→Affine). Each module shows its demo view by default
with an "Open Full App" button to switch to the iframe-embedded external app.
Also includes: splat demo data seeding, MI search bar mobile layout fix.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each folk-* web component detects space === "demo" and renders a
self-contained interactive demo with hardcoded data — no API calls or
WebSocket connections. Accessible at demo.rspace.online/{rApp}.
Includes: spider charts, drag-to-rank, live voting sim, kanban board,
video library, calendar with lunar phases, forum provisioner, email
client, conviction voting, trip planner, book shelf, pub editor,
wallet viewer, world map, analytics dashboard, cart shop, file browser,
swag designer, photo gallery, graph viewer, social feed, and funds river.
Also adds @media responsive CSS for mobile rendering across all modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Shape drag now accounts for canvas CSS transform scale so elements
track the cursor correctly at all zoom levels
- Collision resolution uses minimum penetration depth algorithm instead
of movement-direction bias, preventing elements from flipping sides
- Replaced all \uD83D surrogate pair escapes and \u00D7/\u276E/\u276F/
\u2022 escapes with actual Unicode characters across 60+ files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- (You)r* becomes the h1 heading, old titles preserved as subtitles
- Standardized section order: Features → How It Works → Built on Open Source → Your Data Protected → CTA
- Each module lists its open source dependencies (Typst, Immich, MapLibre, Discourse, etc.)
- New "Your Data, Protected" section with E2E encryption + zero-knowledge (coming soon)
- Added .rl-subtitle CSS class for subtitle styling
- Module-specific sections preserved between How It Works and Built on Open Source
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add (You)rModuleName tagline to all 22 module hero subtexts
- Move Try Demo button next to rApp dropdown in landing page header
- Add <rstack-mi> bar to landing page header center
- Create rNetwork landing page (was missing)
- Wire rNetwork landingPage into mod.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace broken proxy-based landing pages with inline HTML for every
module. Each gets a landing.ts exporting renderLanding() with hero,
how-it-works, features, and CTA sections using shared .rl-* CSS.
12 ported from standalone repos (rPubs, rWork, rVote, rCal, rCart,
rTrips, rNotes, rMaps, rForum, rInbox, rSocials, rWallet) and 9 new
(rBooks, rChoices, rData, rFiles, rFunds, rPhotos, rSplat, rSwag, rTube).
Infrastructure: RICH_LANDING_CSS in shell.ts, landingPage field on
RSpaceModule, routing checks inline content before proxy fallback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New rSocials module (federated social feed aggregator) with demo timeline
- Standalone domain root (r*.online/) now 302 redirects to rspace.online/{moduleId}
- Self-fetch detection breaks circular proxy loop (User-Agent: rSpace-Proxy/1.0)
- Traefik label for rsocials.online
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>