Skip to content

Lay an Ask's option cards across under its figure, replacing the track - #2634

Merged
max-sixty merged 9 commits into
mainfrom
ask-options-card-grid
Oct 12, 2026
Merged

max-sixty merged 9 commits into
mainfrom
ask-options-card-grid

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

An lf-ask whose heading is followed by a figure and then one option list used to float its context into a column and set the options in a 16rem sticky track beside it. When the list ran longer than the figure, as with three option cards beside a five-row table in the plain HTML comparison, the track left a column of empty space down the page.

The track is gone. Such an Ask now lays its titled option cards across under the evidence in a standard auto-fit grid: equal columns of at least 14rem, as many as fit and never more columns than options, stacking in a narrow window. In the reading column three cards fit across, so the question, its figure and every option share one 1440×900 window. An Ask widened with data-width lets its cards fill that width. The container query, floats, sticky track and their margin workarounds are deleted; bare-label rows, settled groups, print and Asks without a figure keep reading down.

Joined option groups now draw their dividers as each cell's own 1px ring under the next cell's background, which also works right to left; every joined group is 1px shorter per divider. authoring-questions.md no longer tells authors to widen the Ask for the track, two evals drop the assertion that required it, and the feature gallery's scenario and stills show the new layout.

Reviewed by an independent code reviewer and a fresh-eyes reader of before/after stills at desktop, 900px, phone and dark; focused browser tests, the macOS thread snapshots (8 of 8), the corpus and bundle checks pass on the merged tree.

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

max-sixty and others added 7 commits October 12, 2026 10:00
An Ask whose heading, figure and one option list come in that order used to
float its evidence in a column and set the options in a 16rem sticky track
beside it once the Ask was 50rem wide. The track held only while the list was
no taller than the evidence: three cards with drawings beside a five-row table
left about 800px empty beside the table at 1440px, and the reading column was
too narrow for the track, so the instructions told every such Ask to take
`data-width="wide"`.

Such an Ask now declares `--lf-options-across` on its option list, and the
joined control sets its titled options side by side under the evidence, as
many as keep each card 14rem wide (three in the reading column), stacking them
where fewer fit. No container query, float or measurement decides it: the
joined group is a wrapping flex container whose children each take a line
unless the axis gives a titled option a 14rem basis. A card left over on a
last row takes that row's room. Bare-label rows stay a list, and a settled
group, paper and a quoted group stack as before.

The joined group's hairline moves from a border on the upper cell to a shadow
each cell casts onto the cell before it, above and at its start, clipped at
the frame. A border on the upper cell could not draw the line between two
cards side by side, nor know which cards stand in the last row. The line now
takes no room, so a joined group is 1px shorter per seam, the add cell's
reserved height drops to 31px to match a row, and a row's focus ring stands
1px further in so the next cell's line does not cover it. The lift transition
moves to the standalone card, so the hairlines do not fade between palettes.

Consumers: authoring-questions.md no longer asks for the wide measure, two
evals drop the assertion that it was used, the feature gallery's scenario
becomes "options laid across" without `data-width`, and the tests read the
new geometry and hairline (the old track test is replaced by one that the
cards share a row under the figure and stack at phone width).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The states put the Ask's question at the window's top at desktop, 900px,
dark and phone widths, so a before/after pair shows whether the chart and
every option share the window.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review of the previous commit found three problems with the wrapping flex row.

- A card left over on the last row stretched across the whole row and crossed
  the card's own width conditions, so one group showed two anatomies (its
  `.facts` rail docked, or at working density its title ran inline). The
  joined group is a grid again; laid across, its titled options stand in
  `repeat(auto-fit, minmax(min(100%, 14rem), 1fr))` columns, and a card left
  over stands beside empty cells at its column's width.
- Inside an Ask granted the wide measure for its figure (alert-review's chart
  Asks), the cards stopped at the 720px column and left a strip beside them
  under the chart. The column bounds a line of text and no card's line is
  wider than its column, so a group laid across now takes its holder's width.
- The hairline cast only up and to the start, which an empty grid cell would
  leave unbounded. Each cell now rings itself with a 1px shadow and paints its
  own ground, so a later neighbour covers the ring cast on it and draws the one
  line itself, and a ring cast into an empty cell stays as that cell's edge.
  Every child paints the card ground (the user's cell did not), and RTL needs
  no variant.

The Ask now states `--lf-options-across` on itself and the group reads it from
its parent, which is what lets options.css own both the grid template and the
lifted cap. A ringed row stands above its neighbours (`z-index: 1`) instead of
insetting its ring a further pixel, which had left a gap between the ring and
the frame. The hairline test now reads each cell's position as well as its
ring, since an unpositioned cell paints under the neighbour it should draw
over; a blanket `position: relative` would have pulled the runtime's quiet word
(`.lf-quiet`) into the grid as a 16px cell. An authored width on a joined cell
holds again, so the chip test's narrow column is a `width` once more.

Tests: the across test now covers 2+1 at a 700px window with equal widths, a
group nested in a card staying one to a row, and a new test that a widened
Ask's cards span it. A stale comment about the track in test_render_pages and
the base-only id in the stills selector are gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
auto-fit collapses only a column no cell stands in, and the user's cell and
Done span every column, so alert-review's widened canary Ask (1080px) held an
empty fourth column beside its three cards. The count of options now sets each
column's floor to its share of the width.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 12, 2026
max-sixty and others added 2 commits October 12, 2026 11:04
Conflicts in options.css with #2632, resolved by keeping both: main's
--lf-option-line and its add-cell heights derived from the option line and
card inset, which already describe a joined cell with no border of its own,
and this branch's --lf-options-across, the reserve that exists only while a
cell is missing (main's unconditional ::after is dropped with it), and the
ring hairline. The ready theme.css is rebuilt from the merged source.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 7acbc0b into main Oct 12, 2026
3 checks passed
@max-sixty
max-sixty deleted the ask-options-card-grid branch October 12, 2026 18:18
max-sixty added a commit that referenced this pull request Oct 12, 2026
…ption

Since #2634 an unsettled ask's options with labelled cards are joined cells,
which declare no transition by design, so `#wait-day` read `all` and the
returning-user test failed on main whenever it was selected. The test needs
any transition the presentation guard holds back; the suggestion's lf-old
declares `padding`, which reads `none` while the guard holds.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
…port: true` (#2645)

The x-state flag that makes an agent verb's reports carry non-empty
`detail.text` was called `report: true`. Every verb that can declare it
already writes reports (`writer: "agent"`), so the name said nothing;
`text: true` names what it requires.

The rename covers the three Python readers (`registry/contract.py`'s
detail schema, the report feed in `projection.py`, the excerpt in
`history.py`), `schema.py`'s `STATE_SCHEMA`, the `ActionSpec` type, the
references and `$` docs, `docs/registry.html` (regenerated with
`leaf-dev keydocs`), the two registries that declared it (the
command-hub example's `lf-atlas-worker` and the test fixture
`lf-test-worker`), the corpus, and the `recorded-effect-payloads` eval
rubric.

Behavior change: `page check` now refuses a registry that declares
`report: true` ("'report' was unexpected"). No shipped package declared
it. The event log is unchanged, because since #2431 `state_definition`
records neither name in `meaning.state`, so this needs no protocol bump;
an older page whose own registry still says `report: true` is drift,
fixed by re-vendoring or renaming the key.

Two seeded test events carried a stale `"report": False` in
`meaning.state` that admission no longer writes; it is removed.

Touching `tests/journeys/test_render_gate.py` selected it, and it was
already failing on main: since #2634, the options under an unsettled ask
are joined cells with no transition, so its check that the arrival guard
releases package transitions read `all` on `#wait-day`. It now reads the
suggestion fold's `padding` transition instead.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 27, 2026
Widen the previous commit from captures to every figure an option holds:
a drawing, a table, a video, or a widget that draws a picture. Laid
across, drawings shrank too: on a recent page three drawings authored
300px wide stood 207px wide. So an lf-ask now lays its cards across only
for options of words under a figure before the list; options holding a
figure of their own read down, each figure at its authored size.

This reverses #2634's choice to lay pictured cards across so their
pictures compared in one row. ask.css's header records the reversal, the
feature gallery's pictured section describes the cards reading down, and
`test_options_holding_pictures_lay_across` becomes
`test_options_holding_pictures_read_down`, covering a drawing, a capture
and an `x-visual` widget in the column and in a widened group.

A runtime control inside an option, such as a nested group's Send, is
not a figure (`.lf-ui`); without that, an option holding a nested group
stopped the figure-framed cards from laying across.
max-sixty added a commit that referenced this pull request Oct 27, 2026
…d down (#4517)

An `lf-ask` whose options held a picture of their outcome laid its cards
side by side, each at least 14rem wide, so every figure shrank to its
card's share of the row, words and all. On a recent decision page, a
panel captured 580px wide stood 248px wide in one of two cards. On
another, three drawings authored 300px wide stood 207px wide. Across
nine recent pages with captures in options, four showed them at a third
to a half of their size, and the user found them too small to read.

Options holding a figure of their own now read down, each figure at the
size its author gave it. A figure here is an image, drawing, table,
video or `x-visual` widget. Cards laid across remain only for options of
words under a figure before the list, where the question, its figure and
every option still share a window. This reverses #2634's choice to lay
pictured cards across so their pictures compared in one row. The
`packages/default/styles/ask.css` header records the reversal.

- A control the runtime draws inside an option, such as a nested group's
Send, is not counted as a figure (`:not(.lf-ui *)`). Without that
exclusion, an option holding a nested group stopped figure-framed cards
from laying across.
- `test_options_holding_pictures_lay_across` becomes
`test_options_holding_pictures_read_down`. It covers a drawing, a
capture and an `x-visual` widget, in the column and in a widened group.
- The feature gallery's pictured section now describes the cards reading
down.

The selectors were checked in Chromium and Firefox: figure-framed text
options still share one row, and pictured options stack at full size. An
Astra (Codex) review found nothing.

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