Repository navigation
Start slightly-wide blocks at the prose's edge, at 100 columns of code - #3788
Merged
Merged
Conversation
`lf-diff` and `lf-worktree-diffs` declared no `x-space`, so on a column page a patch filled the 720px reading column: about 88 columns of code, where Markdown lines wrapped two or three times. Both now declare `wide`, so a diff takes the capped 1080px evidence width (about 136 columns; 128 inside a worktree card) wherever the window has room, and an author no longer has to remember `data-width`. `wide` rather than `available`: across the last 400 commits of three repos, 0.1% of code lines pass 133 columns, so code gains nothing from more width, while Markdown that keeps a paragraph on one source line would read as lines of 220 to 300 characters at 1920 to 2560px windows. `data-width="available"` still asks for everything on a page that wants it. `lf-worktree-diffs` declares it too because a diff inside an `lf-worktree` card stands in from the column and so is kept to the card; the collection breaks out instead and its diffs fill it. Commentary inside the card keeps the reading measure. A diff in a section or `details` breaks out; one in a list item, callout or arranged box keeps to that box, as before. Sidebar pages are unchanged, since a diff there already filled the body. The worktree-diffs example drops its own CSS that widened the column for its diffs, and the page-layout and page-authoring references name a diff among the blocks that declare their width instead of one that needs `data-width`. The stills catalogue gains the gallery's long-line patches and the worktree collection, which no state reached. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A block given `wide` (x-space or data-width) now starts at the prose's start edge and grows toward the end, up to --wide, which drops from 1080px to 840px: the width at which 100 columns of code read unwrapped in a diff, the widest code gutter Leaf draws. It grows only into the end side's free room, so where that runs short it narrows and keeps the prose's edge. `available` keeps spanning both margins about the prose's axis. The centred 1080px breakout matched neither the title's nor the prose's left edge, which the user found ugly for code needing only a little more than the column. Hanging a block's gutter into the left margin, so its text met the prose's edge, was rejected: where a block's text starts is each widget's own fact, so it would need a rule per widget. This reverses the 2026-10-16 record in layouts.css that rejected a shared left edge. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A board, a granted obligation, an authored wide section and a wide table now start at the prose's start edge at 840px rather than centring at 1080px. The undeclared widget beside the board is a code block, since a diff now declares wide. A wide table joins the table placement test in both directions and every engine. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An iframe and an lf-ask granted wide now grow past the prose's end, so the gate tests measure growth there. The frame sized wider than the prose but short of the room is now 110%, since 130% of the column passes the 840px cap and the cap keeps it on its grant. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
At 840px a four-column board scrolled its last column, as the triage example's did in a sidebar page's body. A board is a surface whose columns use what room there is, as boards in project tools fill the window, so lf-board declares `available` rather than the slightly-wide width. On a column page it now spans both margins; in a sidebar page's body it fills the body, as it did at 1080px there. The width test now reads all three kinds on one page: the board fills the room, a diff starts at the prose's edge and stops at --wide, and a code block keeps the column. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 24, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
Changing lf-board to available leaves the diagram test asserting that the board stops at --wide. On this head, that test fails with a board width of 1872px against the new 840px cap. Its board assertion and explanation need to reflect the new available behavior while retaining the diagram's natural-width and scrolling checks. I can push that mechanical test update if helpful.
…wide starts at the start edge The board now declares available, so the diagram test's control declares wide itself; the reference and the site said left and right where RTL pages mirror. Formats the test file with the repository's hook. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 24, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 24, 2026
The [main CI run](https://github.com/max-sixty/leaf/actions/runs/40072986191) failed three layout cases because their assertions still expected the old `wide` measure. #3788 changed `--wide` from 1080px to 840px and aligned wide blocks with the prose's start edge. The rail test now checks the current measure plus its page padding; the pictured-options test checks that widening gives both pictures more room without requiring the old 480px size. The fourth failure in that run, a margin marker corner assertion, was updated by #3796 and passes on current `main`. The three changed cases failed before this patch and pass after it in focused Chromium runs (`uv run pytest -q -n0` with those node IDs). The preceding main run at a550f98 passed these tests before #3788 landed. Co-authored-by: leaf-agent <[email protected]>
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.
data-width="wide"becomes one width for any block a little wider than the reading column. Such a block starts at the prose's left edge and extends right, up to 840px (--wide, down from 1080px), which shows 100 columns of code in a diff with four-digit line numbers. Where the room on its right runs short, the block narrows and keeps the prose's edge. Below the column's width it is the column, and right-to-left pages mirror all of this.availableis unchanged: it takes all the room, centred on the prose.The maintainer asked for the generally accepted treatment of slightly-wide content rather than a rule for diffs. They accepted either sharing the prose's left edge or centring with line numbers hanging in the margin. Sharing the edge depends only on the block's box, so one rule covers every kind of block. Hanging the gutter would need each widget's own text offset: 61px into a diff, about 48px into
lf-code, a table's cell padding. Tufte CSS'sfullwidthfigures and tables, Tufte-LaTeX'sfullwidthenvironment and Quarto's-rightcolumn variants all extend from the text's left edge into the right margin.lf-diffandlf-worktree-diffsdeclarex-space: wideand have no rule of their own.lf-codedeclares nothing, so an author addsdata-width="wide"for long lines.lf-boardnow declaresavailable. At 840px a four-column board scrolled its last column. On a column page a board now spans both margins, and the triage example looks as it does on main.wide: every figure, chart, image and table markedwideis now 840px from the prose's edge rather than 1080px centred, so wide tables wrap their cells sooner.examples/alert-review.htmlcaps its tabs atvar(--wide), so those tabs are narrower.page-layout.md, "Bounds and widths". Thebrowser/layouts.cssheader records the decision and the centred geometry it replaces.Checks:
pnpm run check:browserpasses.leaf-dev stills --authoredran on 26 states likely to move.