Skip to content

Keep the gloss aim box inside the edge its badge fits inside - #243

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-33731588086
Sep 3, 2026
Merged

Keep the gloss aim box inside the edge its badge fits inside#243
max-sixty merged 1 commit into
mainfrom
fix/ci-33731588086

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Problem

The nightly leg of ci failed on run 33731588086 (fc0d216) with six cases. Four are already owned by open PRs — test_a_widgets_label_takes_a_comment_inside_the_control_it_labels, test_a_closed_leaf_clears_itself_off_the_tray and test_the_leaves_tray_takes_the_keyboard by #236, and the ring walk by #239's ship-review precondition ahead of #240's lf-shotframe fault. This takes the two that are nobody's yet; both reproduce on every local run.

A hit target hung past a table's edge. The gate read <table id=pr-scale-groups> in pr-walkthrough as scrolling 4px sideways in both schemes, and blamed the measure. The measure is innocent: the four columns come to 162 + 67 + 98 + 393 = 720px against a 720px table. The 4px is the gloss mark's aim box. It is absolutely positioned and centred on the badge, and an absolutely positioned box is outside layout but still inside its ancestors' scrollable overflow — so where the badge sits against a cell's inline edge, the half of the box hanging past it makes the table draggable sideways over a target nothing draws. 35064f62 grew the mark from a 6px glyph to a 14.7px circular badge, which moved it along that line to where the last cell's text ends flush against the table edge, and the latent fault surfaced.

A roster name the test asked for by its old words. fc0d216 prefixed each fleet roster item with § so a generated reference cannot collide with the authored worker name, and updated one of the two call sites. test_nested_command_projections_stop_at_their_own_boundary still asked for inner-worker exactly, and waited out its 30s.

Solution

Anchor the aim box to the badge's inline end rather than straddling it. It still covers the badge whole — the floor is 24px against a 14.7px badge — and still reaches back over the tail of the phrase it belongs to, which the rule's own comment already treats as free. Overflow toward the inline start is not scrollable, so on either writing direction there is nothing past the edge left to scroll to, and the fix holds for any container the badge itself fits inside rather than for this one table. The logical inset carries the RTL case that left: 50% did not.

The second is the missed call site: § inner-worker, matching the update fc0d216 made to test_command_hub_keeps_projection_focus_when_unrelated_news_arrives.

Testing

A gloss ending a shrink-to-fit cell is the new regression case in test_render_widgets.py — it reports the table scrolls 4px sideways on the parent theme and passes here, so the case fails for the reason the gate found rather than by construction.

Locally on this branch, rebased on a57ae29:

  • pytest tests — 808 passed, 6 skipped
  • pytest tests/test_render_widgets.py --run-nightly — 83 passed
  • pytest tests/test_render_gate.py::test_page_fixture_renders --run-nightly — every fixture in both schemes, including pr-walkthrough
  • test_nested_command_projections_stop_at_their_own_boundary, the two command-hub fleet cases, test_every_control_the_layer_offers_is_a_box_the_reader_can_hit (the aim-floor sweep reads the ::after box, so the anchor change is in its scope), and test_render_export.py

There is no artifact to hand over: the aim box is transparent and the badge is untouched, so nothing about the change is visible in a shot. This PR's own CI runs the everyday suite only — the nightly leg runs after main moves, so the two fixed cases are proven by the local --run-nightly runs above.


Automated fix for failed run

The nightly gate found `<table id=pr-scale-groups>` in pr-walkthrough scrolling
4px sideways in both schemes. The measure is not the cause: the table's columns
add up to its width exactly, and the overflow comes from the gloss mark's aim
box. That box is absolutely positioned and centred on the badge, and an
absolutely positioned box is outside layout but still inside its ancestors'
scrollable overflow — so when the badge lands against a cell's inline edge, the
half of the box that hangs past it makes the table scrollable over a target
nothing draws. Widening the badge to a circular info mark moved it far enough
along that line for the gate to see it.

Anchor the box to the badge's inline end instead of straddling it. It still
covers the badge whole and still reaches back over the tail of the phrase it
belongs to, which the rule already treats as free; overflow toward the inline
start is not scrollable, so nothing beyond the edge is left to scroll to. A
gloss ending a shrink-to-fit cell now stands as the regression case.

