Skip to content

Keep a question's words on the column beside the wider blocks it holds - #5566

Merged
max-sixty merged 8 commits into
mainfrom
page-width-diagnosis
Nov 5, 2026
Merged

max-sixty merged 8 commits into
mainfrom
page-width-diagnosis

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

On a column page, an lf-ask with data-width="available" widened to the window, and its words kept the reading measure from that box's start edge. On the Panel threads page in Firefox at 1728px, each question's heading, premise and options stood at 24–744 while the rest of the page stood at 504–1224, its ? marker sat at the window's right edge, and its lf-shot centred a 755px capture with Before and After 1680px apart. The agent had followed authoring-on-me.md, which told it to widen the ask, and the render check's contained-space advice, which led it to wrap the questions in layout-flow and so released the width.

Questions. An lf-ask frames nothing, so it now takes no width of its own. It declares x-flow, a new registry key painted as data-lf-flow, and browser/layouts.css treats it as it treats a layout-flow wrapper: its words and options keep the column, a child marked data-width breaks out, and the question's box grows round that block so its ring encloses it. Delivery ignores data-width on a flow. Breakouts apply only under a Layout that states a measure, so a wide block in a workspace question fills its region as other workspace blocks do. A flow holding a block that asks for room gives up the measure a question otherwise keeps, in a column and in a sidebar page's wider body alike, so ask.css names no Layout class. The margin marker of a question holding a wide block stands by its words.

Screenshots. lf-shot sizes its toolbar to the frames it labels, so Before and After stand on the pictures' edges in every view and Pair's frames stand together. The stage's stable scrollbar gutter takes both edges, so a classic scrollbar on Linux or Windows leaves the frames centred under the labels. Slider and Pixels now fit the screen's height below the toolbar, as a stacked Pair already did, so the reader sees the whole comparison while sliding: the Panel threads question's capture draws at 651×939 in a 999px window instead of running 150px past it. A long full-page capture shows small at Fit, and 100% shows it at its own size.

Other wrappers. A section or details with data-width="available" moves its words off the column the same way, on main as here, and 7 wrappers on 4 recent column pages do it. Leaf can't hold their words without changing what data-width means on a div or figure that wants its contents wide, so page check --render now advises words-off-column for any wrapper whose words leave the column's start edge, with the fix: data-width on the block inside, layout-flow on the wrapper.

Instructions. authoring-on-me.md, page-layout.md, the playground's author instructions and registry example, and the examples now put data-width on the block that needs the room. In the option-captures-line-up eval, main's runs put the width on the lf-ask in 3 of 3 and this branch's on the lf-options in 3 of 3; all six pass the case's rubric. authoring-evidence.md says Fit bounds Slider and Pixels by the screen's height.

Tests cover a question's words beside a wider block (directly and through a wrapper), a workspace question, the new advice, a narrow lf-shot's labels beside a classic scrollbar, and Slider fitting a 1000×300 window, which takes 362px on main. test_an_obligation_spanning_its_block_is_a_breakout fails the same way on main's code: <div id=sized> draws no clipped-out.

This was written by Claude Code on behalf of max-sixty

On the Panel threads page every question carried data-width="available",
as authoring-on-me.md told the agent to write when a question's evidence
needs room. That widened the whole lf-ask to the window. Its words keep
the reading measure from the box's start edge, so at a 1728px window the
heading, premise and options stood at 24-744 while the rest of the page
stood at 504-1224, the ? marker sat at the window's right edge, and an
lf-shot centred its 755px capture with Before and After 1680px apart.
The render check's contained-space advice had led the agent to add
layout-flow around the questions, which released the width, and no
check reported the result.

An lf-ask frames nothing, so it now takes no width of its own. It
declares x-flow, a new registry key painted as data-lf-flow, and the
Layouts treat it as they treat a layout-flow wrapper: its words and
options keep the column, a block in it marked data-width breaks out, and
its box grows round that block so its ring encloses it. Delivery ignores
data-width on a flow. Breakouts now apply only under a Layout that
states a measure, so a wide block in a workspace question fills its
region as other workspace blocks do. The margin marker of a question
holding a wide block stands by its words instead of past the block.

lf-shot sizes its toolbar to the frames it labels, so Before and After
stand on the pictures' edges in each view, and the view controls keep
their place as Pair widens the frames.

authoring-on-me.md, page-layout.md, the playground's author instructions
and its registry example now put data-width on the block that needs the
room, and the examples follow. In option-captures-line-up, main's runs
put the width on the lf-ask in 3 of 3 runs and this branch's on the
lf-options in 3 of 3. The contained-space advice now leads with
layout-flow and offers data-width only for a frame. leaf-dev probe's
help says a source takes /media/ from a media/ beside it.

Tests: the obligation and render-gate width tests now expect a question
to take its width from what it holds; new tests cover a question's words
beside a wider block, a workspace question and a narrow lf-shot.
A section or details with data-width="available" moves its heading and
paragraphs off the column exactly as an lf-ask did, on main and with the
previous commit: at a 1728px window they stood at 24-744 beside prose at
504-1224. The render check excused them, since it measures what a wide
box holds against that box. Real pages do this: 7 wrappers on 4 column
pages, read from their markup. Leaf can't hold their words itself without
changing what data-width means on them, since a div or figure with it
wants its contents wide, so the render check now reports the property for
every wrapper, as advice, with the fix. A widget arranges its own contents
and a caption belongs to its figure, so neither counts.

A flow's box also grew to both margins for a block a plain wrapper kept in
the column, because its reach counted any descendant declaring a width.
For an lf-ask that put its ring around empty margins, so a flow now counts
only its own children and those of the flows in it.
In flow, `lf-shot` bounded only a stacked Pair by the screen's room below
its toolbar; Slider and Pixels fit the column's width alone. On the Panel
threads page in Firefox at 1728x999, the first question's capture drew
1089px tall, so the reader could not see the whole comparison while
sliding. A single frame now takes the same bound as stacked frames, and
that capture draws at 651x939, with toolbar and frame filling the 999px
window. Pair beside Pair still keeps the width fit, since scrolling keeps
side-by-side frames aligned.

A long full-page capture now shows small at Fit; 100% shows it at its own
size, and `authoring-evidence.md` tells authors that Fit bounds Slider and
Pixels by the screen's height.

Test: the shot controls test asserts that Slider's toolbar and frame fit a
1000x300 window; on main they took 362px.
# Conflicts:
#	packages/playground/registry.json

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two of the PR's selected tests fail on Linux Chromium in this checkout. Both come from this change, and each has a one-line fix. With both fixes applied locally, test_declared_space_names_containing_holders_as_advice, test_a_widened_wrapper_that_takes_its_words_off_the_column_is_advised, test_a_shot_narrower_than_its_box_keeps_its_labels_on_its_frames and test_a_shot_fits_both_wide_captures_and_retains_actual_scale_across_views all pass.

lf-shot labels sit half a scrollbar off their frames on classic-scrollbar platforms. The toolbar is now centred on the shot's full width. The frames are centred in .lf-shotstage, and scrollbar-gutter: stable reserves a gutter only on that box's inline-end side. On Linux and Windows the gutter is 15px, so the frames sit 7.5px left of the toolbar. The new test_a_shot_narrower_than_its_box_keeps_its_labels_on_its_frames fails on every run here with the Before label at x=499 and the frame at 491.5. The fix is outside the diff: in the .lf-shotstage rule in packages/default/styles/shot.css, change scrollbar-gutter: stable; to scrollbar-gutter: stable both-edges;. That reserves the gutter on both sides, so the frames stay on the same axis as the toolbar, and the stage keeps the same width at Fit and 100%, which the existing comment says the gutter is for.

Comment thread src/leaf/render-checks/layout.js Resolved
…t's frames beside a classic scrollbar

The render check returned early for any block in breakout position, so a
block in a layout-flow that a plain wrapper keeps in the column, which
the flow rule still marks as breaking out, lost its contained-space
advice. Only a block that breaks out and takes its words off the column
now returns early; every other block takes main's walk.

The shot's stage reserved a stable scrollbar gutter on its end edge
alone, so on Linux and Windows, where a scrollbar takes 15px, the frames
stood 7.5px left of the toolbar's centred labels. The gutter now takes
both edges. The narrow-shot test runs with a classic scrollbar, where it
failed with the Before label at 499 and the frame at 491.5.
…k.css

ask.css lifted a question's measure for a question holding a breakout by
naming `.layout-flow` in its selector, so a widget's sheet read a Layout
class outside layouts.css, which
`test_layout_style_and_widgets_never_read_each_other` forbids. The flow
reach rule, which already knows when a flow holds a block that reaches,
now sets `max-inline-size: none` there; Layouts sit above package styles,
so it wins over ask.css's measure, which goes back to main's plain rule.
leaf-agent
leaf-agent previously approved these changes Nov 5, 2026
2822598 lifted a question's measure only inside the column's reach rule, so
on a sidebar page's plain body, where no column flow surrounds the question,
the question kept 720px and its wide table could take no more:
test_an_obligation_and_a_callout_keep_the_column_and_widen_to_what_they_hold
measured the table at 720 instead of 908. The release is now a rule of its
own on every flow, under the same condition the reach rule uses, so it holds
wherever a question stands, and the reach rule no longer carries it.
@max-sixty
max-sixty merged commit 744d90c into main Nov 5, 2026
4 of 5 checks passed
@max-sixty
max-sixty deleted the page-width-diagnosis branch November 5, 2026 23:29
leaf-agent added a commit that referenced this pull request Nov 7, 2026
…5671)

#5566 made an `lf-ask` take no width of its own. It ignores `data-width`
on a question, lets a block inside the question that is marked
`data-width` break out, and grows the question's ring round that block.
Its instructions and examples moved `data-width` onto the `lf-options`.
`test_options_laid_across_take_a_widened_obligations_width` still put
the width on the `lf-ask` and expected the question to pass the 720 px
column, so it has failed on main since 744d90c (`assert 720 > 720`).

