summaryrefslogtreecommitdiffstats
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-13 19:19:58 +0200
committerDanilo M. <danix@danix.xyz>2026-08-13 19:19:58 +0200
commit0c5eea8f0d0ccc5b8eb6220814c9e212d6c1ccc2 (patch)
tree4275734ed0c31f46609f9fd5b78412209dbeec1c /CHANGELOG.md
parent5e30d1805656895387ba83865d9635caf2e51618 (diff)
downloadqtmaildir-0c5eea8f0d0ccc5b8eb6220814c9e212d6c1ccc2.tar.gz
qtmaildir-0c5eea8f0d0ccc5b8eb6220814c9e212d6c1ccc2.zip
feat(queries): save a query from the UI, and split the buttons off the query row
Second half of item 23, on top of the storage change. A query can now be kept without hand-editing a file, and the row of buttons no longer grows without bound. Ctrl+S opens a dialog on whatever is in the query bar, taking a name, an optional account scope and whether the query is pinned. It preselects the account already chosen in the dropdown, since that is the scope the user is looking at, and it says so when a name is about to replace an existing query rather than refusing the name: overwriting a saved query on purpose is a normal edit, and the only thing worth preventing is doing it without noticing. Saving over an entry keeps the stored entry's unknown fields rather than the dialog's fresh value, so a field written by a later build survives being edited here. The saved queries move to a row of their own beneath the query bar, pinned ones as buttons and the rest behind a More queries menu that only exists when something is in it. The ponytail note that stood in the query row predicted exactly this: an unbounded list of buttons sharing the row squeezed the field. Sent moves down with them and is still not a saved query, for the reason already recorded there. A saved query's account scope goes through the account DROPDOWN rather than being baked into the query text. runQuery() already wraps the query in the selected account's path, so pre-scoping here would apply it twice, and setting the dropdown also shows the user which scope they are in. An unscoped query clears the selection rather than inheriting whatever the last one left, which is the same defect the rules preview had. Seven tests, three mutations. Ignoring the pinned flag fails two of them, pre-scoping the text instead of setting the dropdown fails two, and letting an unscoped query inherit the previous account fails one. The menu-absence test initially passed against no implementation at all, since it only asserted a widget was missing; it now proves the row was populated first, which is the guard that class of test needs. Two existing invariants caught real omissions rather than needing adjustment: every registered action must appear in KeyMap::knownActions(), which is what gives it a configurable binding, and every action needs its own icon. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e867f02..2d264e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,43 @@ point at which they are stable.
## [Unreleased]
+### Added
+
+- A **Save query** action (`Ctrl+S`) keeps the query in the bar as a saved
+ query, naming it, optionally scoping it to one account, and choosing whether
+ it appears as a button or in a menu. Saved queries no longer have to be added
+ by hand-editing the config file (item 23).
+- Saved queries live in `~/.config/qtmaildir/queries.json`, which carries their
+ **order**, a `pinned` flag and an optional account scope. The order in the
+ file is the order the buttons appear in, so rearranging them is a matter of
+ moving lines.
+
+### Changed
+
+- Saved queries have a **row of their own** beneath the query bar rather than
+ sharing it, and the unpinned ones sit behind a **More queries** menu, so the
+ query field is no longer squeezed by a long list of buttons.
+- Saved-query buttons follow the file's order instead of appearing
+ alphabetically.
+
+### Upgrading
+
+Saved queries move out of the `[queries]` section of `qtmaildir.conf` and into
+`~/.config/qtmaildir/queries.json`. **The first launch migrates them for you**:
+the section is read, the JSON file is written from it, and every entry is
+marked pinned so your buttons stay where they were.
+
+Your config file is left byte-for-byte alone. The old `[queries]` section stays
+in it, ignored from then on, and can be deleted by hand whenever you like. It is
+not removed automatically because rewriting the file would discard your comments
+and reorder your keys.
+
+One behaviour changes with the move. Buttons used to appear in alphabetical
+order and now follow the file. If `[general] startup_query` names a query that
+does not exist, the fallback is likewise the first query in the file rather than
+the alphabetically first one, so a config that relied on that fallback may open
+on a different query than before.
+
## [0.17.0] - 2026-08-13
A rule is built from rows now instead of typed into four free-text fields: