From 0ca4624195cdd8c78ff614e3912af5b914458497 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 26 Aug 2026 13:28:51 +0200 Subject: feat: flag what you answered, mark what was forwarded to you Item 68, which turned out to be three things once its premise was measured. The note asked to extend a "passed" subject rule to "Fw:"; there was no subject rule, and the correlation it rested on did not exist. What did exist was a gap nobody had reported. Reply and forward now flag their source. The Maildir R and P flags, which every other client sets and notmuch reads back as "replied" and "passed", had never been written here: measured on the developer's index, all 317 "replied" and all 6 "passed" came from other clients. ComposeWindow emits sourceMessageAnswered after a successful send and MainWindow routes it through sendMessageTagChange, message-scoped and off the undo stack, for the reason auto mark-read is: the flag records that the mail went, and the send cannot be undone. ComposeContext carries sourceMessageId rather than reusing inReplyTo, which is deliberately empty on a forward so the recipient's client does not file it under the thread it left. Keying on it made the "passed" half dead code that compiled and never fired. A resumed draft is excluded: its kind records how the file was opened, not what the user is doing, so flagging on it would set R from a guess. A received forward gets its own mark. Derived from the subject at paint time, storing nothing and reaching no server, because "passed" means "I forwarded this" and setting it from a guess would assert something false on 222 existing messages. subjectIsForwarded() shares forwardSubject()'s prefix table so the two cannot disagree, strips a Re: chain first, and takes extra locale spellings from [general] forward_prefixes, which extends the built-in table rather than replacing it. A mutation survived the first round and corrected a claim in the code: QRegularExpression::escape already makes a punctuation prefix inert, so the word guard is not about pattern validity. It stops a configured "-" matching "-: x". The comment and test say that now. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01LXCZFLXbAii5n5wtovpdhh --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 9588017..e069722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,15 @@ point at which they are stable. the About dialog and the placeholder pane, and deliberately not in the window title. +- **A mark for mail someone forwarded to you.** A card now carries its own + glyph when the subject reads as a forward, in any of the spellings clients + actually send (`Fwd:`, `Fw:`, `WG:`, `ENC:`, `RV:`, `TR:`), including under + a `Re:` chain. Add more with `[general] forward_prefixes`, which extends + that list rather than replacing it. This is display only: nothing is written + to the message and nothing reaches your mail server. It is deliberately a + different mark from `passed`, which is the Maildir `P` flag and means *you* + forwarded something. + ### Changed - **The unread action says which way it will go.** "Toggle unread" read the @@ -52,14 +61,45 @@ point at which they are stable. - **Delete and Restore appear only where they apply.** Delete is hidden on mail already in the trash, where it reported success and did nothing, and Restore is hidden on mail that was never deleted. -- **Deleting a message also marks it read.** Mail you threw away no longer - counts towards unread. Undo returns both the folder and the tag. +- **Deleting a message also marks it read, and takes it out of the inbox.** + Mail you threw away no longer counts towards unread, and no longer sits in + the Inbox view: `inbox` is stripped along with `unread`, and the row leaves + the list straight away rather than waiting for the next sync. Restore and + Undo both put the tag back with the file, so nothing comes home invisible. + One consequence worth knowing: pressing Delete a second time to undelete is + gone for ordinary mail, because there is no longer a row sitting there to + press it on. Undo retracts, and Restore in the Trash view is the deliberate + route. The second press still works on stranded mail, which is the one place + a message can carry `deleted` without being in a trash folder. +- **The trash no longer paints every row red.** The deleted highlight exists + to tell you a message is on its way out of a view it is still sitting in; in + the Trash that is every row, so it said nothing and cost legibility. Deleted + mail there is now drawn normally, still struck through. A message tagged + spam keeps its tint, since that is still news in a folder that only promises + "thrown away". ### Fixed - **New mail reached the index but not the window.** The worker never reopened its read-only notmuch handle, so nothing indexed after startup appeared in any query and the application looked like it had stopped syncing. +- **Replying or forwarding never flagged the message you answered.** The + Maildir `R` and `P` flags, which every other client sets and which notmuch + reads back as the `replied` and `passed` tags, were never written by + qtmaildir: measured on the developer's own index, all 317 `replied` and all + 6 `passed` had come from other clients. A reply now marks its source + replied, a forward marks its source forwarded, and both reach the server on + the next sync. Neither goes on the undo stack, for the reason the automatic + mark-read does not: the flag records that the mail went, and the send itself + cannot be undone. A reply or forward finished from a saved draft is not + flagged, since a resumed draft cannot be told from a new message. +- **A sent message could leave its draft behind.** mbsync renames an uploaded + draft to add its own `,U=` marker, while the composer still held the + name it originally wrote, so the removal on send ran against a path that no + longer existed and failed silently. The message went, the sent copy was + filed, and the draft stayed in the Drafts view looking unfinished. The same + rename was already handled everywhere a draft is READ; this was the one + place it is written. - **Mail sent to another of your own accounts lost `inbox`** and was missing from the account that received it. notmuch stores one message with two files in that case, the sender's copy and the recipient's, and the `post-new` -- cgit v1.2.3