aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers
diff options
context:
space:
mode:
Diffstat (limited to 'docs/superpowers')
-rw-r--r--docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md18
-rw-r--r--docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md20
-rw-r--r--docs/superpowers/specs/2026-10-31-rule-apply-and-archive-design.md8
-rw-r--r--docs/superpowers/specs/2026-11-16-rule-move-design.md5
4 files changed, 31 insertions, 20 deletions
diff --git a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
index c83e41c..7769c51 100644
--- a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
+++ b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
@@ -10912,3 +10912,21 @@ while moves report through another signal. An error bumps the same ticket, so
a late "done" cannot cover the error message. Tested by
`aWriteSaysItIsApplyingUntilTheWorkerHasRunIt`, which fails when the reply is
dropped.
+
+## 214. A rule cannot move mail to the spam or trash folder
+
+**Observed (user, 2026-11-16):** "the filters window doesn't allow to set
+actions like 'move to spam folder'. It was built before we introduced the
+moves in the code."
+
+**Cause.** Verified: a rule is `(add, remove, query, stage)` in both readers
+(`TagRule` in `src/tagrules.h`, `KNOWN_KEYS` in `assets/hooks/mailrules.py`),
+and the `post-new` hook only ever runs `notmuch tag`. The rules predate items
+103 and 187, which made Delete and Mark spam move files.
+
+**Approach.** `specs/2026-11-16-rule-move-design.md`.
+
+**Constraints.** A rule-format change: both readers, both suites, and the hand
+round trip under "Changing the rule format". The hook would now rename files
+on real mail every ten minutes, and a wrong destination reaches the server
+(item 103), so the destination is an account role, never a folder name.
diff --git a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md
index 119f557..262f0c5 100644
--- a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md
+++ b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md
@@ -151,7 +151,7 @@ taking that too literally.
| 211 | Archiving thousands of selected rows freezes the window | defect | S | **done** 2026-10-31, unreleased. Cubic optimistic-update path made linear: a lazily rebuilt id index in `ThreadListModel` and `MainWindow::batchModelWrites()` refreshing the action labels once per loop. A write now reads "applying…" until the worker has run it, then "done". Hand-tested on a 10158-message archive |
| 212 | A rule edit reaches only new mail; applying it to the backlog is a hand-typed `notmuch tag` | workflow | M | open, designed: `specs/2026-10-31-rule-apply-and-archive-design.md` Part A. Apply saves, counts what would change, confirms with the count (a new documented exception to the no-confirmation rule), writes through `applyTags` for exact undo |
| 213 | A rule removing `inbox` is skipped whole by the hook, so promo mail arrives untagged | defect | S-M | open, designed: same spec, Part B. Optional per-rule `allow_archive`, both readers, no version bump; `unread` stays refused; the dialog warns about rules the hook will skip |
-| 214 | A rule can tag mail spam but cannot move it to the spam or trash folder | workflow | M | open, designed: `specs/2026-11-16-rule-move-design.md`. Optional `move` field, `spam` or `trash` (an account role, never a folder name), both readers, no version bump; the hook moves on arrival, strips `inbox`, keeps `unread`; Apply (212) inherits it later. First task: verify `notmuch new` can run inside `post-new` |
+| 214 | A rule can tag mail spam but cannot move it to the spam or trash folder | workflow | M | **done** 2026-11-16, unreleased, on `rule-move`. Spec: `specs/2026-11-16-rule-move-design.md`. The nesting assumption held: `notmuch new --no-hooks` runs inside `post-new`. Review fixes: a bad `move` is kept raw rather than dropped (the rule-id lesson), a nested account without the role resolves to itself, and `_quote` doubles quotes (it never matched an id holding one, on the carve-out path too). Section in the closed file. Original note: Optional `move` field, `spam` or `trash` (an account role, never a folder name), both readers, no version bump; the hook moves on arrival, strips `inbox`, keeps `unread`; Apply (212) inherits it later. First task: verify `notmuch new` can run inside `post-new` |
| 73 | This backlog is past four thousand lines | maintenance | S | **done** 2026-08-13; 5056 lines to 578, closed sections moved to `2026-08-03-post-0.1.0-usability-closed.md` |
| 74 | "Searching..." keeps claiming a query is running while rows are already arriving | feedback | XS | **done** 2026-08-15, unreleased. The status-bar half only: the bar now counts threads per batch. The cold-cache delay itself was measured in 2026-08-11 and is not fixable here |
| 75 | The tagging rules window forgets its size and its column widths | persistence | S | **done** 2026-08-13, shipped in 0.17.0. The window-kind question is left open, see the closed-items file |
@@ -1734,21 +1734,3 @@ applied without the removal. The rules dialog says nothing about it.
**Constraints.** A rule-format change: both readers, both suites, and the hand
round trip under "Changing the rule format". The hook runs every ten minutes
on real mail.
-
-## 214. A rule cannot move mail to the spam or trash folder
-
-**Observed (user, 2026-11-16):** "the filters window doesn't allow to set
-actions like 'move to spam folder'. It was built before we introduced the
-moves in the code."
-
-**Cause.** Verified: a rule is `(add, remove, query, stage)` in both readers
-(`TagRule` in `src/tagrules.h`, `KNOWN_KEYS` in `assets/hooks/mailrules.py`),
-and the `post-new` hook only ever runs `notmuch tag`. The rules predate items
-103 and 187, which made Delete and Mark spam move files.
-
-**Approach.** `specs/2026-11-16-rule-move-design.md`.
-
-**Constraints.** A rule-format change: both readers, both suites, and the hand
-round trip under "Changing the rule format". The hook would now rename files
-on real mail every ten minutes, and a wrong destination reaches the server
-(item 103), so the destination is an account role, never a folder name.
diff --git a/docs/superpowers/specs/2026-10-31-rule-apply-and-archive-design.md b/docs/superpowers/specs/2026-10-31-rule-apply-and-archive-design.md
index 247cfd5..6a1af9c 100644
--- a/docs/superpowers/specs/2026-10-31-rule-apply-and-archive-design.md
+++ b/docs/superpowers/specs/2026-10-31-rule-apply-and-archive-design.md
@@ -215,3 +215,11 @@ the user looks at it.
- **Relaxing `unread`.** Nothing asks for it.
- **A dry-run list** of the affected messages. *Preview in list* already shows
which mail a rule collects.
+
+## Addendum, 2026-11-16: rules that move (item 214)
+
+A rule may now carry `"move": "spam" | "trash"`. When Apply is built it must
+honour that field by sending the matched ids through
+`NotmuchWorker::moveMessages()` with the same tags Mark spam / Delete use
+(minus `unread`, matching the hook), so the move lands on the undo stack.
+The count in the confirmation names the move as well as the tag change.
diff --git a/docs/superpowers/specs/2026-11-16-rule-move-design.md b/docs/superpowers/specs/2026-11-16-rule-move-design.md
index 95bac9c..37dd51b 100644
--- a/docs/superpowers/specs/2026-11-16-rule-move-design.md
+++ b/docs/superpowers/specs/2026-11-16-rule-move-design.md
@@ -46,7 +46,10 @@ One optional field on a rule:
- The "adds and removes nothing" check becomes "adds, removes and moves
nothing": a move-only rule is valid.
- An unknown value is an invalid rule in `TagRules::validate()` (the dialog
- cannot write one). The Python reader logs it and ignores the `move` while
+ cannot write one). The C++ reader keeps a bad value from the file RAW in
+ `unknown` and still loads the rule, even when the move was its only action,
+ so a save writes it back rather than deleting it (the rule-id lesson in
+ `AGENTS.md`); a role chosen in the dialog replaces it. The Python reader logs it and ignores the `move` while
still applying the rule's tags, since the tags are harmless and the hook must
never guess a destination.