Skip to content

Keep "group" for a question's group, check each group once, and keep a page tab's end room - #6284

Merged
max-sixty merged 1 commit into
mainfrom
group-wording-followup
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
group-wording-followup

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

This answers the review of #6256 (which retired lf-ask for a group the author names) that arrived after it merged. "Group" now names only the question, page check reports each question group once with everything it lacks, a thread copy keeps a figure's caption, and a playground in a short page tab keeps its actions clear of the floating panel.

What changed, by finding

  1. "Group" names the question only. Where shipped text meant the options element it now says "the lf-options" or "the options": the lf-options, lf-option, lf-shot and lf-board instructions, the $keys entries (words.visual, unit, when, answered, retired, $restated), monitoring's author and coordinator instructions, threads.md, event-batches.md, module-input.md, package-data.md, the handling text a delivery gives the agent, and two site pages. The risky one, authoring-on-me.md's Permission section, now says the pick belongs to the lf-options publish-report, not the section round it, and that the lf-options is what restated marks.
  2. The deleted ring test is back. test_a_choice_sharing_its_group_hands_its_ring_to_the_row_the_user_tabs_to uses two lf-options in one named group, where each obligation stands at its own source.
  3. Stale text. A playground always asks, so its instructions put it in its question's group, and page-layout.md's "A workspace" shows that group as the body, named by the header's heading (the form SHORT_WORKSPACE_PLAYGROUND uses). authoring-on-me.md now says aria-labelledby names the heading that asks the question, usually the group's opening one. The feature gallery, a docstring and two CSS comments stopped describing headings, a playground that is the body, and lf-ask.
  4. question_errors reports each group once. ungrouped-question fires once per widget no group holds. question-group fires once per group and lists everything it lacks: an id, a name, or both. A fieldset's finding asks for a <legend>, and any other group's asks for aria-labelledby. The codes unframed-question and question-group-id are gone.
  5. heldElsewhere drops only a question's group. It removes the innermost group round a widget that asks (state.awaits, not words.inline), which is how Python's widget_groups reads it. A <figure role="group"> round an lf-chart keeps its caption. The new runtime test fails on the old code.
  6. Nits. The discussed_by docstring now covers a name that stands outside its group. frameHolding, inFrame, framed and the header's "frame" are now groupHolding, inGroup, alreadyArrived (the function asks whether the user already sees the arrival) and "group". Python's framed_widgets became widget_groups.

The page-tab check

Dropping lf-playground's min-block-size: 0 in #6256 changed nothing the user sees. I measured a full-height workspace at 900×500, with a playground's group as a page tab's only block. On #6256's parent (with lf-ask) and on main alike, Send stood at 455–487 px once the tab set was scrolled to its end, and the floating panel covered Reset and Show instruction. The only difference was where the playground's own box ended.

The cause was the one-block tab's own min-block-size: 0 in tabs.css. It let the tab shrink below its block, so the tab's end room landed inside the window instead of after the bar. That rule is gone: the tab now keeps its block's height, the set scrolls 106 px instead of 26, and the bar stands above the panel. A pane or side list alone in a page tab measures the same as before, because each scrolls inside the height it's given. The new browser test tabs to each action and checks the panel doesn't cover it. On the old rule it fails with "Reset stands under the panel".

I didn't add a check that refuses restated on plain markup. Today that markup passes page check silently, but no real page has shown an agent writing it, and checks-and-guidance.md asks for that evidence before adding a narrow check.

Scored

The wording changes to shipped instructions were scored on nine asking cases, with Opus 5.5 as author and judge: 8 of 9 passed. The one failure, playground-choice-has-one-surface, passed its rerun on this branch, and main failed that same case beside it.

Tests

  • test_a_question_on_a_page_stands_in_a_group_its_author_names (the check test, rewritten), plus all of test_interact_product.py, test_obligations.py, test_clerk.py and test_product_page.py: 170 passed.
  • 29 browser test runs passed: the restored ring test, the new page-tab test, and tests on obligation arrival, thread choices, the stream-reply copy, page tabs, side lists, workspace end room and workspace playgrounds.
  • test_layer_contract's snapshot was reset for the new handling text, and the stop-guard test updated to match.
  • pnpm run check, which includes pnpm run test:runtime (1007 passed): passed.
  • The feature gallery and both edited site pages build through page check.

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