The fixture now puts `data-width="wide"` on the `lf-options` laid
across. The test, renamed
`test_options_laid_across_fill_the_wide_measure_they_ask_for`, asserts
three things: the options take more than the column (908 px at 1726 px
in the sidebar layout), the question's box encloses them, and the three
cards share one row and fill it. It still protects the same behaviour:
cards laid under the whole wide measure, not at the column beside an
empty strip. The only change is which element asks for the room. One
assertion is looser: the question no longer equals the options' width
(1472 vs 908), because #5566 lets a question that holds a wide block
give up its measure.

Locally, the old test fails on main with the issue's message. The
restated test passes, and so does
`test_options_marked_across_lay_across`, which shares the fixture.

Closes #5650 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 7, 2026
…#5551, #5552 and #5566 chose (#5685)

Ten of #5658's nightly journey cases still expected behavior that a
recent change replaced on purpose. This PR updates those tests to what
each change intended. One example page also changes: the feature gallery
had lost a face that the server would draw. Each case was bisected
locally to the first commit where it fails and checked against that
commit's parent, which passes. Each fails on main `02a1e05cb` and passes
on this branch.

| Case | Since | What changed |
| --- | --- | --- |
|
`test_render_widgets.py::test_notification_configuration_becomes_a_commentable_local_artifact`
| #5508 | Every playground choice now has its own id. The receipt's
comment anchors on the Banner choice that holds it (`format-banner`),
not on `notification-simulator`. |
|
`test_render_gate.py::test_every_table_the_theme_sets_honestly_passes_the_gate`
| #5566 | The fixture's available `<figure>` holds a question whose
words start at the figure's edge, and #5566's new `words-off-column`
advice flags exactly that. The journey checks tables, so it now leaves
that question out. The browser test that measures the question's table
inside the figure keeps it. |
|
`test_render_margin.py::test_margin_card_holds_its_top_as_a_turn_arrives_and_as_a_reply_wraps`
| #5537 | Beside its passage, a card now holds its reply's foot while
the user writes in it. The test now steps onto the thread with Escape
before reading, as #5537's own tests do. It checks that each wrap, a
long draft and the answer after a send grow the card upward. It is
renamed `…holds_its_top_while_read_and_its_reply_while_written`. |
|
`test_thread_response_continuity.py::…keep_the_first_line[margin-delete-desktop]`
| #5537 | Same rule: Backspace in a margin card's reply keeps the
reply's foot still, so the margin case reads the foot. The seat cases
are unchanged. |
|
`navigation/test_key_surfaces.py::test_user_news_interrupts_and_then_restores_background_news`
| #5448 | The panel's key now stands with Comment after the field's
words, so a notice reads `Agent replied — open Threads · Comment… c`. |
| `test_page_holds_still.py::…[message-reply-below-chromium]`,
`[…-firefox]` | #5551 | A thread's reply box under the floating panel
now counts as unseen. A clicked message therefore stays still as an
answer joins below it, the strict xfail passed, and its entries leave
`MOVES_ON_MAIN`. |
|
`test_render_navigation.py::test_the_feature_gallery_exercises_its_core_journeys`
| #5552 | `progressFace` reads a workflow's `at_work`, which the server
stamps on every served workflow. The gallery's margin atlas builds its
sample workflows from a stage alone, so its Working samples had lost the
working face. The sample now carries `at_work` as the server would stamp
it
(`examples/developer/feature-gallery.page/widgets/lf-margin-entry-gallery.js`).
|

The other #5658 cases are handled elsewhere. #5684 (merged) fixed the
fixture-resource case. A separate PR widens `--wide` for #5611's diff
gutter. The `message-edit-above` cases of `test_page_holds_still.py`
come from a runtime regression in #5551, which has its own cause issue.

Refs #5658 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 14, 2026
A playground exploration of comment marks reached Max in the reading
column instead of the window's width. Its `lf-playground` carried
`data-width="available"` inside an `lf-ask`, as the playground guide
says since #5566, but the session serving it ran a checkout from before
#5566, where only a width on the ask widened the playground: in Firefox
at 1728px it stood 720px wide there and 1680px on main. That session
then moved the width onto the ask, which main's delivery drops without a
word because `lf-ask` declares `x-flow`. Neither `page check` nor its
render check reported it.

**Check.** `page check` now advises `inert-allocation` for an authored
`data-width`, `data-bound` or `data-height` that means nothing where it
stands. `registry.kernel.authored_inert` decides this for delivery and
the check alike, and delivery paints what it painted before. Across the
337 page directories on this machine it fires on 36 asks and nowhere
else.

**Guidance.** `/developing-leaf`, "Author or revise a page", now says to
serve a page built in another checkout with that checkout's launcher and
judge it against its instructions. In a replay of the serving decision,
0 of 6 runs did so on the current text and 6 of 6 on the new.

Max asked why the page came out thin; leaf-agent approved. Test:
`test_check_advises_an_allocation_leaf_ignores_where_it_stands`, which
also passes on current main merged in.

> _This was written by Claude Code on behalf of max-sixty_
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