Skip to content

Remove the Tiptap AI path that was never switched on - #1166

Merged
yattias merged 2 commits into
mainfrom
cleanup/3-tiptap-ai
Oct 11, 2026
Merged

yattias merged 2 commits into
mainfrom
cleanup/3-tiptap-ai

Conversation

@yattias

@yattias yattias commented Oct 10, 2026

Copy link
Copy Markdown
Member

Third chunk of the dead-code removal plan (docs/dead-code-report.md, kept local), following #1165.

useBlockEditor only registered the Ai, AiWriter and AiImage extensions when it was handed an aiToken, and no caller ever passed one. The AI dropdown was commented out of the text menu and the AI entries out of the slash-command groups. The whole path was unreachable, so it goes:

What goes

  • Extensions and UI: components/Editor/extensions/Ai, AiImage, AiWriter (with their node views), AIDropdown, the nine ai* commands in useTextmenuCommands, the aiToken / userId / userName plumbing in useBlockEditor, the AiWriter / AiImage names in isCustomNodeSelected and the extensions barrel, and the commented-out AI slash-command group.
  • Data only the AI UI read: the language and tone tables plus the collab demo names and colours in Editor/lib/constants.tsx (themeColors stays for the colour picker), BlockEditor/types.tsx (typed only those), and the editor's own Loader, Textarea and PanelHeadline, which only the AI views rendered.
  • Routes with no caller: app/notebook/api/ai minted an AI token nothing fetched; app/notebook/api/collaboration did the same for a collab token and the editor has no collaboration provider. TIPTAP_AI_SECRET, NEXT_PUBLIC_TIPTAP_AI_BASE_URL and the Collab Cloud variables leave .env.example.
  • Dependency: @tiptap-pro/extension-ai (one fewer private-registry package).

Kept on purpose: jsonwebtoken, TIPTAP_CONVERT_SECRET and NEXT_PUBLIC_TIPTAP_APP_ID, which the document-import route still signs with.

29 files changed, 1,179 lines removed, 7 added (comment rewording). No behaviour change intended.

Checks

  • npm run lint: 0 errors (2 pre-existing warnings in untouched files)
  • npm run type-check: clean
  • knip re-run: no unused files, no new unused exports or dependency issues
  • Dev server on the branch: pages that render the block editor read-only (RFP and proposal pages) compile and render; all main routes return 200

Next

Chunk 4 (cleanup/4-flags-and-barrels) follows once this is merged.

🤖 Generated with Claude Code

Third chunk of the dead-code plan. useBlockEditor only registered the Ai,
AiWriter and AiImage extensions when it was handed an aiToken, and no
caller ever passed one; the AI dropdown was commented out of the text menu
and the AI entries out of the slash command groups. So the whole path was
unreachable:

- the Ai, AiImage and AiWriter extensions with their node views, the
  AIDropdown, the nine ai* text-menu commands, the aiToken/userId/userName
  plumbing in useBlockEditor, the AiWriter/AiImage names in
  isCustomNodeSelected and the extensions barrel, and the commented-out
  slash command group;
- the language/tone tables and the collab demo names and colours in
  Editor/lib/constants (themeColors stays for the colour picker), the
  BlockEditor/types file that only typed them, and the editor's own
  Loader, Textarea and PanelHeadline that only the AI views rendered;
- app/notebook/api/ai (minted the AI token nothing fetched) and
  app/notebook/api/collaboration (same, for a collab token; the editor has
  no collaboration provider), with TIPTAP_AI_SECRET, the Collab Cloud
  variables and the AI base URL dropped from .env.example;
- @tiptap-pro/extension-ai from package.json.

jsonwebtoken, TIPTAP_CONVERT_SECRET and NEXT_PUBLIC_TIPTAP_APP_ID stay:
the document import route still signs with them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@yattias
yattias requested a review from a team as a code owner October 10, 2026 13:41
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
web Ready Ready Preview Oct 11, 2026 1:45am UTC

Request Review

@yattias
yattias merged commit 0e48b75 into main Oct 11, 2026
1 of 2 checks passed
@yattias
yattias deleted the cleanup/3-tiptap-ai branch October 11, 2026 01:44
@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
Preview — 6b7648de Deployed Oct 11, 2026 by vercel[bot]
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