Skip to content

cardtile editor: cancelling a just-added tile discards it - #62

Merged
cverorg merged 1 commit into
mainfrom
kitt/card-editor-cancel-new
Sep 24, 2026
Merged

cverorg merged 1 commit into
mainfrom
kitt/card-editor-cancel-new

Conversation

@cverorg

@cverorg cverorg commented Sep 24, 2026

Copy link
Copy Markdown
Member

Measured on production: add a tile → its sheet opens → ✕ without filling anything → the empty tile stayed (board: 'Video'; card: a dashed placeholder), and the person had to find and delete it. Now ✕/Escape/scrim on a just-added, never-saved tile restores the pre-add markdown byte for byte (undo history truncated to before the add); Done keeps it; an existing tile's ✕ is unchanged. Pure helper newTileCancelTarget + 3 bundle-level tests (add→✕ identical; add→Done present and a later ✕ keeps; existing ✕ keeps). Verified on the preview Worker in WebKit (before 2 → cancel 2 → done 3; draft has no video, has the kept text). Tests 276/276.

…dded discards it — the card returns to the exact markdown before the pick; Done keeps; existing tiles unchanged. Tests 276/276
@cverorg
cverorg merged commit bfb20d5 into main Sep 24, 2026
2 checks passed
@cverorg
cverorg deleted the kitt/card-editor-cancel-new branch September 24, 2026 16:22
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