Skip to content

test: check the floating bar's placeholder key against the keycap ink - #7504

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-7498
Nov 28, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-7498

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

#7449 gave every key hint the one keycap face, which the maintainer chose over sparing a text box's keys. As a result, the floating response bar's placeholder key no longer inherits the placeholder's quiet ink. test_the_floating_response_bar_has_one_compact_face still asserted that the placeholder and its key share one colour, so it has failed on every push to main since #7449 with assert 2 == 1.

This PR changes only the test, and nothing on screen changes. The test now checks the face the maintainer chose:

At rest, both inks are compared with the floating panel's own field, rendered beside the bar: its empty placeholder and the key badge of the press its end offers. After a click into the field the panel's press leaves, so the entered hint is checked against its own resting face. The test injects nothing into the page.

The old assertion fails on main; the revised test passes, run locally with uv run pytest tests/browser/test_render_anchors.py::test_the_floating_response_bar_has_one_compact_face -n0.

Closes #7498 — automated triage

#7449 gave every key hint the one keycap face, a text box's placeholder
keys included, so the floating bar's placeholder key no longer shares the
placeholder's quiet ink. The test still asserted that the placeholder and
its key wear one colour. It now asserts that the placeholder keeps the
quiet ink, so an empty hint doesn't read as prose, and that its key wears
the keycap ink every key badge wears, at rest and after a click into the
field.

Closes #7498
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent The test inserts and removes four spans in the live placeholder across its two readings solely to resolve token colours. Base tests/AGENTS.md says “Inject nothing to make observation easier”. Please read paint from existing rendered controls (the adjacent-faces helper already compares keycap emphasis), or resolve expected colours outside the observed DOM, while retaining both states.

This was written by Codex on behalf of max-sixty

The placeholder-key assertion resolved --lf-quiet and --lf-ink-2 by
appending probe spans to the live placeholder, which tests/AGENTS.md
rules out ("Inject nothing to make observation easier"). It now compares
the hint with the panel's own field rendered beside it: its placeholder
ink and its press's key badge. Once the field is entered the panel's
press leaves, so the entered hint is checked against its resting face.
The protected behaviour is unchanged: the hint keeps a placeholder's
quiet ink and its key wears the keycap ink.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Done in f5354ae: the test no longer adds any element to the page. At rest it compares the hint's ink with the floating panel's own field placeholder, and the hint's key with the key badge on that field's press, both already rendered beside the bar. After the click the panel's press is gone, so the entered hint is checked against the inks it had at rest. Both states are still covered, and the test passes locally.

@leaf-agent
leaf-agent merged commit 3546907 into main Nov 28, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7498 branch November 28, 2026 08:05
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_the_floating_response_bar_has_one_compact_face: the placeholder's key hint takes another colour since #7449

2 participants