aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md')
-rw-r--r--docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md39
1 files changed, 39 insertions, 0 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 8ae8dff..cfa119b 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
@@ -4802,3 +4802,42 @@ failed, which is what a missing `accept()` does to `exec()`.
**Item 78 stays open**, carrying the rule shortcut alone. The road from a search
to a rule already exists: save the query, then create a rule from it.
+
+## 86. A right-click search can replace or narrow, but never exclude
+
+**Done 2026-08-14, unreleased.** See
+`specs/2026-08-14-exclude-from-search-design.md`.
+
+**Observed (user, 2026-08-14):** "we've added the possibility to search clicking
+on any element in the message pane, the current available search options are to
+run the query from scratch or add to the existing query. A missing option is to
+add negatively (not)."
+
+**Cause (verified in the code before any was written).** Item 85 shipped exactly
+two operations and wired them through as a single boolean, so the gap was not a
+missing menu entry over an existing capability: there was no third state for an
+entry to select, and the signature could not express one. `SearchTerm` had
+`extend()` and no exclusion form at all.
+
+**Shipped as five commits.** `SearchTerm::exclude()`, then the `SearchMode` enum
+alone, then the four signatures widened as one mechanical change, then the
+`hasQuery` guard, then the menu entries. Each step left the suite green, which
+is what made the enum change safe to do in one commit across three files.
+
+**Two decisions the user made, recorded because they are not recoverable from
+the code.** Excluding from an EMPTY query would mean the whole Maildir minus one
+value, so the entry is greyed rather than hidden, and `exclude()` returns empty
+as a second layer against a caller that forgets the guard. And the two shipped
+labels were left untouched, so nothing the user already knew moved.
+
+**The plan under-counted the signature change.** It predicted one test file and
+the compiler found three: `test_messageview.cpp` and `test_mainwindow.cpp` also
+emit `searchRequested` directly. Four extra call sites, no design consequence,
+but a reminder that "four signatures" is not the same as "four call sites" and
+grepping for the latter is cheap.
+
+**Verified:** 23 of 23 tests passing. The guard's mutation check fails on the
+blocked emit when the condition is disabled, and it did not hang, which is the
+outcome item 85's trap made worth checking for. The user hand tested all three
+surfaces with an empty query bar and with one, including the disjunction case
+the parenthesising exists for.