aboutsummaryrefslogtreecommitdiffstats
path: root/mail-overview
AgeCommit message (Collapse)AuthorFilesLines
20 hoursfeat(mail-overview): account model singletonDanilo M.2-0/+217
Accounts.qml is the data layer for the mail drawer: it parses accounts from qtmaildir.conf rather than hardcoding them, so adding an account there needs no edit here. The key runs to the closing bracket, not the first dot, because at least one configured key contains a dot of its own; matching only up to the first dot would silently truncate it and drop that account's mail from every count. Counting uses the account-<key> notmuch tag, not a path glob. notmuch deduplicates by message id, so a message delivered to two of the configured addresses is one message with two file paths: a path glob would count it under both accounts and the per-account rows would sum higher than the global total the waybar icon already shows (measured elsewhere as 102 vs 101). The tag is a property of the message, so it is singular and the rows always sum to the header exactly. An unknown count is -1, never 0. notmuch has one failure mode with no distinct exit status: a rejected query fragment can still return 0 exit and empty output, and an empty string must not become a zero, which would render as "no unread mail" instead of "count unavailable". Output is validated as a non-negative integer before being trusted. Includes a temporary console-log probe in shell.qml, added deliberately for runtime verification of this model outside the drawer UI (Task 4). It stays until the user has run and confirmed it against real notmuch output, then gets removed in a follow-up commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU
20 hoursfeat(mail-overview): component skeleton with the keepalive windowDanilo M.3-0/+131
Nothing is drawn yet. This commit exists on its own because the thing most likely to be wrong at this stage is invisible: a config whose only window is hidden exits straight after logging Configuration Loaded, reporting no error, and the symptom is a keybind that appears to do nothing. Theme.qml is a verbatim copy of the one in appearance. It is a fallback for before the generated palette is read, not a palette to grow; deduplicating the four copies is a separate change. Not yet run: the user runs the shell themselves, so loading and IPC are verified in their session rather than here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU
21 hoursdocs: correct the notmuch malformed-query claimDanilo M.1-4/+6
The previous commit, the spec and the plan all said notmuch exits 0 on a malformed query while printing something that is not a count, and that validating the output as an integer therefore catches it. Measured properly, that is wrong in a way worth recording, because the truth is worse. notmuch fails two different ways. A rejected query prints nothing and exits 1: `notmuch count 'tag:unread and ('`. A query Xapian merely misparses returns a plausible wrong number and exits 0: `notmuch count 'tag:unread and (('` gives 41, and `'tag:unread and tag:'` gives 3. The second is undetectable by any check on the output, which is why the original claim was not just imprecise but inverted: the case it described as caught is the case nothing can catch. The integer validation still earns its place, on the first failure mode, where empty output would otherwise render as an empty inbox. The real defence against the second is that QUERY is a fixed string and is never built from anything, which the comment now says. The earlier measurement that produced the wrong claim read 40 as mangled output when it was a successful parse answering a different question. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU
21 hoursfeat(mail-overview): waybar watcher in continuous modeDanilo M.1-0/+66
Prints one JSON line per notmuch commit rather than polling on an interval, so the count drops the moment mail is read in qtmaildir and rises the moment mbsync commits, and waybar owns the watcher process: nothing to supervise on a machine with no systemd. The watch is on the xapian directory, not on a file inside it, because a commit replaces files and a watch held on a filename dies with it. The short sleep coalesces the several writes of one commit into one redraw. notmuch exits 0 even for a malformed query, printing something that is not a count, so the output is validated as an integer rather than trusting the exit status. A failure there renders as an error glyph: a count that silently reads zero would look exactly like an empty inbox. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWL8JYHu7yhAdtx5pU9PMU