Skip to content

feat(#754 editor): unit #8 — TipTap editor + embeds on TanStack#770

Merged
hellno merged 3 commits into
mainfrom
hellno/tiptap-editor-embeds-tanstack
Jun 21, 2026
Merged

feat(#754 editor): unit #8 — TipTap editor + embeds on TanStack#770
hellno merged 3 commits into
mainfrom
hellno/tiptap-editor-embeds-tanstack

Conversation

@hellno

@hellno hellno commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Unit #8 of the Next→TanStack-Start-on-Cloudflare migration (epic #754, Track B). Blocked-by #3 ✅, #5 ✅ (+ #10 ✅ for the editor's data routes). Spec: docs/migration/phase-2-editor.md.

⚠️ DO NOT MERGE yet — per the migration recipe this lands after review; status is 🔍.

What this unit does

Makes NewCastEditor (TipTap) render + function on the TanStack/workerd client, reached through the already-mounted NewCastModal (titlebar Cast / cmd+k). The editor's mount path (#5) and the data routes it calls (#10) were pre-wired, so this is fundamentally a prove-it-works + spec unit — the first real React 19 + @tiptap/react v3 interactive QA (deferred from phase-1).

Verified on the workerd canary (web:serve) in real Chromium — zero console/page errors

  • TipTap mounts + composes; @-mention dropdown (→ /api/users/search) renders + inserts; /channel (→ /api/channels/search).
  • Image upload (Cloudinary, direct client POST) → image embed renders; URL auto-detect → embed card.
  • Link-embed OG previews degrade gracefully (plain UrlEmbed card) while /api/embeds/metadata is unported — that route is trek-WASM-coupled and owned by unit Bump @sentry/vite-plugin from 2.7.0 to 2.7.1 #11.

Bundle invariants (the editor adds nothing to the worker)

  • 0 TipTap/ProseMirror modules in dist/server; editor lives only in the dist/client chunk.
  • worker gzip 2293.58 KiB < 3 MB (unchanged from #5's 2289 KiB high-water).
  • web:build, web:typecheck, live pnpm typecheck all 0.

Changes

Non-goals (deferred, documented in the spec)

Boundaries respected: src/web/ only; no app/, pages/, next.config.mjs, vercel.json, src/globals.css.

Make NewCastEditor (TipTap) render + function on the TanStack/workerd client
through the already-mounted NewCastModal (titlebar "Cast" / cmd+k). The editor's
mount path (#5) and data routes (#10) were pre-wired; this unit is the first real
React-19 + @tiptap/react v3 interactive QA, plus a throwaway canary probe and the
spec documenting the seams and the one data boundary.

What works (verified on the workerd canary in real Chromium, zero console/page errors):
- TipTap mounts + composes; @-mention dropdown (→ /api/users/search) renders + inserts;
  /channel (→ /api/channels/search); image upload (Cloudinary, direct client POST) →
  image embed renders; URL auto-detect → embed card.
- Link-embed OG previews degrade gracefully (UrlEmbed card) while /api/embeds/metadata
  is unported — that route is trek-WASM-coupled and owned by unit #11.

Bundle invariants (unchanged from #5; the editor adds nothing to the worker):
- 0 TipTap/ProseMirror modules in dist/server; editor only in the dist/client chunk.
- worker gzip 2293.58 KiB < 3 MB; web:build / web:typecheck / live typecheck all 0.

Non-goals: end-to-end publish needs an account + signer (#9); no /api/embeds/metadata
(#11); no /post thread-composer page; no shared-file or vite.config edits (the editor
was already in ssrClientOnlyModules and the Cloudinary define keys landed in #5).

Files: docs/migration/phase-2-editor.md (spec), src/web/routes/profile-editor-probe.tsx
(throwaway canary probe; path-prefixed to ride the AuthContext /profile allowlist),
strategy.md status (#6 → ✅ housekeeping, #8 → 🔍).
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
herocast Ready Ready Preview Jun 21, 2026 12:02pm

@hellno hellno merged commit 958778a into main Jun 21, 2026
1 of 2 checks passed
@hellno hellno deleted the hellno/tiptap-editor-embeds-tanstack branch June 21, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant