summaryrefslogtreecommitdiffstats
path: root/docs/superpowers/plans
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-07 18:02:51 +0200
committerDanilo M. <danix@danix.xyz>2026-08-07 18:02:51 +0200
commitd62a9eb9694beee1674f9c63f9a77029a81627ee (patch)
treebac56e4f15a64acde7195fd971895afb9552a91e /docs/superpowers/plans
parent5f77cb8374b983b17268dfd571afa65e2678147b (diff)
downloadqtmaildir-d62a9eb9694beee1674f9c63f9a77029a81627ee.tar.gz
qtmaildir-d62a9eb9694beee1674f9c63f9a77029a81627ee.zip
test: pin the offscreen platform, and let the popup test check its own geometry
ctest sets no QT_QPA_PLATFORM, so the suite's verdict depended on how it was invoked: green for anyone exporting `offscreen` by hand, red under ctest in the same tree. That cost a wrong diagnosis before the cause was found, an unrelated change blamed for a failure that reproduces on a clean checkout. The Wayland warning blames a missing transientParent, which is misleading. Instrumenting the test showed the popup viewport arriving as 1278x0. The zero height is why the grab returned a null pixmap, but the width is the worse half: this test sizes a line edit to 550px and exists to prove a description survives a popup that size, so a working grab would have measured a popup twice that wide and passed while proving nothing. Offscreen gives 548x40, the geometry the test means. Pinning the platform is therefore the correct fix rather than an opt-out. It is set in add_qtmaildir_test so it covers every test, including the two others that create widgets, and anything added later. The test now also asserts its own geometry, since CMake only governs ctest and the binary is often run directly. A bare !shot.isNull() said nothing useful; it now reports "popup viewport has no height (1278x0)" or names a popup too wide to be the case under test. Both guards were verified by mutation.
Diffstat (limited to 'docs/superpowers/plans')
-rw-r--r--docs/superpowers/plans/2026-08-03-post-0.1.0-usability.md31
1 files changed, 30 insertions, 1 deletions
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 cefdfc3..6405e75 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
@@ -100,7 +100,7 @@ taking that too literally.
| 49 | Sync runs every account regardless of what changed | workflow | M | open |
| 50 | Esc blanks the pane but leaves the row selected | workflow | XS | open |
| 51 | Clicking a subject scrolls the list sideways | presentation | XS | open |
-| 52 | `test_querycompleter` fails under Wayland, passes offscreen | testing | XS | open |
+| 52 | `test_querycompleter` fails under Wayland, passes offscreen | testing | XS | **done** |
Sizes are rough: XS under an hour, S a sitting, M a session.
@@ -2942,6 +2942,35 @@ of them, the same shape as item 46:
- Whatever is chosen must hold for `test_mainwindow` and `test_messageview` too,
which create widgets and could grow the same dependency.
+### Outcome (done 2026-08-07)
+
+**The warning named the wrong cause, and the real one was worse.** Wayland's
+"failed to create grabbing popup" message points at a transientParent, so the
+plan above proposed setting one. Instrumenting the test first showed what
+actually reaches the assertion: the popup viewport measured **1278x0**. The zero
+height is why the grab returned a null pixmap, but the 1278 is the important
+half. This test sizes a line edit to 550px and exists to prove the description
+survives a popup that size; under Wayland it was handed a popup more than twice
+that wide, so a working grab would have measured a different popup and **passed
+while proving nothing**. Offscreen gives 548x40, the geometry the test means.
+
+So pinning the platform is the correct fix rather than the cheap one, and the
+preference recorded above was based on a misreading. Deterministic geometry is a
+requirement of the test, not a convenience: a compositor is entitled to size a
+popup how it likes.
+
+- `set_tests_properties(... ENVIRONMENT QT_QPA_PLATFORM=offscreen)` is applied
+ in `add_qtmaildir_test()`, so it covers every test including `test_mainwindow`
+ and `test_messageview` as the constraint required, and any test added later.
+- **The test also guards its own geometry now**, since the CMake setting only
+ covers `ctest` and the binary is often run directly. It asserts the viewport
+ has a non-zero height and is no wider than 700px, each with a message naming
+ the cause. A bare `QVERIFY(!shot.isNull())` reported nothing useful; the guard
+ now says "popup viewport has no height (1278x0)".
+- Both guards were **verified by mutation**: widening the line edit to 1200px
+ makes the width guard fail with its explanation, where before the change that
+ case would have passed.
+
## Deferred, unsized, or split out
Items noted while triaging but not part of the original list. Same numbering