feat(#754 editor): unit #8 — TipTap editor + embeds on TanStack#770
Merged
Conversation
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 → 🔍).
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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/api/users/search) renders + inserts; /channel (→/api/channels/search).UrlEmbedcard) while/api/embeds/metadatais 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)
dist/server; editor lives only in thedist/clientchunk.web:build,web:typecheck, livepnpm typecheckall 0.Changes
docs/migration/phase-2-editor.md— the unit spec (objective, audit, gotchas, cf-canary DoD, follow-ups).src/web/routes/profile-editor-probe.tsx— throwaway canary probe mounting the editor outside the shell; path-prefixedprofile-to ride AuthContext's logged-out/profileallowlist (no shared-file edit; enumerated for the custom channels #13 probe sweep).docs/migration/strategy.md— status: Add support for user reactions to posts #6 → ✅ (housekeeping, PR feat(#754 feeds-profile): unit #6 — feeds + profile on TanStack #768 merged) and Bump @supabase/auth-ui-react from 0.4.3 to 0.4.4 #8 → 🔍.Non-goals (deferred, documented in the spec)
/api/embeds/metadata(rich link previews, trek-WASM) → Bump @sentry/vite-plugin from 2.7.0 to 2.7.1 #11./postthread-composer page (statically importsNewCastEditor) → later surface unit.src/orvite.config.mtsedits (the editor was already inssrClientOnlyModulesand the Cloudinarydefinekeys landed in #5).Boundaries respected:
src/web/only; noapp/,pages/,next.config.mjs,vercel.json,src/globals.css.