…a page tab's end room

Answers the review of #6256 that arrived after it merged. Each change below names
the finding it answers.

1. "Group" names the question only. Wherever shipped text meant the options
   element it now says "the lf-options" or "the options": the lf-options,
   lf-option, lf-shot and lf-board instructions, the $keys entries words.visual,
   unit, when, answered, retired and $restated, monitoring's author and
   coordinator instructions, threads.md ("Ask for a pick"), event-batches.md,
   module-input.md, package-data.md, the handling text a delivery gives the agent
   (kernel-registry.json), and docs/how-it-works.html and docs/extending.html.
   authoring-on-me.md's Permission section says the pick belongs to the
   lf-options `publish-report`, not the section round it, and that the
   lf-options is what `restated` marks. page-authoring.md says the id goes on the
   `<hgroup>`.
2. test_a_choice_sharing_its_group_hands_its_ring_to_the_row_the_user_tabs_to
   restores the ring test #6256 deleted, on two lf-options in one named group,
   where each obligation stands at its own source (obligations/place.js).
3. A playground always asks, so playground/author.md puts it in its question's
   group, and page-layout.md's "A workspace" shows the group as the body, named
   by the header's heading. authoring-on-me.md says aria-labelledby names the
   heading that asks the question, usually the group's opening one, and points
   at that form. The feature gallery and its v2, waiting_in_thread's docstring,
   playground/defaults.css and options.css stop describing a section opened by
   a heading, a framing heading, a playground that is the body, and an lf-ask.
4. question_errors reports `ungrouped-question` once for each widget no group
   holds, and `question-group` once for each group, saying everything it lacks:
   an id, a name, or both. A fieldset's finding asks for a `<legend>`, any other
   group's for aria-labelledby. `unframed-question` and `question-group-id` go.
5. heldElsewhere, the copy of a message a drawing that doesn't hold its widgets
   draws, drops only the innermost group round a widget that asks
   (`state.awaits`, not `words.inline`), as widget_groups reads it in Python. A
   figure with role="group" round an lf-chart keeps its caption. New runtime test
   in authored-messages.test.mjs; it fails on the old code.
6. discussed_by's docstring says a note on a name outside its group is about none
   of the group's obligations. composing/current-target.js and
   obligations/view.js use group words (groupHolding, inGroup, the `group`
   argument of arrivalRegion), and view.js's framed(), which asks whether the
   user already sees the arrival, is alreadyArrived. Python's framed_widgets is
   widget_groups, and the walk test about a shot in a question is renamed.

The review also asked whether dropping lf-playground's min-block-size: 0 in #6256
lets a playground alone in a page tab overflow the tab. It doesn't change what the
user sees. Measured in a full-height workspace at 900x500 with the playground's
group as a page tab's one block: on #6256's parent (with lf-ask) and on main, Send
stood at the same place (455-487 px once the tab set was scrolled to its end), and
the floating panel stood over Reset and Show instruction. The dropped minimum moved
only the playground's own box: its rows overflowed it before, and it overflows the
tab now. Both came from the one-block tab's min-block-size: 0, which let the tab
shrink below its block, so the tab's end room sat inside the window rather than
after the bar. That rule goes: the tab keeps its block's height, the set scrolls
106 px rather than 26, and the bar stands above the panel. A pane or a side list
alone in a page tab measured the same before and after, since each holds the
height it is given and scrolls inside. A new browser test reaches each action by
Tab clear of the panel, and fails on the old rule ("Reset stands under the panel").

