Repository navigation
Stand a sidebar page's contents outline open beside the body - #3932
Merged
Merged
Conversation
A sidebar page's `aside` is the room the page gives to navigation, and `page-authoring.md` ("Contents navigation") tells authors to put the contents outline there. The outline still drew as a folded disclosure, so pr-walkthrough at 1440×900 and 1024×768 showed "▸ ON THIS PAGE" alone at the top of an empty third of the window, beside an eleven-screen review, on every screen of it.
## The fix
The Layout (`layouts.css`) now sets `--lf-sidebar-slot: beside` on a sidebar page's `aside` while it stands beside the body (`data-lf-beside`, which prepaint already writes). A column's margin sidebar already says `--lf-sidebar-slot: margin` the same way. `lf-toc` (`toc.css`) reads the token. Beside the body, it hides its toggle, shows its "On this page" label, and draws the section in view in ink rather than muted. With the summary hidden, `lf-toc.js` already opens the disclosure. When the track stacks above the body, the toggle comes back and the disclosure returns to the reader's own open or closed choice.
The widget reads only a token describing its box (`browser/AGENTS.md`, "A Layout, a style and a widget never read one another"), so a hand-written page can opt in with the same token.
## Evidence
`leaf-dev stills origin/main --state walkthrough-wide --state walkthrough-body-short`. `walkthrough-wide` is a new state: pr-walkthrough at the desktop viewport, two windows down. The base shows the folded toggle beside the body. The head shows the nine section links with "Change surface", the section in view, in ink. `walkthrough-body-short` (900×600) shows the same change.
## Checks
- New `test_a_sidebar_page_track_beside_the_body_stands_its_outline_open`: the outline is open with its summary hidden beside the body at 1440, and folded again at 700. It fails with the token removed.
- `test_pr_walkthrough_navigation_starts_the_review_at_every_width`, `test_page_fixture_renders[pr-walkthrough]`, `test_layout_style_and_widgets_never_read_each_other`, the rest of `test_render_toc_disclosure.py`, `pnpm run test:runtime`, and pre-commit on the changed files all pass.
- `wt refresh-previews` recaptured the catalog stills; pr-walkthrough's first screen now shows the outline. The "Keep a full-height workspace's panel room below its footer" PR also moves the `leaf-assets.json` pin, for alert-review's preview. Whichever of the two lands second takes the later `revision` and runs `wt refresh-previews` again from the merged tree (`dev/leaf_dev/leaf_assets.py`), since each publish carries the other's preview as main had it.
> _This was written by Claude Code on behalf of max-sixty_
leaf-agent
previously approved these changes
Oct 25, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 25, 2026
The track body sticks and scrolls (#3918), so it clips: the open outline's last link, and command-hub's and live-progress's summaries, lost the edge of their focus ring. It now keeps the ring's room inside its box, with its top margin giving the room back so its first line stays level with the body's. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 25, 2026
# Conflicts: # browser/layouts.css
leaf-agent
previously approved these changes
Oct 25, 2026
# Conflicts: # README.md # leaf-assets.json
leaf-agent
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A sidebar page's
asideis the room the page gives to navigation, andpage-authoring.md("Contents navigation") tells authors to put the contents outline there. The outline still drew as a folded disclosure, so pr-walkthrough at 1440×900 and 1024×768 showed "▸ ON THIS PAGE" alone at the top of an empty third of the window, beside an eleven-screen review, on every screen of it.The fix
The Layout (
layouts.css) now sets--lf-sidebar-slot: besideon a sidebar page'sasidewhile it stands beside the body (data-lf-beside, which prepaint already writes). A column's margin sidebar already says--lf-sidebar-slot: marginthe same way.lf-toc(toc.css) reads the token. Beside the body, it hides its toggle, shows its "On this page" label, and draws the section in view in ink rather than muted. With the summary hidden,lf-toc.jsalready opens the disclosure. When the track stacks above the body, the toggle comes back and the disclosure returns to the reader's own open or closed choice.The widget reads only a token describing its box (
browser/AGENTS.md, "A Layout, a style and a widget never read one another"), so a hand-written page can opt in with the same token.The open outline's last link sits at the foot of the track's scrolling body, so its focus ring relies on the ring room #3939 gave that body; this change adds no rule of its own for it.
Evidence
leaf-dev stills origin/main --state walkthrough-wide --state walkthrough-body-short.walkthrough-wideis a new state: pr-walkthrough at the desktop viewport, two windows down. The base shows the folded toggle beside the body. The head shows the nine section links with "Change surface", the section in view, in ink.walkthrough-body-short(900×600) shows the same change.Checks
test_a_sidebar_page_track_beside_the_body_stands_its_outline_open: the outline is open with its summary hidden beside the body at 1440, and folded again at 700. It fails with the token removed.test_each_sampled_focus_ring_is_shown_whole_in_its_surfacepasses, the open outline's last link included.test_a_sidebar_pages_track_stays_in_view_only_beside_the_body,test_a_revision_keeps_the_readers_place_in_a_sidebar_tracks_body,test_a_sidebar_pages_items_trim_their_words_at_both_edges,test_browser_and_file_captures_agree_on_a_sidebar_tracks_blocks),test_pr_walkthrough_navigation_starts_the_review_at_every_width,test_layout_style_and_widgets_never_read_each_other,test_page_fixture_rendersfor command-hub, live-progress, triage-board and pr-walkthrough, andpnpm run test:runtimepass on the merged tree.leaf-assetsrevisions, which holds both branches' stills.wt refresh-previewsrun again from this branch merged with main, Start an option's paragraph on its title's next line #3936 and Run every tier on macOS nightly, and fix the tests main and macOS fail #3939 included, reproduced every pinned still byte for byte, so the pin did not move.