Add undo/redo support to editable CodeBlock#3288
Merged
Alex-Tideman merged 3 commits intomainfrom Apr 13, 2026
Merged
Conversation
Enable CodeMirror's history() extension so existing historyKeymap keybindings (Cmd+Z / Cmd+Shift+Z) actually work. Annotate programmatic content replacements with addToHistory: false to keep prop syncs and blur reformats out of the undo stack.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
chene40
approved these changes
Apr 9, 2026
laurakwhit
approved these changes
Apr 10, 2026
temporal-cicd bot
pushed a commit
that referenced
this pull request
Apr 14, 2026
Auto-generated version bump from 2.48.2 to 2.48.3 Specific version: 2.48.3 Changes included: - [`59c95f8b`](59c95f8) Add undo/redo support to editable CodeBlock (#3288) - [`89269c62`](89269c6) chore: bump go.temporal.io/api to v1.62.8 and update go.sum (#3298) - [`8e795d8a`](8e795d8) Worker insights (#3087) - [`c58019ae`](c58019a) Use CountSchedules API (#3258) - [`a0d20fcc`](a0d20fc) Add optional initial name to search attribute defintion (#3303) - [`cbaf7549`](cbaf754) DT-3655 - add external payload count and size to workflow details (#3276) - [`0fe2b33c`](0fe2b33) Remove by-type option for activity commands (#3284)
laurakwhit
added a commit
that referenced
this pull request
Apr 14, 2026
Auto-generated version bump from 2.48.2 to 2.48.3 Specific version: 2.48.3 Changes included: - [`59c95f8b`](59c95f8) Add undo/redo support to editable CodeBlock (#3288) - [`89269c62`](89269c6) chore: bump go.temporal.io/api to v1.62.8 and update go.sum (#3298) - [`8e795d8a`](8e795d8) Worker insights (#3087) - [`c58019ae`](c58019a) Use CountSchedules API (#3258) - [`a0d20fcc`](a0d20fc) Add optional initial name to search attribute defintion (#3303) - [`cbaf7549`](cbaf754) DT-3655 - add external payload count and size to workflow details (#3276) - [`0fe2b33c`](0fe2b33) Remove by-type option for activity commands (#3284) Co-authored-by: laurakwhit <15069288+laurakwhit@users.noreply.github.com>
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.
Enable CodeMirror's history() extension so existing historyKeymap keybindings (Cmd+Z / Cmd+Shift+Z) actually work. Annotate programmatic content replacements with addToHistory: false to keep prop syncs and blur reformats out of the undo stack.
Description & motivation 💭
Summary
Context
The CodeBlock component already imported historyKeymap from @codemirror/commands and wired it into the keymap, but never registered the history() extension that provides the actual undo/redo state tracking. The keybindings were present but silently no-op'd because there was no history state to operate on.
Test plan
Screenshots (if applicable) 📸
Undo.Redo.CodeBlock.mov
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?