summaryrefslogtreecommitdiffstats
path: root/assets
AgeCommit message (Collapse)AuthorFilesLines
10 dayschore: move the SlackBuild out to the my-slackbuilds repoDanilo M.5-178/+0
The packaging under assets/slackbuild/ had been stale since 0.7.0 and was deliberately not SBo compliant, carrying a _danix tag and a txz package type because it was never an SBo submission. It is not what the user builds from, so it lived here collecting drift: it predated the translations added in 0.23.0 and would have shipped a package without them. It now lives in the my-slackbuilds repo under qtmaildir/, rewritten from the SBo cmake template rather than carried across, at 0.24.0 and building from the GitHub release tarball rather than a cgit snapshot whose checksum can change when the tarball is regenerated. That repo has the workflow for bumping it and an nvchecker stanza that picks up releases from here. README points at the repo instead of describing a local directory, and keeps the build invocation so the section still tells a Slackware reader what to do. CLAUDE.md's release procedure drops the "do not bump this as a side effect" warning, which has nothing left to warn about. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11feat(panes): draw the pane marks from shipped SVGs, not font glyphsDanilo M.6-0/+67
Items 70 and 69, the second folded into the first as item 70's own size note predicted it should be. The panes drew their state marks as font glyphs: U+1F4CE for an attachment and U+2605 for a flagged thread, each with a fallback for a font that cannot render it. Both fell back to "*", so on such a font a flagged thread and one carrying an attachment were indistinguishable, which is a defect the fallback introduced rather than prevented. What a mark looks like was also the desktop's decision rather than this application's, and the panes are exactly where it should not be: the user asked for the toolbar and menus to keep following their icon theme while the panes stop. Six marks now ship in assets/icons/marks/: flagged, attachment, passed, replied and the two expander triangles. QIcon::fromTheme still resolves every toolbar and menu icon and was not touched. Licensing chose the shapes. The look came from a GPL3 icon theme, and this project is GPLv2-only, which are incompatible: GPLv2's "no further restrictions" clause bars shipping GPL3 assets in a v2-only work. The six were drawn fresh in the same idiom instead, with no path data copied. The idiom is generic: solid single-path silhouettes at 16x16 with no strokes. They are compiled in as string literals rather than loaded from a .qrc. src/CMakeLists.txt already records why resources belong to the executable: a qrc in the static library registers itself from a global initialiser the linker drops. The tests link the library, so a resource-based mark would be missing exactly where it needs asserting. assets/icons/marks/ stays the editable source. One asset serves both palettes. Every payload paints with fill="currentColor", which QSvgRenderer renders black rather than resolving, so Marks::pixmap composites the wanted colour with CompositionMode_SourceIn. A mark then takes the card's own pen colour and follows selection and the read/unread dimming without a second variant to keep in step. CardLayout reserves a rect per mark and CardDelegate paints into it. The marks were glyphs inside the subject STRING, so their width came free from the text metrics; as icons the geometry has to know they are there or the subject runs underneath them. The expander pill had the same trap, its triangle being a glyph in expanderLabel(), and now reserves that width explicitly. Item 69's part: passed and replied were words in the tag strip and are marks beside the subject now. The message pane's header carries the flagged and attachment marks next to the subject, per the user's decision that the right pane needs those two and only outside the message area. A duplicate that no test caught is worth recording. Every geometry assertion passed while a card showed passed as BOTH an arrow and a green tag chip: the chip filter had no reason to know a mark had appeared. It was found by rendering real cards to an image and looking at them. isDrawnAsAMark() is now one list consulted by both PillTagsRole and MessageOwnTagsRole, since two copies drifting apart is how a tag ends up drawn twice on one row and not at all on another. Fourteen tests: nine in test_marks, four in test_cardlayout, one in test_threadlistmodel. Mutation-checked at four points, each failing a test: the subject ignoring the marks, the flag not indenting the subject, the pill forgetting the triangle's width, and the recolour composite removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07feat(sync): sync only the accounts with unsynced editsDanilo M.1-1/+19
A sync ran mbsync -a regardless of what changed, so tagging mail in one account fetched all of them. The account set was not a parameter anywhere on the path: MailSync::start() took no arguments and the script hardcoded -a, so nothing between a tag edit and mbsync carried which account changed. Track which accounts have edits and pass their mbsync channels through to the script, which now takes channel names and falls back to -a when given none. An empty set means all accounts, per the request: a sync with nothing pending is a fetch, and narrowing that to wherever the last edit landed would quietly stop collecting mail everywhere else. The channel is a new optional per-account key rather than the section key. The two names genuinely diverge, because a QSettings section key may carry dots that the channel does not, and mbsync treats an unknown channel as fatal rather than skipping it, so key-as-channel would fail those accounts' syncs outright rather than degrade. It defaults to the key, so accounts whose two names already agree need no config change. The edited-account set is deliberately not netted the way the pending-edit map is: that map tracks the index, where a tag removed and re-added leaves nothing outstanding, while this tracks the mail store, where both writes have already renamed files that mbsync still has to propagate. It is also snapshotted before flushHeldEdits(), which inserts into it synchronously rather than on a queued reply, so a successful sync cannot clear accounts whose edits it never carried. Closes item 49. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07build: bundle the fonts the placeholder pane will needDanilo M.4-0/+186
Groundwork for item 30, the blank right pane. Nothing references these yet; the pane itself is the next piece of work. The pane is drawn from the user's own HTML mockup, which sets its wordmark in Oxanium and its text in IBM Plex Sans and pulls both from Google Fonts. That @import cannot work here: the web view's interceptor blocks every request by default, deliberately, and neither font is installed on the development machine either. Shipping them is what makes the pane look the same on every machine. Both are SIL OFL 1.1, which permits redistribution and is compatible with the GPL, and each carries its licence text beside it. The README records the pairing. Both are subsets, since they are embedded into the rendered document as data URIs and the full families would dwarf the page using them. Oxanium is instanced to weight 800 and cut to the nine characters of the wordmark: 43K to 1.2K. IBM Plex Sans is cut to Latin-1 plus common punctuation rather than to the exact strings in use: 525K to 13K. The wider cut is deliberate, because that font carries interface text that will change, and a subset matching only today's wording would break silently the moment a string is edited. Coverage of both was verified against the strings they have to draw. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07feat(sync): the status bar says which account is syncingDanilo M.1-1/+9
"Syncing..." was set once and never updated, so a run that takes over a minute reported nothing about what it was doing. The original diagnosis in the backlog was half wrong, and two further wrong ones were made and discarded before the real cause: plain "mbsync -a" prints NOTHING until it exits, then a single summary line. Measured on a real run, one line at 11:11:08 then 73 within the second 11:11:33, at the end of a 46-second run. So there was no stream to read for the part of a sync that takes time. It is not buffering, so stdbuf changes nothing, and the account name is not unavailable either, which was the second wrong conclusion. mbsync -V is what changes both: it announces each channel as it reaches it, which is at once the progress and the account name originally asked for. The shipped script now passes it. SyncPhaseTracker derives a short status from the output as it streams: the channel being synced, the summary counts when mbsync ends, then the notmuch reindex. It lives beside MailSync rather than in the window so the matching rules are one testable thing, and it holds no widget. Matching is loose and case-insensitive, since the wording varies by version, and nothing in it decides success or failure: the exit status remains the only authority on that. Lines are reassembled in MainWindow before being fed, because QProcess::readAll() splits wherever it happens to and a half-line would match nothing. Every status is sanitised and truncated: the channel name comes from a config file this app does not own, and a long one must not stretch the status bar. Two defects in existing code, fixed with it. setSyncBusy(true) ran after start(), so a fast run's output arrived before the per-run reset and wiped its own phase. And a first draft deferred phases while a transient message showed, which let a "Background sync completed" message armed before the sync began suppress the whole run: a running sync's state outranks an expiring event message. Verified by replaying real captured mbsync -V output through the tracker, not only against fixtures. The MainWindow test paces its script with sleeps, since a script that prints everything at once arrives in one readyRead and makes every intermediate phase unobservable. Closes item 42. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04docs: record items 28-35 from the user's notes, and how to keep them in syncDanilo M.2-0/+0
The backlog is downstream of the user's own notes, which they add to while using the app. Comparing the two turned up nine entries with no item here, two of them defects rather than enhancements: - Re-adding `unread` after the automatic mark-read counts 2 unsynced changes when the mail store is back where it started. The counter counts writes and never decrements, so any add-then-remove of the same tag inflates it (item 28). - The Sync button stays enabled while a background sync holds the lock. That was a written constraint of item 27 and shipped unbuilt, which is the strongest argument for doing this comparison at all (item 29). The rest are enhancements: a useful blank right pane, for which the user has produced the two logo images added here; a default button on the quit prompt, recorded as needing a repro because the code does set one; Esc to blank the pane; expiring status messages; a Maildir overview; and an automatic refresh after a sync. Item 35 is the one 0.8.0 deliberately did not build. A background sync reports rather than refreshes, because runCurrentQuery() clears the undo stack, the selection and the message pane. A non-destructive refresh is real work, so it is an item rather than a flag. Item 27 gains its outcome, including that its own proposed approach was the wrong one: flock -n acquires in order to test, so polling with it would have caused the exact skips the sync script reports. CLAUDE.md now carries the reconciliation step, since a note saying "X is broken" is a bug report that will sit in a personal file indefinitely unless someone goes looking. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04feat(sync): dismissable log pane, progress bar, and a skip that is not a failureDanilo M.1-3/+6
Four changes to the sync UI, three of them from using it. The log pane could not be dismissed. It is hidden at construction and shown on failure, and nothing ever hid it again, so a single failed sync left it on screen until the application restarted. It now sits in a container with its own Close button, and is 200px rather than 120, because mbsync's output is wide and repetitive and the shorter pane showed too little of it to read. It still appears only on failure, which the user confirmed is what they want. A sync gives no feedback while it runs. The status bar now carries an indeterminate progress bar for the duration, and the Sync button is disabled rather than left looking live. The bar is indeterminate on purpose: mbsync reports no percentage and the script's output is unstructured, so a bar filling left to right would be inventing a fraction nobody knows. The log is also cleared at the start of each run, since leaving the previous run's lines in place makes a stale failure look like the current one. The lock skip was reported as a failure. mailsync.sh exits when another run holds the lock, and that was exit 1, which qtmaildir reads as "sync failed": it showed the log pane and, on the exit path, told the user their changes were still unsynced. With a cron timer every ten minutes, a click landing inside a run is routine and none of that is true. The script now exits 75 (EX_TEMPFAIL) and the window reports it as its own case, saying a sync is already running. On the exit path it stays open and says plainly that the other run is most likely carrying the changes over but that this window cannot see it finish, rather than guessing either way. That last hedge is what item 27 records: the application cannot see a sync it did not start. The user chose continuous polling of the lock file over the narrower "only while quitting" version, and the entry notes that the lock is already the signal, so no status file is needed, and that a kernel lock cannot go stale where a written file can. Verified against stub binaries: a second run while the lock is held exits 75 and says SKIPPED, while the run holding it completes at 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04fix(sync): stop mailsync.sh rotating a log logrotate already ownsDanilo M.1-7/+10
Two problems, both visible in the first real run of the moved script. Every line was logged twice. The script writes to the log through tee, and the user's crontab also ended in ">> mailsync.log 2>&1", so both put the same output there. Reproduced: without the caller's redirect one run writes a single RUN START, with it, two. The crontab redirect goes away and the script keeps owning the log, which is what makes it behave the same however it is invoked. A comment in the header now says so, since the obvious cron line is the one that breaks it. The internal size-based rotation is removed outright. /etc/logrotate.d/mailsync already owns this file and keeps seven compressed days, and the two were fighting: the script's "mv $LOGFILE $LOGFILE.1" overwrites whatever logrotate had just placed at .1, which is why that file was 357K and uncompressed while .2 through .5 were properly gzipped. logrotate is better at this in every respect, including recreating the file with the right ownership, so the script should not have a second opinion. Verified against stub mbsync and notmuch in a fake HOME: one RUN START per run, stdout and the log agree, no rotation performed by the script, and a failing mbsync or notmuch still produces its own exit code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04feat(sync): bring mailsync.sh here, print to stdout, exit truthfullyDanilo M.1-0/+102
The reference sync script lived in the companion mailctl project, which documents that it never calls it: sync and organization are separate there on purpose. qtmaildir is the only thing that runs it programmatically, and two of its behaviours were live bugs here, so it belongs in this repo where the constraints on it are. It printed nothing a caller could see. Everything was redirected to $LOGFILE, so MailSync captured an empty stream and the sync log pane stayed blank, a known limitation carried since 0.1.0. It now writes to both through tee: cron keeps its log, and the pane has something to show. It also ended in an unconditional exit 0, discarding statuses it had already computed. qtmaildir believes that exit code: a failed mbsync reported success, cleared the unsynced-changes count, and would have allowed a sync-on-exit to quit over a sync that never happened, which is exactly the case the exit prompt exists to prevent. It now exits with mbsync's status, or notmuch's when mbsync succeeded. The statuses move through files rather than shell variables because the run block is piped into tee, which puts it in a subshell where an assignment does not survive. Verified against stub mbsync and notmuch binaries in a fake HOME, so no mail or database was touched: output reaches stdout, the log still gets every line, and a failing mbsync or notmuch produces its own exit code rather than zero. Both properties are now recorded in CLAUDE.md, since they exist for this application's sake and an edit that looks like a cleanup would remove them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04release: 0.7.0v0.7.0Danilo M.2-3/+3
Arbitrary tagging from the UI and the unsynced-edits work are both new features, so this takes the minor slot. The SlackBuild's MD5SUM stays at the previous value until the 0.7.0 snapshot tarball exists, which is after the tag is pushed. Update it with sbodl before building the package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04release: 0.6.0v0.6.0Danilo M.2-3/+3
Message details and automatic mark-read are both new features, so this takes the minor slot. The SlackBuild's MD5SUM stays at the previous value until the 0.6.0 snapshot tarball exists, which is after the tag is pushed. Update it with sbodl before building the package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04release: 0.5.0v0.5.0Danilo M.2-3/+3
Query completion is a new feature, so this takes the minor slot rather than a patch, the accompanying bug fixes notwithstanding. The SlackBuild's MD5SUM is left at the 0.4.1 value on purpose: it can only be computed once the 0.5.0 snapshot tarball exists, which is after the tag is pushed. Update it with sbodl before the package is built. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04build: point the SlackBuild at the 0.4.1 tarballDanilo M.1-3/+3
The URL and checksum are taken from the published snapshot rather than predicted: sbodl fetches it and reports "md5sum matches OK", and the tarball is confirmed to carry the QTMAILDIR_BUILD_TESTS option, so -DQTMAILDIR_BUILD_TESTS=OFF now takes effect where it was silently ignored with 0.4.0. The copy of the .info inside the v0.4.1 snapshot itself still names 0.4.0, since a snapshot cannot contain its own checksum. That copy is not the one anyone builds from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04release: 0.4.1v0.4.1Danilo M.2-4/+2
Packaging only. The 0.4.0 tarball predated QTMAILDIR_BUILD_TESTS, so a package built from it accepted -DQTMAILDIR_BUILD_TESTS=OFF and ignored it. This tag is the first whose source honours the flag. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04build: add a SlackBuild under assets/slackbuildDanilo M.5-0/+180
Packages the application for Slackware, following SBo conventions with two deliberate departures: the tag is _danix rather than _SBo and the package type is txz rather than tgz, since this is not an SBo submission. sbolint reports exactly those two as errors and nothing else; the template comments it warned about are gone. Written against the install layout the build really produces, checked by staging it: one binary, one .desktop entry and one scalable icon, no libraries and no man or info pages. The template's .la removal, man and info compression and perllocal.pod cleanup would all act on nothing here, so they are left out rather than carried along as dead code. doinst.sh keeps only the desktop-database and icon-cache updates. The download URL and checksum are verified rather than assumed: sbodl fetches the tarball and reports "md5sum matches OK". Adds QTMAILDIR_BUILD_TESTS, defaulting to ON so the ordinary build is unchanged. A packaging build has no use for the test binaries, and building them pulls in Qt6::Test to produce nothing that ships. Note the 0.4.0 tarball predates this option, so with that source the flag is accepted but does nothing; the README says so. notmuch is the only dependency outside Slackware. Qt6 including WebEngine, gmime and cmake are all stock, which is what REQUIRES reflects. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04feat: use the application iconDanilo M.1-0/+13
The icon was committed in a previous session and referenced nowhere: no qrc, no .desktop entry, no setWindowIcon. It is wired up now, as a window icon, a desktop entry, and install rules placing both into hicolor and share/applications. resources.qrc belongs to the executable rather than to qtmaildir_lib. A qrc compiled into a static library registers itself from a global initialiser, and the linker discards that object because nothing references it: the build succeeded, qInitResources_resources() was present in the .a, and QFile::exists(":/icons/qtmaildir.svg") still returned false at runtime. Verified loading at 16, 32 and 64 pixels after the move. Toolbar and menu actions take icons from the system theme by their standard names, so they match the rest of the desktop rather than shipping bespoke art. A theme lacking one leaves that action as text, which still works.
2026-08-04docs: add post-0.1.0 usability backlog and app iconDanilo M.1-0/+5
Collects the items found while actually using 0.1.0. Two clusters dominate: state that does not survive restart (splitter, zoom, account selection) and actions reachable only by memorized keys. The plan is open by design rather than a fixed release scope. Numbering is stable so notes referring to an item keep meaning the same thing. Decisions recorded while triaging: - UI state goes to its own file, not qtmaildir.conf. That file is hand-edited and rewriting it on exit would eat comments QSettings does not preserve. - Auto-mark-read stays off the undo stack. An explicit toggle_unread action already exists, so Ctrl+Z need not undo an action the user never took. - Zoom is Chromium's, not ours. No setZoomFactor call exists in src/, so persisting it means taking ownership of zoom first. Icon is a tag rather than an envelope, since tagging is the core interaction and an envelope would not distinguish it from any other mail client. Verified legible at 16x16, which is where it is mostly seen.