Skip to content

Keep margin labels above target traces - #390

Merged
max-sixty merged 5 commits into
mainfrom
codex/fix-margin-hover-layer
Sep 7, 2026
Merged

max-sixty merged 5 commits into
mainfrom
codex/fix-margin-hover-layer

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Target tracing paints in a page-level overlay, while transient margin labels were trapped inside the rail's lower stacking context. Raise only the hovered or keyboard-focused margin item above page paint, leaving the rest of the toolbar at its normal layer.

Add a browser regression that compares the label with and without the crossing trace, so any overlay pixels painted through its opaque center fail the test.

Tested with uv run pytest tests -q (907 passed).

This was written by Codex on behalf of @max-sixty

@max-sixty
max-sixty merged commit 5b503dd into main Sep 7, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/fix-margin-hover-layer branch September 7, 2026 08:45
max-sixty added a commit that referenced this pull request Sep 7, 2026
Target tracing paints in a page-level overlay, while transient margin
labels were trapped inside the rail's lower stacking context. Raise only
the hovered or keyboard-focused margin item above page paint, leaving
the rest of the toolbar at its normal layer.

Add a browser regression that compares the label with and without the
crossing trace, so any overlay pixels painted through its opaque center
fail the test.

Tested with `uv run pytest tests -q` (907 passed).

> _This was written by Codex on behalf of @max-sixty_
max-sixty pushed a commit that referenced this pull request Sep 7, 2026
## Problem

[`ci` on
main](https://github.com/max-sixty/leaf/actions/runs/34104687695) failed
on `6d4860a3` with 13 nightly failures. Twelve of them are the
interaction gallery's contained frames taking the page's focus and its
exported copy, which #383 fixed; that landed as `6b07467f` after this
run started, and all twelve pass there unchanged. The thirteenth
survives, on `6b07467f` and on today's `51f286ae` alike.


`test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules`
fails deterministically, with `lf-living-margin` extra in the pinned
authored-theme ledger. #390 (`5b503dd7`) added `.lf-living-margin {
z-index: auto; }` inside `chrome.css`'s `@scope (.lf-chrome)` block, so
the class became one the runtime sheet names *and* the authored theme
dresses at document level — the test's `themed` category, whose ledger
did not yet name it. That PR touched `chrome.css` and
`test_render_aim.py`, so its own nightly leg ran `test_render_aim.py`'s
cases rather than this module, and its run on main was cancelled by the
next push, which is why the reading first surfaced a commit later.

## Solution

Widen the ledger, which is what the assertion asks for by name.
`lf-living-margin` belongs in it by the category's own rule: the rail is
chrome, the authored theme owns its whole document face — placement, the
hidden state, and the container widths that fold it away — and the
runtime sheet names it only to say which plane it stands on. So the
movement its document-level rule would cause on the probe element is
that deliberate face rather than a leaked scoped rule, which is exactly
what the exception exists to hold out of the collision probe.

Nothing in the product is wrong here: the adopted chrome sheet's
`z-index: auto` is the plane rule #390 wanted, and it still reaches the
rail.

## Testing

- `test_a_coined_class_cannot_reach_the_chromes_rules`: red on
`6b07467f` and on `51f286ae`, green with this change.
- The run's other twelve failures: all green on `6b07467f` with no
change, confirming they were #383's.
- `uv run pytest tests/test_render_conversations.py` on `51f286ae` — 75
passed.
- `uv run pytest tests` on `51f286ae` — 901 passed, 6 skipped.
- `uv run pre-commit run --files tests/test_render_conversations.py`.

<details><summary>The failing reading</summary>

```
FAILED tests/test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules
  - AssertionError: the authored-theme class surface changed: widen the exception on purpose
  Extra items in the left set:
  'lf-living-margin'
```

`themed` is the set of classes the runtime sheet names inside its
`@scope` block that no document-level rule of *its own* names, but that
some other sheet dresses at document level. Before `5b503dd7` the rail's
class was only ever theme.css's, so it was never scoped and never
reached this set.

</details>

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

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 7, 2026
## Problem

[`ci` on
main](https://github.com/max-sixty/leaf/actions/runs/34104687695) failed
on `6d4860a3` with 13 nightly failures. Twelve of them are the
interaction gallery's contained frames taking the page's focus and its
exported copy, which #383 fixed; that landed as `6b07467f` after this
run started, and all twelve pass there unchanged. The thirteenth
survives, on `6b07467f` and on today's `51f286ae` alike.


`test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules`
fails deterministically, with `lf-living-margin` extra in the pinned
authored-theme ledger. #390 (`5b503dd7`) added `.lf-living-margin {
z-index: auto; }` inside `chrome.css`'s `@scope (.lf-chrome)` block, so
the class became one the runtime sheet names *and* the authored theme
dresses at document level — the test's `themed` category, whose ledger
did not yet name it. That PR touched `chrome.css` and
`test_render_aim.py`, so its own nightly leg ran `test_render_aim.py`'s
cases rather than this module, and its run on main was cancelled by the
next push, which is why the reading first surfaced a commit later.

## Solution

Widen the ledger, which is what the assertion asks for by name.
`lf-living-margin` belongs in it by the category's own rule: the rail is
chrome, the authored theme owns its whole document face — placement, the
hidden state, and the container widths that fold it away — and the
runtime sheet names it only to say which plane it stands on. So the
movement its document-level rule would cause on the probe element is
that deliberate face rather than a leaked scoped rule, which is exactly
what the exception exists to hold out of the collision probe.

Nothing in the product is wrong here: the adopted chrome sheet's
`z-index: auto` is the plane rule #390 wanted, and it still reaches the
rail.

## Testing

- `test_a_coined_class_cannot_reach_the_chromes_rules`: red on
`6b07467f` and on `51f286ae`, green with this change.
- The run's other twelve failures: all green on `6b07467f` with no
change, confirming they were #383's.
- `uv run pytest tests/test_render_conversations.py` on `51f286ae` — 75
passed.
- `uv run pytest tests` on `51f286ae` — 901 passed, 6 skipped.
- `uv run pre-commit run --files tests/test_render_conversations.py`.

<details><summary>The failing reading</summary>

```
FAILED tests/test_render_conversations.py::test_a_coined_class_cannot_reach_the_chromes_rules
  - AssertionError: the authored-theme class surface changed: widen the exception on purpose
  Extra items in the left set:
  'lf-living-margin'
```

`themed` is the set of classes the runtime sheet names inside its
`@scope` block that no document-level rule of *its own* names, but that
some other sheet dresses at document level. Before `5b503dd7` the rail's
class was only ever theme.css's, so it was never scoped and never
reached this set.

</details>

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

Co-authored-by: leaf-agent <[email protected]>
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