[work-ctme] Make theme delete undoable with Ctrl+Z #59
Loading…
Reference in a new issue
No description provided.
Delete branch "work-ctme-theme-delete-is-not-undoable-ctrl-z"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a delete-undo layer over the per-theme history. Ctrl+Z right after a delete restores the theme at its old index with its own history. Ctrl+Shift+Z / Ctrl+Y delete it again. Any other action drops the delete stacks. Adds studio/tests/delete-undo.test.js.
🤖 Generated with Claude Code
https://claude.ai/code/session_019QVQwoVfUVoPLD3SJ9jcpe
Keeper review of PR #59 (head
b206f2a).Routine: one IIFE in
studio/js/app.jsplus a test and a README line. No data loss, security/auth/secrets/network/lockout surface. PR labels and requested reviewers are empty; noreview:humanon the PR or bead. Head CI is success and mergeable=true.The delete-undo feature is correct and well built. I read the diff and ran the tests in a clean checkout of the head:
build_data.test.pypass.record,goHistory,select(withoutkeepTrash) drop the stacks;deleteTheme/undoDelete/redoDeletepush/pop and re-enable#undo/#redo; index restore and replacement-Mossfire removal work. Wrote extra scenarios (delete non-current with no history, undo current theme then its own edit, redo after undo) and they pass too.Blocking finding work-stjr: the new test never runs in CI. This PR adds
studio/tests/delete-undo.test.jsand lists it instudio/README.md, but.forgejo/workflows/pages.yamllists every studio test by hand and was not updated. Every earlier test-adding PR (#55 windows-terminal, #56 rofi) added the matching line to that workflow in the same commit; this one does not, so the CITestsstep skips it. Addnode studio/tests/delete-undo.test.jsto theTestsstep.Requesting changes.
Keeper re-review of PR #59 (head
8b0377b).Routine: one IIFE in
studio/js/app.js, one test file, a README line and one CI line. No data loss, security/auth/secrets/network/lockout surface. Noreview:humanon the PR or on work-ctme, no human requested reviewer, no AGENTS.md/CLAUDE.md in the repo. Head CI is success and mergeable=true.The earlier request-changes (finding work-stjr: the new test never ran in CI) is fixed by
8b0377b, which addsnode studio/tests/delete-undo.test.jsto theTestsstep in.forgejo/workflows/pages.yaml, matching #55/#56. work-stjr is closed.Checked on a clean checkout of the head:
#undo/#redoenabling, and the typing/generator shortcut guards. Index math and the null-replacement paths are correct.node --checkon both changed JS files.Nits, not blocking, no beads needed: the entry's
wasCurrentfield is stored but never read (the bead's decision is that a restored theme always becomes current); opening then cancelling the generator or wand without committing does not drop the stacks, so Ctrl+Z still restores a just-deleted theme — acceptable since no theme changed.Approving and merging.
Keeper re-review of PR #59 at
8b0377b. Routine; tests pass; previous CI finding work-stjr fixed.Keeper re-review of PR #59 (head
8b0377b).Routine: one IIFE in
studio/js/app.js, one test file, a README line and one CI line. No data loss, security/auth/secrets/network/lockout surface. Noreview:humanon the PR or on work-ctme, no human requested reviewer, no AGENTS.md/CLAUDE.md in the repo. Head CI is success and mergeable=true.The earlier request-changes (finding work-stjr: the new test never ran in CI) is fixed by
8b0377b, which addsnode studio/tests/delete-undo.test.jsto theTestsstep in.forgejo/workflows/pages.yaml, matching #55/#56. work-stjr is closed.Checked on a clean checkout of the head:
#undo/#redoenabling, and the typing/generator shortcut guards. Index math and the null-replacement paths are correct.node --checkon both changed JS files.Nits, not blocking, no beads needed: the entry's
wasCurrentfield is stored but never read (the bead's decision is that a restored theme always becomes current); opening then cancelling the generator or wand without committing does not drop the stacks, so Ctrl+Z still restores a just-deleted theme — acceptable since no theme changed.Approving and merging.