Skip to content

Disable TipTap undo/redo when the history feature is disabled - #6312

Open
VPS-Obi wants to merge 1 commit into
claude/tiptap-config-refactor-gpupqjfrom
claude/github-pr-discussion-1hfgdn
Open

Disable TipTap undo/redo when the history feature is disabled#6312
VPS-Obi wants to merge 1 commit into
claude/tiptap-config-refactor-gpupqjfrom
claude/github-pr-discussion-1hfgdn

Conversation

@VPS-Obi

@VPS-Obi VPS-Obi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Addresses #6311 (comment): disabling the history feature of the TipTap Rich Text Block only hid the undo/redo toolbar buttons. TipTap's undoRedo extension stayed enabled because StarterKit.configure never received undoRedo: false, so the keyboard shortcuts kept working and the editor kept tracking history — the feature looked disabled but wasn't.

https://claude.ai/code/session_01AL6Fd1WgimvhAaUtUiRAcK

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Team

Run ID: 301ebd09-b65a-433f-bb1e-2db71cfe71e7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Team

Run ID: 9baac940-c464-4d36-933c-cd2ab7a42e87

📥 Commits

Reviewing files that changed from the base of the PR and between e158cc6 and a0a6f03.

📒 Files selected for processing (3)
  • .changeset/tiptap-disable-undo-redo.md
  • packages/admin/cms-admin/src/blocks/tipTap/TipTapToolbar.tsx
  • packages/admin/cms-admin/src/blocks/tipTap/createTipTapRichTextBlock.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Disabled undo and redo functionality when the history feature is turned off, including keyboard shortcuts and history tracking.
    • Updated the editor toolbar to accurately reflect undo and redo availability.

Walkthrough

TipTap now disables undo and redo functionality when the history feature is disabled. The change covers the StarterKit extension, toolbar availability checks, keyboard shortcuts, and history tracking.

Changes

TipTap history control

Layer / File(s) Summary
Gate TipTap history controls
packages/admin/cms-admin/src/blocks/tipTap/createTipTapRichTextBlock.tsx, packages/admin/cms-admin/src/blocks/tipTap/TipTapToolbar.tsx, .changeset/tiptap-disable-undo-redo.md
StarterKit enables or disables undo and redo based on features.history. The toolbar hides command availability when history is disabled. The changeset documents the patch.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to a0a6f

This change disables TipTap history, undo/redo shortcuts, and toolbar availability consistently when the history feature is off. No current merge-readiness risk remains.

Suggested reviewers: claude, copilot, vps-andreas

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: disabling TipTap undo/redo when the history feature is disabled.
Description check ✅ Passed The description directly explains the history feature issue and the changes that disable TipTap undo/redo behavior, keyboard shortcuts, and history tracking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Requires Human Review ✅ Passed The patch changes only two existing TipTap source files and adds one .changeset/*.md file. It adds 4 hand-written source lines, which is below 300. The patch does not touch authentication, authoriza…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)

Full details: Requires Human Review

Explanation

The patch changes only two existing TipTap source files and adds one .changeset/*.md file. It adds 4 hand-written source lines, which is below 300. The patch does not touch authentication, authorization, migrations, CI workflows, secrets, credentials, or tests. It does not alter exported declarations or public API signatures.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/github-pr-discussion-1hfgdn

Comment @coderabbitai help to get the list of available commands.

@VPS-Obi VPS-Obi self-assigned this Sep 3, 2026
@VPS-Obi VPS-Obi changed the title Replace TipTap Rich Text Block supports array with per-feature options Disable TipTap undo/redo when the history feature is disabled Sep 3, 2026
@VPS-Obi
VPS-Obi changed the base branch from main to claude/tiptap-config-refactor-gpupqj September 3, 2026 14:51
@VPS-Obi
VPS-Obi marked this pull request as ready for review September 3, 2026 14:54
@VPS-Obi
VPS-Obi requested a review from nsams September 3, 2026 14:54
The `history` option only hid the undo/redo toolbar buttons while TipTap's
undoRedo extension stayed enabled, so the keyboard shortcuts kept working and
the editor still tracked history. Pass `undoRedo: false` to StarterKit so the
extension and its shortcuts follow the configured feature.

Removing the extension also removes its `undo`/`redo` commands, so the toolbar
must no longer query them via `editor.can()` when the feature is disabled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AL6Fd1WgimvhAaUtUiRAcK
@VPS-Obi
VPS-Obi force-pushed the claude/github-pr-discussion-1hfgdn branch from a0a6f03 to 4bd226c Compare September 3, 2026 15:03
@nsams

nsams commented Sep 4, 2026

Copy link
Copy Markdown
Member

Does this solve a problem?

I don't see a reason why undo/redo should not work using keyboard. Like it does for every other text input.

The reason for the config setting is maybe only to get a clean toolbar.

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.

3 participants