Skip to content

feat: add safe GTD classification undo - #370

Open
salmonumbrella wants to merge 1 commit into
maathimself:mainfrom
salmonumbrella:feat/gtd-classification-undo-plugin
Open

feat: add safe GTD classification undo#370
salmonumbrella wants to merge 1 commit into
maathimself:mainfrom
salmonumbrella:feat/gtd-classification-undo-plugin

Conversation

@salmonumbrella

Copy link
Copy Markdown
Contributor

Summary

Ports the GTD classification undo from closed PR #333 onto the plugin boundary described in #368. Classification still copies the message into the configured GTD folder immediately; when the IMAP server returns an exact UIDPLUS destination, that new copy can now be undone without touching Inbox, another label, or another message in the thread.

Changes

  • Return whether GTD classification created a copy and, when available, its exact destination UID.
  • Add a plugin-owned undo endpoint that rechecks the current state-folder mapping and matches account, folder, UID, and RFC Message-ID before deleting anything. Replays and stale tokens are safe no-ops.
  • Do not offer undo when the server lacks UIDPLUS, the label already existed, or the source has no stable Message-ID.
  • Add undo notifications to the GTD runtime and context menu, plus Ctrl+Z / Cmd+Z for the newest GTD classification.
  • Translate the shortcut and failure state in all seven locales.
  • Keep explicit unclassification unchanged. This does not port delayed archive or any other core Inbox triage behavior from feat: undo inbox triage actions #333, and it adds no migration.

Testing

  • Backend: npm test — 1,117 tests passed across 61 files.
  • Backend: npm run lint and npm run lint:plugins.
  • Frontend: full node --test suite, npm run lint, and npm run build.
  • Regression coverage includes UIDPLUS and non-UIDPLUS copies, existing labels, missing Message-ID, exact undo, replay, stale folder mappings, forged UIDs, one-shot frontend callbacks, and the GTD undo shortcut.
  • Roborev reviewed the final tree with no issues found.

Refs #368


Contributor License Agreement

By submitting this pull request I confirm that:

  • I have read and agree to the Contributor License Agreement.
  • My contribution is my own original work (or I have identified any
    third-party material and confirmed it is compatible with the CLA).
  • I have the right to submit this contribution under the terms of the CLA.

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