Also read the fleet roster's link at the name the roster now says: the `§`
prefix landed with one call site updated, and the nested-command boundary case
still asked for the bare worker name.
max-sixty pushed a commit that referenced this pull request Sep 3, 2026
## Problem

The nightly leg of `ci` failed on [run
33735071949](https://github.com/max-sixty/leaf/actions/runs/33735071949)
(`a57ae29`) with seven cases. Six are already owned by open PRs:
`test_a_widgets_label_takes_a_comment_inside_the_control_it_labels`,
`test_a_closed_leaf_clears_itself_off_the_tray` and
`test_the_leaves_tray_takes_the_keyboard` by #236; the ring walk by
#239's `ship-review` precondition standing ahead of #240's
`lf-shotframe` fault; and both of
`test_page_fixture_renders[pr-walkthrough]` (the 4px sideways scroll on
`pr-scale-groups`) and
`test_nested_command_projections_stop_at_their_own_boundary` (`§
inner-worker`) by #243.

The seventh is new with `a57ae29` and nobody's yet:

```
FAILED tests/test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules
AssertionError: the document-level class surface changed: widen the shared vocabulary on purpose
  Extra items in the left set:
  'lf-workspace'
```

#242 wrote the open workspace's tint as `.lf-btn.on,
.lf-btn.lf-workspace[aria-expanded="true"]` in `chrome-style.js`, at
document level. `lf-workspace` is worn by three controls and all three
are the chrome's own — the Threads toggle built at
[`leaf.js:817`](https://github.com/max-sixty/leaf/blob/064e67d5/skills/leaf/assets/leaf.js#L817),
and All leaves and Asks, which `trayIs` marks at
[`trays.js:194`](https://github.com/max-sixty/leaf/blob/064e67d5/skills/leaf/assets/runtime/trays.js#L194).
Every one of them is inside `chromeRoot`, the `.lf-chrome` container the
private stylesheet is scoped to. So the name reached document level
without being shared vocabulary, which is the seam the pinned set exists
to catch — the same one #152 answered for the keycap rules.

## Solution

Move the selector into the `@scope (.lf-chrome)` block, beside
`.lf-banner-more[data-lf-news]`, which paints the same accent face for
the same kind of banner state. `.lf-btn.on` keeps its document-level
rule, unchanged and now on its own: `on` is worn out in the page and is
the reason that line was there before #242.

Nothing about the paint moves. Specificity is unchanged, and the one
rule that could contend — `.lf-banner-menu > .lf-btn { border-color:
transparent }`, for a workspace control folded into the overflow menu —
is `(0,2,0)` against this selector's `(0,3,0)` on both sides of the
move, so scope proximity never gets a say. Fixing it at the pinned set
instead would have widened the shared vocabulary by a class no widget
can wear, which is what the assertion's own message asks you not to do.

## Testing

On this branch, rebased on `fdba9e1d`:

- `uv run pytest tests` — 808 passed, 6 skipped
- `test_a_coined_class_cannot_reach_the_chromes_rules` and both
parameters of #242's
`test_workspaces_replace_each_other_and_name_the_open_one` pass
- `uv run pytest tests/test_render_conversations.py
tests/test_render_controls.py --run-nightly` — 141 passed, and the three
failures are #236's two tray cases and the ring walk, all reproducing
identically on `main`

Not vacuous: deleting the scoped rule fails the workspace test at both
500 and 1200 with the resting face (`rgb(238, 234, 222)` where the
active face is `rgb(255, 254, 251)` under `--chip`) rather than passing
by construction. `chrome-style.js` is served rather than bundled, so
there is nothing to re-vendor, and no user-visible pixel changes, so
there is no before/after shot to hand over.

---
Automated fix for [failed
run](https://github.com/max-sixty/leaf/actions/runs/33735071949)

Co-authored-by: leaf-agent <318509791+leaf-agent@users.noreply.github.com>
@max-sixty
max-sixty merged commit 315d725 into main Sep 3, 2026
3 checks passed
@max-sixty
max-sixty deleted the fix/ci-33731588086 branch September 3, 2026 10:16
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