From 94462ae2cc68d563f883b29f1812f93d6b5a6c06 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 24 Aug 2026 18:55:38 +0200 Subject: feat(queries): drop pinning, the menu is every saved query's home Item 94. The query row is the six built-in filters (Unread, Inbox, Important, Sent, Drafts, Trash), which compose with the account dropdown, and every saved query lives in the More queries menu. Nothing has to decide which of the user's queries get button space, which is the question item 93 would otherwise have had to answer. SavedQuery::pinned is gone from the struct, the reader, the writer, the save dialog's checkbox and the pin/unpin context action. The stored key is stripped rather than left ignored, at the user's choice. That has one non-obvious requirement: `pinned` stays named in loadSavedQueries' `known` list precisely so it is NOT collected as an unknown field, since those are preserved and written straight back. A mutation removing that name puts the key in the file for ever. Confirmed with the user before starting that the built-in set covers their use, since removing pinning removes the escape hatch this item was blocked on. Tests: four pinning tests replaced by two on the new rule, four more converted from buttons to menu entries. migrationPinsEveryEntry and aStoredGeneratedQueryIsUnpinnedNotDropped are rewritten around the property that outlived the flag rather than deleted: an entry must be KEPT, which is what both assertions were really guarding. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KEcn3u19xPqv6ggD15PG4c --- src/mainwindow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.h') diff --git a/src/mainwindow.h b/src/mainwindow.h index 4b1ef8f..951eaa4 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -446,8 +446,8 @@ private: /// Builds the row of saved-query buttons, the overflow menu and Sent. /// /// Its own row since item 23: an unbounded list of buttons sharing the - /// query row squeezed the field, which is the whole reason for the - /// pinned/unpinned split. + /// query row squeezed the field. Item 94 settled the split the other way, + /// so the row is built-in filters and one menu. void buildSavedQueryRow(QWidget *parent, QVBoxLayout *layout); /// Runs a saved query, taking its account scope through the dropdown. -- cgit v1.2.3