aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans/2026-08-14-search-from-message.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-26 18:53:54 +0200
committerDanilo M. <danix@danix.xyz>2026-08-26 18:53:54 +0200
commit06b0435830daaed49a2d5231dcb6f02ff0124d5d (patch)
tree6354ab930a7ee4575826b9346a3cbdb6e05b78e3 /docs/superpowers/plans/2026-08-14-search-from-message.md
parent826a61d5ef009cac168599dc4e2b45ee8a45326d (diff)
downloadqtmaildir-06b0435830daaed49a2d5231dcb6f02ff0124d5d.tar.gz
qtmaildir-06b0435830daaed49a2d5231dcb6f02ff0124d5d.zip
refactor: drop the unnettable pending-edit counter
Item 119's stated blocker, removed by finding out what it held: nothing. pendingEditCount() summed four sources, three of which can name the messages they hold and one of which was a bare int. That int counted confirmed changes carrying no message ids, on the reasoning that an edit which cannot be netted must still register rather than be lost. It was what made the count impossible to open and list, since a dialog would have shown three groups and then owed the user a remainder it could not describe. The remainder is empty. NotmuchWorker::applyTags() is the only emitter of tagsApplied(), and its first statement returns on an empty id list, which is the exact condition the counter required. applyTagsToThreads() resolves threads to message ids through a query and errors out when that comes back empty, so it can only ever hand applyTags() a non-empty list. Measured rather than read. A qFatal in the branch fired in 4 of 70 test_mainwindow cases, all four building a TagChange by hand and invoking the slot directly with no worker involved; an assertion before the worker's own emit never fired across the whole suite, worker-backed tests included. The worker's guard stays and is pinned where it lives, by applyTagsWithNoIdsDoesNothing() in test_notmuchworker. The MainWindow test that asserted the deleted branch is replaced by one for the consequence: a change reaching the indicator names its messages, and an edit with its inverse nets back to nothing, which is the property a growing-only counter could never have. Three tests that leaned on the counter to show the indicator now carry message ids, as a real edit always does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P88Q3MCSCSQxKDy7pmXh9F
Diffstat (limited to 'docs/superpowers/plans/2026-08-14-search-from-message.md')
0 files changed, 0 insertions, 0 deletions