Not added: a check refusing `restated` on plain markup. It passes `page check`
silently today, but no real page has shown agents writing it, which
checks-and-guidance.md asks for before a narrow check.
@max-sixty
max-sixty merged commit 5eb6eea into main Nov 17, 2026
5 checks passed
@max-sixty
max-sixty deleted the group-wording-followup branch November 17, 2026 09:27
max-sixty added a commit that referenced this pull request Nov 17, 2026
…ape, and give `$marks.paint` and `$state` names of their own (#6257)

A widget's registry entry now holds every fact beside `description`,
`attributes` and `content`, with no group objects, as Max chose after a
design review of #6234. The PR also carries four smaller fixes from that
review.

## The flat declaration

Each fact keeps its own shape and loses only its group: `state.verbs` is
`verbs`, `data.inputs` is `inputs`, `author.example` is `example`,
`words.word` is `word`. `lf-options` on `main` and here:

```json
"lf-options": { "description": …, "attributes": …, "content": "members",
  "state": { "awaits": …, "verbs": … }, "author": { "instructions": …, "example": … } }

"lf-options": { "description": …, "attributes": …, "content": "members",
  "awaits": …, "verbs": …, "instructions": …, "example": … }
```

The 29 fact names are all distinct (`encloses` left with `lf-ask` in
#6256), and none is `description`, `attributes` or `content`. Readers
use plain property access (`entry.get("verbs")`, `entry.verbs`), so
`declared_fact`, `declaredFact`, `FACT_GROUPS`, the group-path joins in
`DECLARATION_KEYS` and the `_facts` helper are gone. `$marks` is keyed
by fact name. The `{when}` form, and the import-time refusal of it on a
fact that isn't a mark, read flat names.

The needs table and its `needs-fact` finding are gone too. The
declaration schema now says it with `dependentRequired`: `retired-when`
needs `owners`, and `shows` needs `owners` and `refers`. The refusal
reads:

```text
main:  registry.json: <lf-old> state.retired-when needs markup.owners
here:  registry.json: <lf-old> is not a valid declaration ($keys): 'owners' is a dependency of 'retired-when'
```

**A declaration refusal names where it points.** `invalid-declaration`
adds the path the schema's words leave out, and findings that name a
fact by its key mark it as code:

```text
main:  <lf-activity> is not a valid declaration ($keys): 'top' is not one of ['start', 'end']
here:  <lf-activity> is not a valid declaration ($keys) at `bound`: 'top' is not one of ['start', 'end']
main:  <lf-log> is not a valid declaration ($keys): Additional properties are not allowed ('bound' was unexpected)
here:  <lf-log> is not a valid declaration ($keys) at `views`: Additional properties are not allowed ('bound' was unexpected)
```

A fact left in its old group, a misplacement at the top, reads the same
on both: `Additional properties are not allowed ('paint' was
unexpected)`.

**Smaller shape fixes.** Every flag fact is `const: true` (`exhibit`,
`verbatim`, `shadow` and `inline` were booleans no declaration wrote
`false` to), and `exhibit` keeps its `{when}` form. `shows` names the
attribute naming its widget `reference`, as an input's `reference` does;
both are an attribute `refers` declares.

**What `{when}` conditions.** A reader asking of one occurrence reads a
fact through `holds_for`: delivery's paint, and for `exhibit` the
quoting (input, admission, compound membership). A reader asking whether
the tag declares the fact reads the declaration: for `exhibit`, whether
widgets inside put anything on On Me (`obligations.shown_in`). An
interactive sample needs the two apart, since its widgets take input and
ask nothing, so `exhibit` stays one fact and `$keys.exhibit`,
`holds_for` and the schema now say which reader asks which.

**`$keys` is flat and carries no layout.** It is keyed by fact name, and
its members run in the site reference's order. The reference's section
headings (State, Structure, Words, Paint, Data, Authoring, and Element
over `attributes` and `content`) live in `dev/leaf_dev/docs.py`
(`KEY_SECTIONS`), each placed before the key it opens on with one line
on who needs its keys declared; `docs.py` refuses a section that opens
on a key `$keys` doesn't document. Sections are h3 headings over h4 key
entries. Each entry's anchor is the fact's name (`/extending/#verbs`),
each section's `keys-<title>`.

Every registry in the tree is flattened: the bundled packages, the
examples' page-owned registries, the fixtures, and the JSON in the
references, site pages and eval cases. No dotted fact path is left
anywhere. Bare paths in prose became the fact's name in code formatting,
and a parenthetical that only repeated its word ("verbs
(`state.verbs`)") became the name alone. No page protocol bump, as with
#6234: a page's own `page/registry.json` in the grouped shape fails
`page check` with `invalid-declaration`.

## The four earlier fixes

- **A conditional fact is recognised by its shape**, `{when: {attribute:
[values]}}`, in `holds_for` and `holdsFor`. Delivery, the browser's
message paint and the condition check apply it to every mark, so the
three lists naming `exhibit` and `flow` are gone. Only a mark may take
the form, and `leaf.schema` fails at import when a fact `$marks` doesn't
name takes it.
- **Two renames.** The `$marks` member naming each mark's DOM attribute
is `attribute` (was `paint`), and the layer fact documenting a verb's
fields is `$verbs` (was `$state`), as `$awaits` documents `awaits`.
- **Two lists.** The key table in `src/leaf/passages.py`'s header and
the bullets in `aimableAt`'s comment are lists again.
- **The option guard.** The 21 live-group guards in
`packages/default/styles/options.css` are weightless,
`:not(:where([data-lf-exhibit]) *)`, as `board.css` and `draft.css`
write them. The two competitions their weight decided now say so where
they happen: a picked card's caption room takes the card rule's weight
(`:where([selected])`), and a `top: 8px` the live seat always overrode
is deleted. Every computed property of every option group and each
element and pseudo-element in it matches base on feature-gallery,
alert-review and ship-review, at rest and in nine other states, except
`top` on the key-badge spans paper hides.

## Calls to reverse

- The reference's sections are placed by the key each opens on, so a key
added to `$keys` falls in the section before it; an Element heading
covers `attributes` and `content`, which no section held.
- `exhibit` keeps both meanings in one fact; splitting asking from
quoting would add a fact for the interactive sample alone.
- `$states`, composition's stamp of each verb's writer and definition,
keeps its name: it belongs with `state_definition`, `stampedState` and
`sameStateDefinition`.
- The schema of the `verbs` map is `VERBS_SCHEMA` (was `STATE_SCHEMA`).
- The schema names each fact that takes `{when}` rather than letting any
boolean mark take it, since `verbatim` and `inline` have readers outside
delivery that would each need `holds_for` first.

## Checks

- `pnpm run check`: pass (1,006 runtime tests).
- `uv run pytest tests/model -n 4`: 3,612 passed.
- Browser, by file or node id: the three option files, obligations,
tabs, sample delivery, live samples, render gate, revision delivery,
workspaces and bounds, the message-mark, bounded-reply and
inline-suggestion tests, and the 78 browser tests whose body or fixture
the flattening changed: 373 passed, 4 xpassed. Two fail, and fail the
same way on a snapshot of `main`:
`test_the_state_wait_covers_a_status_that_moves_neither_log_nor_data`
(the leaf reads "Claude awaits" where the test expects "Ready") and
`test_a_tab_strip_is_named_as_the_chrome_names_its_set`.
- `tests/journeys/widgets/test_pressed_controls.py`, all 16 packages'
params: pass. Its page script had read `?.state?.verbs`, which the
optional chain hid; it reads `?.verbs` now.
- `page check` on all 55 authored sources and product documents, built
as pages: pass.
- `leaf package check --render` on the 13 bundled packages with a
registry: status 0; the 12 `keeps-first-box` advice findings (diff,
playground, timeline) are the same on base.
- A tree-wide search finds no dotted fact path. Its three matches name
other things: CodeMirror's `markup.inline` scope, a message event's
`event.data.height`, and the Python call `words.says(event)`.
- Evals, Claude Code, head beside `main`, two runs each:
`package-text-widget-keeps-the-measure`, `recorded-effect-payloads` and
`widget-checked-before-handoff` pass 6 of 6 on each arm, $3.06 for the
authors. In the two cases whose answers write declarations, every head
answer writes the flat shape (`verbatim` and `verbs` beside
`attributes`, no group object) and every base answer the grouped one;
`widget-checked-before-handoff` answers write none.
- Independent Codex reviews of each round found no issues; the schema
and independent reviews' findings are folded in.
- After the review fixes: `tests/model` 3,614 passed, `pnpm run check`
passed, `page check` on seven sources with their own registries or the
reference passed, `package check --render` on default, playground, diff
and reading unchanged, and the board, sample and message-mark browser
tests passed.
- The option-guard proof, the `{when}` import check and the earlier
rounds' checks are in the commits.

- After merging `main` through #6284 (#6256 retired `lf-ask` and
`encloses`): `pnpm run check` passed (1,007 runtime tests),
`tests/model` 3,615 passed, the obligation, option, sample,
pressed-controls and message-mark browser tests and the browser tests
#6284 changed passed, and `page check` on seven sources and `package
check --render packages/default` passed. Everything `main` added is
flat, including a new runtime test's fixture, and no dotted fact path is
left.

Not run: the rest of `tests/browser`, the journeys tier, Codex evals,
Firefox.

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