Skip to content

fix: read the phone tab strip after a tap's press lets go, and have the shift watch hear it - #5675

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-5653
Nov 7, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-5653

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Since #5340 took Leaf's buttons from Web Awesome's native styles, a pressed .lf-btn carries transform: scale(.9875) while it is :active. After a touch tap, Chromium keeps that press on a timer for about 100 ms past the pointer's last event. Two readings in test_on_a_phone_turning_on_s_tabs_moves_nothing caught that window:

  • The assertion. panel_settled returns inside the press window, so the tab geometry the test reads can include the press's scale. The failing reading is exactly that: the first tab's width goes 44.92 → 44.36 (× 0.9875), and x and y move by half the lost width and height. Whether a read lands in the window depends on timing, which is why CI's onset couldn't be bisected: the runtime speedups in b3c9842e8..6cd5093f3 let panel_settled return sooner. The test now reads once no control in the panel's foot, where its tabs stand, is :active. No tab actually moves when the views change.
  • The teardown error. shift_watch.js only re-reads the page when something announces a change. When the press lets go on that timer, no event fires, so the verdict read found an unannounced change to the tab's text (shift watch missed a change to #text in span.lf-fp-tab-words). The watch now remembers the node a pointer released on and announces the frame where its :active match changes, which costs one matches() per frame. The header's "Unchanged frames" list names the new source.

No product behavior changes; the press feedback stays.

Verification: on main, the floating-panel test fails locally every run with the same numbers CI reports, and with this change it passed three runs in a row. Each half fails without the other. The new test_a_tap_s_press_letting_go_is_heard reports shift-watch-missed without the watch change and passes with it. The shift-watch tests matching press, tap, verdict and complete-readings (42) and the floating panel's phone/tap/touch tests pass.

Closes #5653 — automated triage

…he shift watch hear it

Since #5340 took Leaf's buttons from Web Awesome's native styles, a pressed `.lf-btn` carries `transform: scale(.9875)` while it is `:active`. After a touch tap, Chromium keeps that press on a timer for about 100 ms past the pointer's last event. Two readings in `test_on_a_phone_turning_on_s_tabs_moves_nothing` caught that window:

- **The assertion.** `panel_settled` returns inside the press window, so the tab geometry the test reads can include the press's scale. The failing reading is exactly that: the first tab's width goes 44.92 → 44.36 (× 0.9875), and x and y move by half the lost width and height. Whether a read lands in the window depends on timing, which is why CI's onset couldn't be bisected: the runtime speedups in `b3c9842e8..6cd5093` let `panel_settled` return sooner. The test now reads once no control in the panel's head is `:active`. No tab actually moves when the views change.
- **The teardown error.** `shift_watch.js` only re-reads the page when something announces a change. When the press lets go on that timer, no event fires, so the verdict read found an unannounced change to the tab's text (`shift watch missed a change to #text in span.lf-fp-tab-words`). The watch now remembers the node a pointer released on and announces the frame where its `:active` match changes, which costs one `matches()` per frame. The header's "Unchanged frames" list names the new source.

No product behavior changes; the press feedback stays.

Verification: on main, the floating-panel test fails locally every run with the same numbers CI reports, and with this change it passed three runs in a row. Each half fails without the other. The new `test_a_tap_s_press_letting_go_is_heard` reports `shift-watch-missed` without the watch change and passes with it. The shift-watch tests matching press, tap, verdict and complete-readings (42) and the floating panel's phone/tap/touch tests pass.

Closes #5653
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_on_a_phone_turning_on_s_tabs_moves_nothing fails on every main push run; its onset can't be bisected locally

2 participants