Files
magpie/internal/gui
yetone 54b6d4d397 gui tests: editor-thumbs-batched checks the thumbs shown, then Advanced opened (#5886)
editor-thumbs-batched went red on main from b03a37476 on (found by
bisecting 117f56c70..2abfe2b64 with the chromium half of the test):
three controls, off|on and off|week|all, with a thumb of width 0 two
pixels left of the option. b03a37476 moved Claude's warm-up and lean
lists into the provider editor's Advanced, which is closed when the
editor opens. Chromium answers offsetWidth inside a closed <details>
(its content is content-visibility: hidden and the read lays it out),
so the test's `on.offsetWidth` took those controls for shown ones,
while their ResizeObserver, rightly, had nothing to report yet.

Nothing is wrong in the page: the thumbs are put when Advanced opens.
The test now checks the thumbs whose option checkVisibility() says is
shown, then opens every closed <details> in the editor, waits two
frames, and checks every thumb again. That second check is what a user
opening Advanced sees.

WebKit's slow-read count was red too, on main as well (origin/main
70f4593e6: 208 at 40 accounts, 244 at 160; this branch 188/213). The
reads that differ were all holdModal's few a frame and the frames' own:
the open at 40 sometimes ends ~5 frames sooner. That is frame jitter,
not a read an account (+120 here), so the room for slow reads is 60,
not 24; the forced-layout room stays 24.

Run (mote, at the pushed base): editor-thumbs-batched, Chromium and
WebKit, en/zh/zh-TW/ja/de, 10/10 green three times in a row.

Broken by hand: thumbFit's callback made a no-op (the thumbs put only
when drawn) is red 5/5 in Chromium, on "opened off|on: option
655.8+38.0, thumb 653.8+0.0" and "opened off|week|all", the controls
in Advanced; the "shown" check stays green there, as it should.

Broken by hand: an offsetTop read for every account a frame after the
list is drawn is red in WebKit en and zh (278 at 40, 538 at 160).

Not tried: the WebKit half of the broken-by-hand run.
2026-11-13 12:20:29 +08:00
..
…
…