diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-06 20:06:45 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-06 20:06:45 +0200 |
| commit | ca89402d7e244e2616fdf13eb35c083afeb21826 (patch) | |
| tree | 34a3278510205e783e023f2c3cbcb2622e501067 /CLAUDE.md | |
| parent | eef7f6cc1b2f845d2ca1eba53336f64597c49e62 (diff) | |
| download | qtmaildir-ca89402d7e244e2616fdf13eb35c083afeb21826.tar.gz qtmaildir-ca89402d7e244e2616fdf13eb35c083afeb21826.zip | |
fix(ui): one Sync control, and a query bar that looks finished
Sync had two controls that behaved differently. The QPushButton beside the
query bar cleared the log, opened the pane and disabled itself; the QAction
behind the toolbar, menu and shortcut called start() and did nothing else,
discarding its return value so a rejected start was silent. Worse, item 29's
"disable Sync during a background sync" set the button only, so the toolbar
entry stayed clickable through a cron sync and could only produce the
script's EX_TEMPFAIL skip.
startSync() is now the single handler behind every route in, and the enabled
state lives on the QAction, which reaches the toolbar, the menu and the
shortcut at once. It also reports when no sync command is configured rather
than doing nothing.
The QPushButton is gone. It read as a Search button given it sat beside a
text field, which is the user's own observation and the reason the toolbar
one survives instead. Its unavailable-command tooltip moved to the action,
since that is the only thing that says why the control is dead.
Removing it left the query field running flush to the window edge, so the
saved-query buttons move from their own row onto the query row. The bar is
now framed by the account dropdown on the left and the saved queries on the
right, the empty row is gone, and the thread list gains the space. The field
also gains setClearButtonEnabled, which is Qt's own themed clear icon rather
than a hand-rolled button. A "Search" button was considered and rejected:
Return already runs the query.
No overflow handling for [queries], which is unbounded. Three entries fit;
item 23 already specifies buttons-plus-menu and is where that belongs.
CLAUDE.md's architecture diagram named four widget classes that have never
existed, QueryBar, SavedQueryBar, HeaderWidget and AttachmentBar. The query
row and the message header are built inline. Corrected, and the components
that do exist but were missing from it added.
Tests: the new action test was verified red first and load-bearing by
mutation. The old button test is deleted rather than repointed, being an
exact duplicate of it, and the unobservable-lock test now drives the action.
The clear button and the row layout were confirmed by hand; no test clicks
the icon, which is a mouse path.
Backlog: 45 done and reclassified as a defect rather than a cosmetic
redundancy, 47 added for the bar.
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -40,13 +40,23 @@ Maildir. **No network protocol work at all** — fetching and sending are extern ``` UI thread Worker thread MainWindow NotmuchWorker - ├ QueryBar / SavedQueryBar └ owns the only notmuch_database_t* - ├ ThreadListView ── ThreadListModel - └ MessageView (HeaderWidget, QWebEngineView, AttachmentBar) + ├ query row: QComboBox, QLineEdit, └ owns the only notmuch_database_t* + │ saved-query QPushButtons + ├ QTableView ── ThreadListModel (SubjectDelegate) + └ MessageView (header QLabel, QWebEngineView, attachment bar, TagStrip) Config (INI) KeyMap MailSync (QProcess) MimeParser (GMime) +SyncMonitor (/proc/locks) TagColors QueryCompleter ThreadCidMap ``` +The query row and the message-pane header are **built inline in `MainWindow` and +`MessageView`**, not as named widget classes. Earlier revisions of this diagram +listed `QueryBar`, `SavedQueryBar`, `HeaderWidget` and `AttachmentBar`; none of +those types have ever existed, and looking for them wastes a search. The widget +classes that do exist are `MessageView`, `TagStrip`, `TagDialog` and +`SubjectDelegate`; `TagChip` is a namespace of painting helpers, not a widget, +and `ThreadCidMap` is a struct. + **No `notmuch_*` pointer ever crosses the thread boundary.** Data crosses as the plain value structs in `src/types.h` (`ThreadSummary`, `MessageRef`, `TagChange`), over queued signals in both directions. `notmuchworker.cpp` is the only file that includes `notmuch.h` |
