aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-16 11:44:30 +0100
committerDanilo M. <danix@danix.xyz>2026-11-16 11:44:39 +0100
commit1475a5980a8061cd3ab8ed7fe918b3466732bc15 (patch)
tree0103cd03d49511ff24508faa6726b629c581d513 /docs/superpowers/plans
parent8078e8180920984de475db796a2725bb2f470dd8 (diff)
downloadqtmaildir-1475a5980a8061cd3ab8ed7fe918b3466732bc15.tar.gz
qtmaildir-1475a5980a8061cd3ab8ed7fe918b3466732bc15.zip
docs: design a rule that moves mail to spam or trash
The rules dialog predates moves, so a rule can tag mail spam but leave it in the inbox folder. An optional move field names an account role, spam or trash, never a folder; the post-new hook moves on arrival, strips inbox and keeps unread. Item 214. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/superpowers/plans')
-rw-r--r--docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md19
1 files changed, 19 insertions, 0 deletions
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 6e36905..119f557 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,6 +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` |
| 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 |
@@ -1733,3 +1734,21 @@ 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.