Skip to content

Stack an Ask's option cards when they don't all fit across - #3609

Merged
max-sixty merged 4 commits into
mainfrom
options-stack-vertically
Oct 22, 2026
Merged

max-sixty merged 4 commits into
mainfrom
options-stack-vertically

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

An lf-ask framing a figure lays its titled options across. It used to set as many 14rem columns as fit and wrap the rest, so four cards in the 720px reading column read as three, then one card beside empty cells. Now the cards share one row only when every option gets at least 14rem; otherwise they stack one to a row. Two and three cards still sit across the reading column; four or five stack there and sit across a wide Ask only when it holds them all; seven or more always stack.

The rule stays in CSS (packages/default/styles/options.css): each column's floor clamps between one option's share of the width and the whole width, switched by the width's shortfall from a row of 14rem cards. Checked in Chromium at 1440, 900, 700 and 390px windows, light and dark, and in Firefox at 1440 and 390. Among the shipped pages only alert-review changes, at 900px, where its three-card decisions went two plus one and now stack.

test_an_obligation_framing_a_figure_lays_its_options_across now asserts that three cards stack at 700px, where two would fit, instead of a 2+1 grid.

Inherited failure: wt merge's pre-merge run failed only tests/process/test_codex_tool.py::test_a_call_ends_before_codex_gives_up_on_it, which passes and fails alternately when rerun by node id on this branch, whose diff touches only CSS and a browser test; its file last changed in #3600.

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

max-sixty and others added 3 commits October 22, 2026 10:44
An lf-ask framing a figure lays its titled options across. It used to set
as many 14rem columns as fit and wrap the rest, so four cards in the
720px reading column read as three, then one card beside empty cells.
Now the cards share one row only when every option gets at least 14rem;
otherwise they stack one to a row. Two and three cards still sit across
the reading column; four or five stack there and sit across a wide Ask
only when it holds them all; seven or more always stack.

The rule stays in CSS: each column's floor clamps between one option's
share of the width and the whole width, switched by the width's
shortfall from a row of 14rem cards. Checked in Chromium at 1440, 900,
700 and 390px windows, light and dark, and in Firefox at 1440 and 390.
Among the shipped pages only alert-review changes, at 900px, where its
three-card decisions went two plus one and now stack.

test_an_obligation_framing_a_figure_lays_its_options_across now asserts
that three cards stack at 700px, where two would fit, instead of a 2+1
grid.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An lf-ask framing a figure lays its titled options across. It used to set
as many 14rem columns as fit and wrap the rest, so four cards in the
720px reading column read as three, then one card beside empty cells.
Now the cards share one row only when every option gets at least 14rem;
otherwise they stack one to a row. Two and three cards still sit across
the reading column; four or five stack there and sit across a wide Ask
only when it holds them all; seven or more always stack.

The rule stays in CSS: each column's floor clamps between one option's
share of the width and the whole width, switched by the width's
shortfall from a row of 14rem cards. Checked in Chromium at 1440, 900,
700 and 390px windows, light and dark, and in Firefox at 1440 and 390.
Among the shipped pages only alert-review changes, at 900px, where its
three-card decisions went two plus one and now stack.

test_an_obligation_framing_a_figure_lays_its_options_across now asserts
that three cards stack at 700px, where two would fit, instead of a 2+1
grid.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 22, 2026
@max-sixty
max-sixty merged commit cef6a5b into main Oct 22, 2026
3 checks passed
@max-sixty
max-sixty deleted the options-stack-vertically branch October 22, 2026 20:16
max-sixty added a commit that referenced this pull request Oct 30, 2026
…art (#4777)

Options that each hold pictures were hard to tell apart: in the joined
control, a 1px hairline was the only boundary between one option's
capture and the next option's title. Reviewers in three head-to-head
rounds read such groups more easily as separate cards, and the user
chose that, plus leaving side by side to the author.

**Pictured groups stand apart.** A live `choose` group whose options
hold an image, figure, SVG, table, video or a `data-lf-visual` widget
anywhere inside them draws each option as its own bordered card, 16px
apart. Groups of words stay one joined control with hairlines. Hover,
keyboard and picked faces are shared by both, so only the frame differs;
two variables, `--lf-cell-gap` and `--lf-cell-edge`, carry that
difference (`options.css`).

**The author lays cards across.** `ask.css` no longer decides from an
lf-ask's content whether its options lie across, and
`--lf-options-across` is gone. Leaf had re-decided that rule four times
in 23 days (#1724, #2634, #3609, #4517), each version suiting the pages
that prompted it and failing the next. The new boolean `across` on
`lf-options` gives the same arrangement: one row where each card gets at
least 14rem, all stacked otherwise, and always stacked at seven or more.
The row's width now counts the gaps between cards. The `lf-option`
registry entry and `authoring-on-me.md` ("On the page") say when to use
it: when each option's pictures, or the evidence above the list, still
read at a card's share of the row and the question then fits the window.

Pages that relied on the automatic layout now stack until they say
`across`. In this tree that was `alert-review.html` (three groups), the
feature gallery's question around a chart and the `thread-choice-hints`
fixture, which now say it.

Testing: two tests in `tests/browser/widgets/test_obligations.py`
changed to assert the new behavior
(`test_options_holding_pictures_stand_apart`,
`test_options_marked_across_lay_across`), and the focused option tests
pass. Stills in light, dark and phone show text-only groups measuring as
on main. The `decision-options-fit-the-window` eval, three routes whose
options hold captures, fit every option in one desktop window in 3/3
candidate runs, each of which wrote `across`, against 2/3 on main.

> _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