Skip to content

Refine gloss hover affordance - #319

Merged
max-sixty merged 3 commits into
mainfrom
codex/refine-gloss-hover
Sep 6, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/refine-gloss-hover

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Glosses now use the dotted-underlined phrase as their only visible affordance: hover reveals the explanation, click or tap pins it, and keyboard focus outlines the phrase. The widget also reconciles its desired state with the native popover so clicking a hover-open gloss no longer dismisses it.

The gallery preview generator now updates its content-addressed image references while regenerating all ten stills.

Validated with the everyday suite (888 passed), six focused nightly checks for the gloss, pointer, and export surfaces, the light/dark render gate, a mouse-and-keyboard browser sweep, and a context-blind first-use check.

This was written by Codex on behalf of max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things worth surfacing; no defects in the gloss change itself.

This carries PR #315 verbatim. The tests/test_render_widgets.py hunk renaming decision to ask in test_an_ask_arrival_starts_with_the_context_that_frames_it is byte-identical to #315, which exists only for that fix and is unrelated to the gloss work. Both make the same edit, so they won't conflict, but whichever lands first leaves the other empty — worth closing #315, or dropping the hunk here.

The green test check doesn't cover any test this PR edits. test_render_widgets.py, test_render_controls.py, and test_render_export.py all carry pytestmark = pytest.mark.nightly, and ci.yaml's pull-request step runs the everyday suite (uv run pytest tests), which deselects them — as does the 888-passed run in the description. I ran the three files in full against the merge commit instead:

tests/test_render_widgets.py   105 passed
tests/test_render_export.py     43 passed
tests/test_render_controls.py   78 passed, 1 failed

The one failure is test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus on media (.lf-media-open:is(:focus-visible, .lf-focus-visible)) — already red on main at 4236327 and 8c7661c, and unrelated to this change. The new gloss-mark ring is not in the unlit list, so the lf-gloss:has(> .lf-gloss-mark:is(:focus-visible, .lf-focus-visible)) rule is painted and walked, and the aim sweep passes with .lf-gloss-mark out of AIM_SURFACES.

I also checked the generator's output directly: all ten /media/… addresses in docs/examples.html equal the sha256(...)[:16] of the committed stills.

What the widget state machine was traced against

The :popover-open reconciliation holds on the paths I walked: hover-then-click (light dismiss closes at pointerup, #click re-pins, #sync sees show === #shown but show !== open and re-shows, and the queued toggle then bails on the new :popover-open guard); click-to-unpin while still hovering; Escape while focused; a second gloss stacking over the first; and reachedForWords/nested-control early returns, where the queued toggle still lands the widget on dismissed with the card closed. #shown stays the widget's intent and the popover stays the top-layer authority, so no second store is added.

@max-sixty
max-sixty merged commit 7411a84 into main Sep 6, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/refine-gloss-hover branch September 6, 2026 00:42
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.

2 participants