From c608ce2bfb5e4a6aba319e23d4a8bd299ebb4a3b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 17 Nov 2026 10:24:05 +0100 Subject: fix: fall back to icons the installed themes still carry Archive, Restore and the Inbox filter rendered as text only, and three icon tests failed on master: a system update left no theme in the candy-icons inheritance chain carrying mail-archive, edit-undelete or a findable mail-inbox (Breeze ships it only as a 16px -symbolic). archive and restore gain archive-insert and document-revert in the kThemeIcons fallback slot; the Inbox filter uses mail-folder-inbox, the folder shape the Sent filter already follows. Closes item 215. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 3 ++ .../2026-08-03-post-0.1.0-usability-closed.md | 37 ++++++++++++++++++++++ .../plans/2026-08-03-post-0.1.0-usability.md | 30 +----------------- src/mainwindow.cpp | 15 ++++++--- 4 files changed, 52 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d76a249..31fd88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,9 @@ point at which they are stable. ### Fixed +- Archive, Restore and the Inbox filter show their icons again. The icon + names they asked for are no longer in Breeze or Adwaita, so each now falls + back to one that is. - Acting on thousands of selected rows at once no longer freezes the window. Archiving a 10k-row selection spent its time refreshing the menu labels once per row, against the whole selection each time. It now does that once. diff --git a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md index 7769c51..dde3643 100644 --- a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md +++ b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability-closed.md @@ -10930,3 +10930,40 @@ and the `post-new` hook only ever runs `notmuch tag`. The rules predate items round trip under "Changing the rule format". The hook would now rename files on real mail every ten minutes, and a wrong destination reaches the server (item 103), so the destination is an account role, never a folder name. + +## 215. Archive, Restore and the Inbox filter lost their icons + +**Observed (2026-11-16, while building 214).** Three `test_mainwindow` cases +fail on master: `everyActionCarriesAnIcon` ("archive, restore have no icon"), +`noTwoActionsShareAnIcon` (39 of 41 actions had an icon), and +`everyBuiltinFilterButtonCarriesAnIconAndItsText` ("filter 'inbox' was given no +themed icon name"). In the running application the same three show as text +only. + +**Cause.** Verified on this machine, not assumed. `kThemeIcons` in +`mainwindow.cpp` asks for `mail-archive` and `edit-undelete` with no fallback +name, and the filter-button table asks for `mail-inbox`. qt6ct sets the theme +to candy-icons, which inherits breeze-dark, Adwaita and hicolor; none of those +four, nor breeze, carries any of the three names. Breeze's directories were +last updated on 2026-11-05 and 2026-11-11, which fits the tests having passed +before. + +**Approach.** Give each a fallback that the installed themes DO carry, through +the second name `kThemeIcons` already supports (the filter table needs the same +pair shape). Check each candidate with `find -L` across the theme and its +`Inherits=` chain, not from memory, and keep the no-duplicate-icons rule. + +**Constraints.** The tests read the desktop's real theme (qt6ct under +`QT_QPA_PLATFORMTHEME`), so whether they pass depends on the machine's icon +packages, which is how a system update broke them with no code change. Item 199 +(ship our own icon set) would remove that dependency for the panes, but the +chrome deliberately stays on the system theme, so this item stands on its own. + +**Done 2026-11-17.** Fallbacks verified with `find -L` across candy-icons and +its `Inherits=` chain: `archive-insert` behind `mail-archive`, and +`document-revert` behind `edit-undelete`, both through `kThemeIcons`' second +slot and neither used by another action. The Inbox filter's single name is +now `mail-folder-inbox`, the folder shape the Sent filter already follows, +rather than a pair: Breeze ships `mail-inbox` only as a 16px `-symbolic`, +which `QIcon::fromTheme` does not find. The three tests pass; confirmed on +sight by the user. diff --git a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md index 323af39..a4e3909 100644 --- a/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md +++ b/docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md @@ -152,7 +152,7 @@ taking that too literally. | 212 | A rule edit reaches only new mail; applying it to the backlog is a hand-typed `notmuch tag` | workflow | M | open, designed: `specs/2026-10-31-rule-apply-and-archive-design.md` Part A. Apply saves, counts what would change, confirms with the count (a new documented exception to the no-confirmation rule), writes through `applyTags` for exact undo | | 213 | A rule removing `inbox` is skipped whole by the hook, so promo mail arrives untagged | defect | S-M | open, designed: same spec, Part B. Optional per-rule `allow_archive`, both readers, no version bump; `unread` stays refused; the dialog warns about rules the hook will skip | | 214 | A rule can tag mail spam but cannot move it to the spam or trash folder | workflow | M | **done** 2026-11-16, unreleased, on `rule-move`. Spec: `specs/2026-11-16-rule-move-design.md`. The nesting assumption held: `notmuch new --no-hooks` runs inside `post-new`. Review fixes: a bad `move` is kept raw rather than dropped (the rule-id lesson), a nested account without the role resolves to itself, and `_quote` doubles quotes (it never matched an id holding one, on the carve-out path too). Section in the closed file. Original note: Optional `move` field, `spam` or `trash` (an account role, never a folder name), both readers, no version bump; the hook moves on arrival, strips `inbox`, keeps `unread`; Apply (212) inherits it later. First task: verify `notmuch new` can run inside `post-new` | -| 215 | Archive, Restore and the Inbox filter lost their icons, and three icon tests fail | defect | S | open, 2026-11-16, found by the full suite while building 214. The icon names (`mail-archive`, `edit-undelete`, `mail-inbox`) exist in no installed theme: not candy-icons, and not breeze-dark, breeze, Adwaita or hicolor, which it inherits. Breeze was last updated 2026-11-05/11. Needs fallback names, the second slot `kThemeIcons` already has; the tests also read the DESKTOP theme, so the suite's result depends on the machine | +| 215 | Archive, Restore and the Inbox filter lost their icons, and three icon tests fail | defect | S | **done** 2026-11-17, unreleased. Fallback names that the installed themes carry: `archive-insert`, `document-revert`, and `mail-folder-inbox` for the filter | | 216 | An invitation cannot be sent, and replies to one are not applied | workflow | M | open, 2026-11-16, split from 207. Editing an event's attendee list, sending `METHOD:REQUEST` through `MessageBuilder`, and applying the `METHOD:REPLY`s that come back to the stored event's `PARTSTAT`s. Builds on 207's `Invitation` parsing and calendar-part support | | 73 | This backlog is past four thousand lines | maintenance | S | **done** 2026-08-13; 5056 lines to 578, closed sections moved to `2026-08-03-post-0.1.0-usability-closed.md` | | 74 | "Searching..." keeps claiming a query is running while rows are already arriving | feedback | XS | **done** 2026-08-15, unreleased. The status-bar half only: the bar now counts threads per batch. The cold-cache delay itself was measured in 2026-08-11 and is not fixable here | @@ -1737,34 +1737,6 @@ applied without the removal. The rules dialog says nothing about it. round trip under "Changing the rule format". The hook runs every ten minutes on real mail. -## 215. Archive, Restore and the Inbox filter lost their icons - -**Observed (2026-11-16, while building 214).** Three `test_mainwindow` cases -fail on master: `everyActionCarriesAnIcon` ("archive, restore have no icon"), -`noTwoActionsShareAnIcon` (39 of 41 actions had an icon), and -`everyBuiltinFilterButtonCarriesAnIconAndItsText` ("filter 'inbox' was given no -themed icon name"). In the running application the same three show as text -only. - -**Cause.** Verified on this machine, not assumed. `kThemeIcons` in -`mainwindow.cpp` asks for `mail-archive` and `edit-undelete` with no fallback -name, and the filter-button table asks for `mail-inbox`. qt6ct sets the theme -to candy-icons, which inherits breeze-dark, Adwaita and hicolor; none of those -four, nor breeze, carries any of the three names. Breeze's directories were -last updated on 2026-11-05 and 2026-11-11, which fits the tests having passed -before. - -**Approach.** Give each a fallback that the installed themes DO carry, through -the second name `kThemeIcons` already supports (the filter table needs the same -pair shape). Check each candidate with `find -L` across the theme and its -`Inherits=` chain, not from memory, and keep the no-duplicate-icons rule. - -**Constraints.** The tests read the desktop's real theme (qt6ct under -`QT_QPA_PLATFORMTHEME`), so whether they pass depends on the machine's icon -packages, which is how a system update broke them with no code change. Item 199 -(ship our own icon set) would remove that dependency for the panes, but the -chrome deliberately stays on the system theme, so this item stands on its own. - ## 216. An invitation cannot be sent, and replies to one are not applied **Observed.** Split from 207 on 2026-11-16, when the user chose to design the diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4377870..f719689 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2198,11 +2198,16 @@ const QHash> kThemeIcons = { // NOT mail-mark-read, which mark_all_read below uses. The two shared it // in 0.12.0, and with the toolbar icon-only the icon is the whole // control: two buttons with different consequences looked identical. - { QStringLiteral("archive"), { QStringLiteral("mail-archive"), QString() } }, + // + // Item 215: Breeze, Adwaita and candy-icons carry no `mail-archive`, so + // `archive-insert` (Breeze's box-with-arrow) is the second chance. + { QStringLiteral("archive"), { QStringLiteral("mail-archive"), QStringLiteral("archive-insert") } }, { QStringLiteral("delete"), { QStringLiteral("edit-delete"), QString() } }, // The inverse of delete, and the theme's own name for it: the icon // every desktop uses for taking something back out of the wastebasket. - { QStringLiteral("restore"), { QStringLiteral("edit-undelete"), QString() } }, + // Item 215: no installed theme carries it any more, so `document-revert` + // ("take it back") follows. NOT edit-undo, which undo uses. + { QStringLiteral("restore"), { QStringLiteral("edit-undelete"), QStringLiteral("document-revert") } }, // A SEARCH, not a delete. The action reports what it finds and moves // nothing, so an icon from the delete family would promise the one // thing it deliberately does not do. @@ -3317,10 +3322,12 @@ void MainWindow::buildSavedQueryRow(QWidget *parent, QVBoxLayout *layout) // label can be wrong for years without anyone noticing. // // mail-folder-sent, not mail-sent: the former is the folder shape every - // theme ships, the latter is the envelope-in-flight some do not. + // theme ships, the latter is the envelope-in-flight some do not. The + // inbox follows the same rule since item 215: Breeze ships + // `mail-inbox` only as a 16px symbolic, which QIcon does not find. static const QHash filterIcons = { { QStringLiteral("unread"), QStringLiteral("mail-mark-unread") }, - { QStringLiteral("inbox"), QStringLiteral("mail-inbox") }, + { QStringLiteral("inbox"), QStringLiteral("mail-folder-inbox") }, { QStringLiteral("flagged"), QStringLiteral("starred") }, { QStringLiteral("sent"), QStringLiteral("mail-folder-sent") }, { QStringLiteral("drafts"), QStringLiteral("document-edit") }, -- cgit v1.2.3