diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-14 18:41:10 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-14 18:41:10 +0200 |
| commit | f897153a1196f23fe0d82dc703d98df1363bf3fc (patch) | |
| tree | 9fbec09be98ebb55582729dbad0c22580221bee7 /CLAUDE.md | |
| parent | bf715fe78c3c39a658f2d3446648bc07c775589d (diff) | |
| download | qtmaildir-f897153a1196f23fe0d82dc703d98df1363bf3fc.tar.gz qtmaildir-f897153a1196f23fe0d82dc703d98df1363bf3fc.zip | |
docs: close item 36, narrow item 66 with a negative result
Item 36's section moves to the closed file and its three traps go into
CLAUDE.md, which is where they will be read: the worker is unreachable
by findChild, rowCount on an unexpanded thread row is 0 by design, and
currentThreadId reports intent rather than content.
The claim that this class of bug cannot be reproduced in test_mainwindow
is now false, so it is corrected rather than left standing beside its
replacement. One in-test reference to item 36 as a permanent limitation
is reworded: bare-window cases still have no worker, but that is now a
choice per case rather than a property of the binary.
Item 66 stays open with the simple case ruled out. The negative result
sharpens this entry's own candidate rather than contradicting it: the
test drives setCurrentIndex, which updates the selection model
synchronously, while the suspect guard turns on a real click not having
done so yet. Two cheaper conditions are named as still unexcluded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -398,13 +398,36 @@ standalone program containing none of this project's code. A size assertion there passes against both, and a mutation putting the bug back leaves the suite green. Assert on the stored value, and leave the frame to a hand test. +**`test_mainwindow` can now drive a real worker, and three things about it will +waste a session each.** `WorkerBackedWindow` builds a throwaway notmuch +database and writes a `qtmaildir.conf` pointing at it; `wireWorker()` reads +`notmuch_config` like any other key, so no production hook exists or is needed. +It is opt-in per test because the fifty-odd bare-window cases must not pay for a +`notmuch new`. The three traps, all found by a probe that reported success while +measuring nothing: + +- **The worker is unreachable by `findChild`.** It is created parentless and + moved to its own thread, so it is not in the window's hierarchy. Wait on + observable state with `QTRY_VERIFY_WITH_TIMEOUT`, never on worker signals and + never on a fixed `qWait(n)`, which passes when the result never arrives. +- **`rowCount()` on a thread row is 0 until the thread is expanded**, since + children are populated by the expansion. `hasChildren()` is the pre-expansion + question and falls back to `summary.totalCount > 1`. An assertion on + `rowCount` fails against correct code. +- **`currentThreadId()` reports INTENT, not content.** It is assigned + synchronously in the selection handler before any worker round-trip, so a test + asserting on it passes with `onThreadLoaded()` disabled entirely, measured. + `MessageView::showingPlaceholder()` is what the user sees; assert the pane is + blank BEFORE the gesture so the check after it means something. + **A queued load can outlive the state that started it.** `loadThread` crosses to the worker on a queued connection, so its reply lands after whatever the UI did in the meantime. The generation counter covers a superseded *query*, not a superseded *selection*: blanking the pane and then receiving an in-flight thread repaints it. `onThreadLoaded` therefore drops a -reply that arrives while more than one row is selected. This class of bug cannot be -reproduced in `test_mainwindow`, which has no worker and never fires `threadLoaded`; it -needs the notmuch fixture or a hand test. +reply that arrives while more than one row is selected. This class of bug USED to be +unreproducible in `test_mainwindow`, which had no worker and never fired `threadLoaded`. +Item 36 changed that: `WorkerBackedWindow` (above) gives a test a real worker, and the +`onThreadLoaded` guard is covered by one. **Do not conclude a key binding is dead from `QTest::keyClick()`.** Whether a symbol needs Shift is a layout property, not a Qt one. `Ctrl++` is the shipped `zoom_in` default and is |
