aboutsummaryrefslogtreecommitdiffstats
path: root/src/mailsync.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-08 11:22:39 +0200
committerDanilo M. <danix@danix.xyz>2026-08-10 08:23:28 +0200
commit7c3648676e188344dabb24e084f91b2b47e87633 (patch)
treebd9e3f5f6c05b14c044706d87c5c43c108947833 /src/mailsync.h
parentfbb60396d6e1e0f0da542c1945df6cd0ae8cb701 (diff)
downloadqtmaildir-7c3648676e188344dabb24e084f91b2b47e87633.tar.gz
qtmaildir-7c3648676e188344dabb24e084f91b2b47e87633.zip
feat(ui): scope actions to the selected row kind and name it
tagSelected resolved rows to threads with threadAt(index.row()), which is wrong for a message row: a child's row number indexes its siblings, so acting on a reply tagged whichever thread sat at that position in the list. It now routes through ThreadListModel::scopeFor, and a message row's change is sent as message ids down applyTags with its own MessageTagCommand for undo. MessageTagCommand stores message ids where ThreadTagCommand stores thread ids, and that difference is the point rather than an inconsistency: re-resolving the thread on undo would restore tags across every sibling the action never touched. sendMessageTagChange deliberately skips the optimistic model update. applyTagChange is keyed by thread and would repaint the whole row as though every message in it had changed, which for a one-message edit is a lie the user watches correct itself on the next query. It keeps the two things that are NOT optional: the edited-account set, resolved through the containing thread since the account is a property of the thread, and holding the edit when a sync holds notmuch's write lock, since the worker's read-write open blocks rather than failing. The scope is now stated before an action and after it, naming both the message count and whether a whole thread went. This is what stands in for the confirmation dialog CLAUDE.md rules out: undo is the safety net, and undo is only usable if the user can tell that something larger than they meant has just happened. Selecting a single message reports no count at all, since reading one message is not a bulk action. A mutation that routed message rows down the thread path SURVIVED the whole suite: undo depth and status text are identical either way while every sibling gets tagged. anActionOnAMessageRowTagsThatMessageNotTheThread exists because that gap was found, and asserts on the ids actually sent. anActionOnAThreadRowSaysItHitTheWholeThread reads the status bar BEFORE draining the event loop. This binary has no worker, backlog item 36, so the queued write reaches a database that has never heard of the thread and answers with errorOccurred, which overwrites the status bar: draining first asserts on that error and fails against correct code.
Diffstat (limited to 'src/mailsync.h')
0 files changed, 0 insertions, 0 deletions