Migrate to TipTap v3
Context & Requests for Reviewers
Dependabot tried to do this but it's a major change, so there's a bit of additional work to migrate.
Upgrade guide here: https://tiptap.dev/docs/guides/upgrade-tiptap-v2
TipTap v3 adds a few new default tools to the editor like underline and link. I removed those to keep things relatively consistent. There are a few minor changes:
- pasting numbered plain text now creates an ordered list automatically
- typing a numeric list marker no longer auto-joins it to a preceding alphabetic list
Tests
I tested this in my browser. Works just fine!
https://github.com/user-attachments/assets/4f1b071e-fc98-43d7-84a2-296c8843f045
(Optional) Rollout Plan
Release notes
Improve list editing in the policy editor
Checklist
Only check items that apply to this PR; leave the rest unchecked.
-
If you changed anything user-facing (i.e. user interface or APIs):
Did you update related docs? -
If the change is notable (refer to Keep a Changelog conventions):
Did you update CHANGELOG.md? -
If you changed
db/src/scripts/**and usedCREATE TABLE,ADD COLUMN, orALTER COLUMN:
Are as many columns markedNOT NULLas possible? If some columns can sometimes be null depending on other columns, are thereCHECKconstraints capturing those relationships, and are these also reflected using unions in the associated Kysely types? -
If you added a new signal in
server/services/signalsService/signals/**:
Did you classify every error case as a permanent error (SignalPermanentError, no retry) or a normal error (retryable)? Any case where the signal can't determine a score should be aSignalPermanentError.
Summary by cubic
Upgrades the policy markdown editor to TipTap v3, disabling the new default extensions (link, underline, listKeymap, trailingNode, codeBlock exit on arrow up) so existing behavior is preserved. Pasting numbered plain text now auto-creates an ordered list, and numeric list markers no longer join a preceding alphabetic list.
Also avoids redundant editor renders by setting content without emitting an update transaction.