Skip to content

test: leave hidden presses out of the spent-control face comparison - #6841

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6837
Nov 23, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-6837

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_control_a_widget_built_is_told_from_a_label_it_wrote failed on main because of #6801 (10ac9da49). Bisecting over 017ddeccf..10ac9da49 gives 52258cd8b passing and 10ac9da49 failing. With this change the test passes on current main (49007d755) and still passes at 52258cd8b.

Cause. #6801 made the composer own which press stands in the field's corner. The panel field's resting Dictate is now hidden with the hidden attribute, where the panel used to hide it with display: none. Dictate's keyboard command is available only while !mic.hidden (browser/runtime/composing/input.js, text.dictate), so the scope marks the hidden button aria-disabled="true" (keyboard/scopes.js, reflectButton). The test gathers every spent [data-lf-offer] press and requires its face to change when the disabled state is lifted. A disabled disc keeps the quiet ink at full opacity (controls.css, "A press disabled keeps the quiet ink"), so the hidden Dictate looked the same either way. That is the one entry in the failure whose face and armed matched.

Repair. The test now leaves out presses whose own hidden is set. They draw nothing, so their face has nothing to tell apart. #6801's intent and the interface are unchanged. The behavior the test protects, that every spent control on screen looks different from its live face, is still asserted on the composer's Send and the media viewer's controls.

One observation for a later look, not changed here: a visible Dictate marked disabled, as while a send or upload is in flight, also keeps its resting face, since controls.css gives a disabled disc the quiet ink Dictate already wears. Only the cursor and the missing hover tint show it is spent. That is the stated design, and this page never draws that state.

Closes #6837 — automated triage

Since #6801 the floating panel's composer hides its resting Dictate with
the `hidden` attribute rather than panel CSS. Dictate's command is
available only while `!mic.hidden`, so the keyboard scope marks the hidden
button `aria-disabled="true"`, and the spent-control test started comparing
its face. A disabled disc keeps the quiet ink at full opacity
(controls.css), so the hidden Dictate read the same with its disabled
state lifted. A press its owner hid draws nothing, so the test now
compares only presses that aren't hidden. The behavior it protects, that
every drawn spent control looks different from its live face, is
unchanged.

Closes #6837
@leaf-agent
leaf-agent merged commit 207f689 into main Nov 23, 2026
7 of 8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6837 branch November 23, 2026 05:21
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_a_control_a_widget_built_is_told_from_a_label_it_wrote: spent controls look the same as armed since 017ddeccf..10ac9da49

1 participant