Commit Graph
2 Commits
Author SHA1 Message Date
yetone d84ed7fcfd gui tests: checkbox-look reads a ticked box's colour once its own transition ends
checkbox-look failed about 1 run in 3 in Chromium dark when run alone ("a
ticked box is filled with the accent": rgb(35, 35, 39), the card, against
the accent). At the failing read the box was checked and matched :checked,
and the :checked rule was the winning one. The box still showed a
background-color transition at currentTime 0. The reduced-motion rule
(app.css: `*, *::before, *::after { transition-duration: .01ms !important }`)
makes every property transition for .01ms, not none, and Chromium under
load can still hold that transition at its start two animation frames after
the click. The test read the colour after two rAFs. It now waits one frame
and then for the box's own getAnimations() to finish. The app is right, and
a user sees the fill within .01ms.

Run: a copy with the dark case six times, en only, in Chromium. Before, 11
of 18 failed; after, 30 of 30 passed. checkbox-look.test.cjs in Chromium
and WebKit (en and zh, light and dark) passed 4/4 each. With the :checked
fill taken out of the served app.css, it fails 4/4 in both engines.
2026-10-11 04:56:32 +08:00
yetone 12acf07a30 gui: checkboxes are drawn as magpie's own, not the system's (ARNO on Discord: 会话面板下的checkbox的样式和软件整体的设计风格有点割裂) — the Sessions page's boxes, and every other checkbox (Library picks, import apps, caller-key limits), were the system's: white squares on the dark page. They are now a 14 px rounded box on the card's colour with a faint border, filled with the accent and a check in its foreground when ticked, a bar when partly ticked (a folder with some of its sessions picked), a ring on keyboard focus; pages keep their own margins. checkbox-look.test.cjs (WebKit, en and zh, light and dark: unticked on the card, ticked and partly ticked filled with the accent, a click still ticks and unticks) fails on the old code; Chromium doesn't launch in this sandbox. Looked at in light and dark on WebKit. sessions-manage, -folder-delete, -toolbar, -purge, -bar-names, gateway-caller-keys, gateway-key-limit, library-items, -all, -desktop-skills pass on WebKit; go test ./internal/gui/ passes. 2026-10-04 22:32:19 +08:00