Skip to content

Fix contents-map margin check and catalog layout shift - #1307

Merged
max-sixty merged 5 commits into
mainfrom
fix/ci-36305818409
Sep 28, 2026
Merged

max-sixty merged 5 commits into
mainfrom
fix/ci-36305818409

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

The failed main run found two published pages whose wide content appeared to overlap the contents map. The render gate counted the map's transparent resting labels as occupied margin space. It now excludes invisible boxes while still checking visible margin residents.

The same run exposed a real 40px catalog shift when Leaf loaded: the empty map-only sidebar began as a formatting context and then collapsed into the margin. The empty slot now starts in its settled block posture, and the catalog test again requires its x, y, and width to remain stable across startup.

The affected published-site cases, the catalog startup test, and the render-gate cases for visible floated and fixed residents passed locally. Other complete-suite failures from the main run are tracked by #1283; this PR addresses the margin and catalog failures.

Refs #1283.

The map keeps label boxes while its spine is at rest. Exclude invisible boxes from the render gate's margin-resident reading so wide content is checked against occupied space. The catalog test now expects its vertical movement when the map-only sidebar leaves flow, while retaining the first-paint width check.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The catalog moves upward by 40px when Leaf loads. The prior position assertion catches a real layout shift on the published page, and skills/leaf/assets/AGENTS.md says runtime mounting must leave page content in place. Keep the catalog at its first painted position by settling the map-only sidebar's initial spacing before leaf.js loads, then retain the vertical position check.

Comment thread tests/test_site.py Resolved
Give the empty map-only sidebar its settled block posture before Leaf builds the outline. Restore the catalog test's vertical position assertion; it now verifies that mounting Leaf leaves the published cards in place.
@leaf-agent leaf-agent changed the title Ignore invisible contents-map labels in margin render checks Fix contents-map margin check and catalog layout shift Sep 27, 2026
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent The first-paint fix is close, but the new selector applies to every direct aside.sidebar containing an empty, map-only lf-toc. The margin-layout contract and adjacent CSS admit only the first sidebar to the map posture; a later sidebar stays in flow, so removing its margins and formatting context before leaf.js loads changes that page's spacing and can introduce a new startup shift when the map fills. Please scope this rule to the first sidebar, as the existing posture rules do, and keep the catalog's x/y/width assertion.

This was written by Codex on behalf of max-sixty

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Scoped the prepaint rule to the first sidebar in ea62d39, matching the existing margin posture selectors. A new startup test holds leaf.js and checks that a later map-only sidebar keeps its flow formatting and margins before and after load. The catalog's x/y/width assertion remains intact. The focused startup and catalog tests passed locally; CI is running on this commit.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The new prepaint rule also matches the first map-only sidebar when the map cannot enter the margin. At a 500px viewport, data-lf-margin stays unset, so the upgraded outline remains in flow and the sidebar regains its normal margins. In a held-startup browser check, the heading after it moved down 70px; restoring the prior sidebar spacing before load reduced that movement to 46px. The rule therefore adds a 24px startup shift on a narrow page. Its prepaint condition needs to agree with whether the map will actually stand in the margin; the :empty condition alone does not establish that posture.

max-sixty pushed a commit that referenced this pull request Sep 27, 2026
The [main nightly
run](https://github.com/max-sixty/leaf/actions/runs/36322456854) timed
out in `test_a_shipped_log_replays_its_example_state` while clicking a
reaction's margin spill. The reaction target sits in the feature
gallery's “Page & layout” tab, which was hidden when the test tried to
use the control. The test now selects the tab containing each reaction
target through its visible tab control before following the reaction's
margin route. Its anchor, reaction, and replay assertions remain in
place.

The case failed locally before the change and passed afterward;
pre-commit passed on the changed file. This repairs the shipped-log
failure from that run. The other nightly failures are tracked by #1283,
with the site geometry cases addressed by #1307 and the specimen reset
case by #1314.

Refs #1283.

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 27, 2026
The [main nightly
run](https://github.com/max-sixty/leaf/actions/runs/36317643392) failed
the thread-panel gallery case after pressing Reset: the replacement
child still reported “Loading specimen…” when the test's five-second
panel check expired. The test now waits for Reset to become enabled, the
specimen's own completion signal, before checking that the panel and its
three threads returned.

The original case reproduced locally. With this change it and two
neighboring specimen cases pass. This addresses the gallery reset
failure; the remaining nightly failures are tracked in #1283, with the
published-site failures already covered by #1307 and the board import
failure fixed by #1312.

Refs #1283.

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 27, 2026
The [failed main
run](https://github.com/max-sixty/leaf/actions/runs/36344882757)
includes a chrome class test that still fails on current main. The test
expects `lf-margin-toolbar` among classes named by both the scoped
chrome sheet and the authored theme, but the current scoped sheet no
longer names it. Remove that stale exception while retaining the
computed-style comparison that checks whether scoped chrome rules reach
page content.

The targeted test failed before this edit and passed after it (`uv run
pytest
tests/test_render_threads.py::test_a_coined_class_cannot_reach_the_chromes_rules
-q -n0`). The run's other nightly failures span separate boundaries;
#1307 is handling the site margin and catalog cases, and #1283 tracks
the remaining complete-suite failures.

Refs #1283.

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 28, 2026
The [main nightly
run](https://github.com/max-sixty/leaf/actions/runs/36358626443) failed
the path-only rename browser case. Git writes the tabbed filename as a
quoted C-style path, while Pierre returns its decoded path. Leaf
compared those two forms directly and rejected an otherwise valid
four-line rename block. The widget now decodes the source paths before
comparing them with Pierre's reading; the existing browser case checks
the decoded names that the user sees.

The case failed locally before the change, then passed after it and in
18 concurrent repetitions. Pre-commit checks pass. The surrounding diff
selection passed 18 cases and still fails two thread workflow-status
cases also present in the main run; this PR does not change that
workflow. The other nightly failures remain tracked in #1283, including
published-site layout work in #1307.

Refs #1283.

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 28, 2026
The [main CI
run](https://github.com/max-sixty/leaf/actions/runs/36384672036) exposed
an ambiguous locator in the comment expansion browser test. After
switching the response action to Comment, the composer’s submit button
also has the accessible name “Suggest”; the test’s role-and-name query
then matches both buttons and stops before it can verify the response
control. This change selects that response control directly, so the test
continues to check its focus, label, and expansion behavior.

All four parameter combinations pass locally. The failing `keyboard-390`
case also passed 18 concurrent repetitions, and the full
`test_render_reactions.py` file passed (55 tests).

Refs #1283. Other nightly failures in the linked run remain tracked
there, including the separate focus failure; #1307 addresses the
published-site geometry failures.

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Sep 28, 2026
The [main nightly
run](https://github.com/max-sixty/leaf/actions/runs/36400648218) failed
the gallery Go-to hint case because its page-wide “Show after” locator
found two shots with the same accessible name. The case scrolls to
`bg-shot`; it now selects that shot's margin row for both the visibility
premise and the focused result, preserving the hint journey it tests.

The case failed locally before the change and passed afterward.
`leaf-dev flake` ran 18 concurrent copies with no failures. Other
nightly failures remain tracked in #1283; #1307 covers the
published-site layout failures.

Refs #1283.

Co-authored-by: leaf-agent <[email protected]>
@max-sixty
max-sixty merged commit 7988b2e into main Sep 28, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/ci-36305818409 branch September 28, 2026 13:56
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