feat(composer)!: remove TipTap engine and batch pre-1.0 renames - #50
Merged
Conversation
|
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.
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.tstests/composer-document.test.ts(serialize fixtures already mirrored incomposer-segments.test.ts) and thechipSegmentsToParagraphJSONblock fromtests/chip-markdown.test.ts(replaced bysegmentsToParagraphJSON, covered incomposer-segments.test.ts)Composer.TextareaLegacy,ComposerTextareaLegacyProps,createTiptapRegisteredEditor,createMentionChipExtension,MentionChipOptions,commandListPluginKey,snapshotFromEditor,applySnapshotToEditor,serializeEditorContentDependencies
The package now installs two runtime deps, down from eight:
The three
prosemirror-*root overrides are gone too.rg -i "tiptap|prosemirror" packages/chatreturns zero hits, andbun.lockhas 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:
CommandListPluginStateActiveTokenStateComposerSnapshot.__pmDocComposerSnapshot.__docTriggerRulevalue"after-whitespace""word-boundary"ComposerState.textarea= controller +hasContent{ hasContent }"after-whitespace"also fires at line start, so the old name was factually wrong. Thetextareaslice reduction is safe — only two call sites read it, both forhasContent; the imperative methods live onstore.controller/useComposerController()as before.Also in here
Three things found along the way, called out so they don't look like scope creep:
biome checkwas already failing onmain— the a11y negative-control fixture inharness.a11y.test.tsxtripsuseValidAriaValueson its deliberatearia-label="". Extended the ignore comment. Relevant because CI runsbiome check, so re-enabling that workflow would have failed on an unrelated pre-existing error.useComposerContextStorethrows outside<Composer>, andCHAT_ARCHITECTURE.mdstill called the composer a page-level singleton. Corrected there and in the package README.@floating-ui/domrelaxed from1.7.6to^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
tsc --noEmitclean at the root and in the packagebiome checkcleanpublintcleanrg -i "tiptap|prosemirror" packages/chat-> zero hitsPre-existing
isolatedDeclarationswarnings (TS9007/TS9010) still appear during dts generation;mainhas the same ones plus more, and the.d.tsfiles generate fine, so they're untouched.Merging alongside #49
Conflicts with #49 in
package.jsonandbun.lockonly — 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, thenbun install.