Repository navigation
Add ⌘Z undo on desktop and web; trim success toasts - #229
Merged
Merged
Conversation
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.
Summary
TabEngine/Engine viaundoHistory.attach.resetEngineBackends/resetBackendsdetach it on logout, andinstallUndoBoundaries()is installed in both entrypoints so one undo step still equals everything between two user inputs. The newundoshortcut (⌘Z / Ctrl+Z, interceptable on Web) is a no-op when focus is in a text field, where the native text undo wins.UndoHistory.record(action, run)lets a non-Engine write supply its own inverse and join the current step, exactly like an Engine write. Log Completed (advancing the account'sloggedThroughwatermark) now uses it, so the watermark rollback is a normal Undo step instead of a one-off toast action; when no Engine is attached (REST mode) it still runs, just unrecorded.logCompletedno longer returns an undo callback.profileSaved,passwordSaved,archiveSuccess,convertSuccess,skipOccurrenceDone,duplicateProjectDone,exportSuccess,assistantSaved/assistantTestOk,subscriptionAdded,emptyTrashSuccess, Review'sdoneTitle, MagicPlusInbox's placement toast, and the toast-based undo for Log Completed) along with the now-unused i18n keys in bothenandzh. Failure toasts and inline feedback are unchanged; assistant connection test results stay inline next to the button.Dialogthat spells out the consequence (deleteDescription/deleteDescriptionWithChildren) and only commits on confirm.ushortcut_undoandundoActionLogCompletedlabels added, andUndoPromptmaps the newlogCompletedaction.Files of note
packages/api/src/undo/undo-history.ts(+ tests):custominverse op,record(), action priority for custom ops.packages/api/src/hooks/useLogging.ts: Log Completed recorded throughundoHistory.packages/desktop/...andpackages/frontend/...: undo history attached to the per-window/tab engine.packages/ui/src/components/keyboard/*:undoaction, keymap entry, shortcut test.packages/ui/src/pages/Tags.tsx(+ tests): confirm-before-delete dialog.Docs
CONTEXT.md— Undo and Log Completed entries.docs/adr/0024-undo-recorded-at-engine-writes.md— every shell attaches history; non-Engine writes viarecord.docs/keyboard-shortcuts.md— new Undo section and updated Log Completed wording.