Skip to content

feat(composer)!: remove TipTap engine and batch pre-1.0 renames - #50

Merged
rpvilo merged 1 commit into
mainfrom
feature/remove-tiptap
Aug 3, 2026
Merged

feat(composer)!: remove TipTap engine and batch pre-1.0 renames#50
rpvilo merged 1 commit into
mainfrom
feature/remove-tiptap

Conversation

@rpvilo

@rpvilo rpvilo commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #34 — the final step of the editor migration (#32 seam, #33 engine). The hand-rolled contenteditable engine has been the default for weeks; this deletes the TipTap path behind it and batches the pre-1.0 renames that were parked for this PR.

Deletions

  • composer/textarea-legacy.tsx, composer/document.ts, composer/mention-chip.tsx, composer/prefix-plugin.ts
  • tests/composer-document.test.ts (serialize fixtures already mirrored in composer-segments.test.ts) and the chipSegmentsToParagraphJSON block from tests/chip-markdown.test.ts (replaced by segmentsToParagraphJSON, covered in composer-segments.test.ts)
  • Dead index exports: Composer.TextareaLegacy, ComposerTextareaLegacyProps, createTiptapRegisteredEditor, createMentionChipExtension, MentionChipOptions, commandListPluginKey, snapshotFromEditor, applySnapshotToEditor, serializeEditorContent

Dependencies

The package now installs two runtime deps, down from eight:

before: @floating-ui/dom, nanoid, 6x @tiptap/* (+ the ProseMirror tree)
after:  @floating-ui/dom, nanoid

The three prosemirror-* root overrides are gone too. rg -i "tiptap|prosemirror" packages/chat returns zero hits, and bun.lock has none either.

Note the dist size barely moved (95 KB -> 92 KB gzipped) because bunup externalized those deps anyway. The payoff is entirely in what consumers no longer install.

Breaking changes

Free while unpublished, which is why they were batched here:

Before After
CommandListPluginState ActiveTokenState
ComposerSnapshot.__pmDoc ComposerSnapshot.__doc
TriggerRule value "after-whitespace" "word-boundary"
ComposerState.textarea = controller + hasContent { hasContent }

"after-whitespace" also fires at line start, so the old name was factually wrong. The textarea slice reduction is safe — only two call sites read it, both for hasContent; the imperative methods live on store.controller / useComposerController() as before.

Also in here

Three things found along the way, called out so they don't look like scope creep:

  • biome check was already failing on main — the a11y negative-control fixture in harness.a11y.test.tsx trips useValidAriaValues on its deliberate aria-label="". Extended the ignore comment. Relevant because CI runs biome check, so re-enabling that workflow would have failed on an unrelated pre-existing error.
  • The docs described a "global-store fallback" that doesn't existuseComposerContextStore throws outside <Composer>, and CHAT_ARCHITECTURE.md still called the composer a page-level singleton. Corrected there and in the package README.
  • @floating-ui/dom relaxed from 1.7.6 to ^1.7.6 — an exact pin in a library dependency forces a duplicate install on consumers who already have a compatible version.

Docs swept for TipTap references: AGENTS.md, COMPONENTS.md, COMPOSER.md, MESSAGE.md, CHAT_ARCHITECTURE.md (its "TipTap setup" section now describes the actual engine), and the package README.

Verification

  • 179 tests pass
  • tsc --noEmit clean at the root and in the package
  • biome check clean
  • Package build + publint clean
  • App build succeeds
  • rg -i "tiptap|prosemirror" packages/chat -> zero hits

Pre-existing isolatedDeclarations warnings (TS9007/TS9010) still appear during dts generation; main has the same ones plus more, and the .d.ts files generate fine, so they're untouched.

Merging alongside #49

Conflicts with #49 in package.json and bun.lock only — both dependency manifests. Source files that both branches touch (components/ai/composer.tsx, packages/chat/src/chip-markdown.ts) auto-merge. Whichever lands second: keep both sides' manifest changes, then bun install.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
intentface-chat Ready Ready Preview Aug 3, 2026 10:56am

Request Review

@rpvilo
rpvilo merged commit 08534ea into main Aug 3, 2026
2 checks passed
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.

PR 3: remove TipTap — legacy editor deletion + breaking cleanups

1 participant