Notes editor: task checkbox has no Undo #1433

Closed
opened 2026-10-08 03:16:14 +00:00 by kayg · 4 comments
Owner

Reproduction

  1. Open the seeded Markdown Note in the production web build.
  2. Click the unchecked Task to finish checkbox in the Note body.
  3. Wait for the Notes API to save the change.
  4. Press ⌘Z.

Expected

The checkbox changes to checked, and the User can undo that state change with the normal Undo action or ⌘Z.

Actual

The UI and saved Markdown change from - [ ] Task to finish to - [x] Task to finish. No Undo button appears, and ⌘Z leaves the task checked. The User must click the checkbox again to restore the prior state.

This is the Markdown task item inside a Note, not the standalone Tasks view covered by #1229. The Notes editor uses the shared task node in packages/editor/src/components/TaskItemView.svelte, so this bash job filed the issue and did not edit the shared editor core.

Evidence

artifacts/bash3-notes/task-checkbox-no-undo-1440-light.png — production build, Chromium with macOS platform emulation, 1×, light theme. The real Note API confirmed the checked Markdown after ⌘Z. The accessible checkbox exposed role checkbox, name Task: Task to finish, and state aria-checked=true.

Severity: minor.

## Reproduction 1. Open the seeded Markdown Note in the production web build. 2. Click the unchecked `Task to finish` checkbox in the Note body. 3. Wait for the Notes API to save the change. 4. Press ⌘Z. ## Expected The checkbox changes to checked, and the User can undo that state change with the normal Undo action or ⌘Z. ## Actual The UI and saved Markdown change from `- [ ] Task to finish` to `- [x] Task to finish`. No Undo button appears, and ⌘Z leaves the task checked. The User must click the checkbox again to restore the prior state. This is the Markdown task item inside a Note, not the standalone Tasks view covered by #1229. The Notes editor uses the shared task node in `packages/editor/src/components/TaskItemView.svelte`, so this bash job filed the issue and did not edit the shared editor core. ## Evidence `artifacts/bash3-notes/task-checkbox-no-undo-1440-light.png` — production build, Chromium with macOS platform emulation, 1×, light theme. The real Note API confirmed the checked Markdown after ⌘Z. The accessible checkbox exposed role `checkbox`, name `Task: Task to finish`, and state `aria-checked=true`. Severity: minor.
Author
Owner

Reproduction detail from the fully ready editor: enter text-edit mode on the Note task row, then press Space to check it (pointer also works in edit mode). The API saves - [x] Task to finish; no Undo button appears, and ⌘Z leaves it checked. In reading mode, pointer activation is separately covered by #1434.

Reproduction detail from the fully ready editor: enter text-edit mode on the Note task row, then press Space to check it (pointer also works in edit mode). The API saves `- [x] Task to finish`; no Undo button appears, and ⌘Z leaves it checked. In reading mode, pointer activation is separately covered by #1434.
Author
Owner

taskundo-1433 started on branch job/taskundo-1433, base d395b6e25.

taskundo-1433 started on branch job/taskundo-1433, base d395b6e25.
Author
Owner

taskundo-1433 finished. Head 3b9f476ec (base d395b6e25, merged origin/dev: already up to date).
Root cause: after a click the checkbox button holds focus; ProseMirror ignores keys from node-view DOM, so Cmd+Z never reached editor history. Fix: TaskItemView routes Cmd+Z / Cmd+Shift+Z / Cmd+Y from the checkbox slot to the editor history, and each toggle is isolated (closeHistoryStep before and after) in ProseMirror and Yjs history. closeHistoryStep and stopCollaborativeCapture are exported from collaborationHistoryKeys.ts (same export as wklink-1371).
Tests: packages/editor collaborationUndo.test.ts (2 new, fail before fix); real-browser apps/web/e2e/task-undo-1433.mjs (failed at Cmd+Z before the fix on the old build, PASS after). Gates: bun run check exit 0; apps/web test 297 files / 2116 tests passed; packages/editor 22 files / 447 tests passed.
Screenshots: artifacts/taskundo-1433/ in the worktree (390/820/1440, light/dark, after click, after undo, keyboard flow).

taskundo-1433 finished. Head 3b9f476ec (base d395b6e25, merged origin/dev: already up to date). Root cause: after a click the checkbox button holds focus; ProseMirror ignores keys from node-view DOM, so Cmd+Z never reached editor history. Fix: TaskItemView routes Cmd+Z / Cmd+Shift+Z / Cmd+Y from the checkbox slot to the editor history, and each toggle is isolated (closeHistoryStep before and after) in ProseMirror and Yjs history. closeHistoryStep and stopCollaborativeCapture are exported from collaborationHistoryKeys.ts (same export as wklink-1371). Tests: packages/editor collaborationUndo.test.ts (2 new, fail before fix); real-browser apps/web/e2e/task-undo-1433.mjs (failed at Cmd+Z before the fix on the old build, PASS after). Gates: bun run check exit 0; apps/web test 297 files / 2116 tests passed; packages/editor 22 files / 447 tests passed. Screenshots: artifacts/taskundo-1433/ in the worktree (390/820/1440, light/dark, after click, after undo, keyboard flow).
Author
Owner

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.
kayg closed this issue 2026-10-08 18:41:38 +00:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1433
No description provided.