Repository navigation
Keep a user-added option where the user put it, at the size its field held - #2632
Merged
Merged
Conversation
… held Two defects in the Another option field of an lf-options choose group: - In titled (card) groups the field sat on the joined cell floor (8px block inset) while the option it becomes is a card (16px), so submitting grew the row from 44px to 60px. The field now takes the card's inset, as the row form's field already took the row's, and the pre-upgrade reserve is derived from the option face and inset instead of fixed constants (the row form's 32px was 1px over its 31px row). - An agent revision moved the option a few seconds after the user added it. A pick of an added option owed a version whose markup marked it `chosen`, which forced the agent to write the option into the markup and so to choose a place for it. A pick names an element only the log holds when it picks an added option, so `page_action_unsettled` now compares the markup with the authored part of the pick and lets the next stamped version take in the rest. The add handling, the lf-options instructions and authoring-revisions now tell the agent to leave the option out of the markup; the runtime already keeps it after the authored options, in add order, across revisions. Behavior change: a stamped version that leaves a picked user-added option out of its markup now settles the pick (test_interact_session); the add event's delivered handling says to leave the option out instead of writing it in. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…k until recorded Review follow-ups to the previous commit: - The field stands on the option's own line: lf-options resolves `--lf-option-line` (a registered length, 1lh of the group), which the field's text, the pre-upgrade reserve and the Add seat all read. A card at working density inherits the page's 1.45 line, and a coarse pointer raises the field's text to the 16px entry floor; neither resizes the row on submission now. The field also takes a card's state-band height and, in an unjoined (settled) card group, the card border's room, and the Add seat centres on the field's line. - Only a standing add's option counts as the log's in a pick. An authored option a version removed still leaves the pick owed. - On the page, every action on a widget unit settles by its own record. A multiple-choice Done no longer hides a pick the markup has not recorded; in frozen thread markup the reply to the newest still answers them all. - The markup answer's handling says an added option needs no writing in. Behavior change: a Done on a multiple-choice ask stays owed until the version's markup records the pick (test_done_hands_over_a_pick_the_markup_must_still_record). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 12, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
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
added a commit
that referenced
this pull request
Oct 24, 2026
Cuts the guidance Leaf ships to agents — the skill, its references, package instructions, registry instruction strings and the text Leaf's code prints — to the claims an agent acts on. This is the agent half of the guidance cut; the maintainer half (groups A–E) lands separately. Each group was cut on its own branch, reviewed side by side against main, and is one commit here, merged onto current main with main's later changes kept. Each commit message lists what its group cut, what it kept and how each conflict with main was resolved. ## Groups Word counts are `wc -w` on main (`79af4eb2f`) and on this branch. **F — SKILL.md and the conversation loop** (11 files, 12,418 → 11,115, −10%). Drops what command `--help` already says, what delivered `handling` already says, mechanism no reader acts on (the surfaces table, Sent/Queued/Delivered, the desktop wake, Codex's queue check, the render check's JSON fields), duplicates and justification. Corrects SKILL.md step 1: running `page init` again with `--package` replaces the page's packages rather than adding one. **G — page authoring and layout** (5 references, 8,120 → 6,868, −15%; default registry x-instructions 1,810 → 1,533; kernel 116 → 104). Drops each file's route restatement, copies of other references and of registry entries, rules `page check` already reports, narration that asks nothing of the author, and hedges with no failure behind them. Moves the side-list tab summary rules and the tally rule from `lf-tab`/`lf-tally` into `page-layout.md`, "A workspace", which agents re-read when revising (queue-is-a-side-list went 0/2 → 2/2). **H — module references** (6 files, 14,420 → 12,871, −11%). Keeps every `widget-api.js` export's signature, return and usage rule; drops section lists, runtime mechanism, refusals the runtime already throws into a page error, restatements and maintainer-only build detail. module-authoring's route to module-reading.md now names icons (widget-interface-serves-the-task 1/4 → 4/4). **I — packages** (3 references and the 10 instructions files, 10,324 → 9,572, −7%; package registry instruction strings 1,444 → 875). Removes duplication between each package's instructions file and its registry entries, which `page instructions --use` concatenates, so the registry keeps markup and API facts and the instructions file keeps choice rules. Drops `--help` restatements, refusals a check reports, and playground's "Task-shaped recipes", whose shared rules now sit under "Stateful previews" and in the handoff check. Corrects `lf-playground-preset`: a control the preset doesn't set keeps its current value. **J — text Leaf's code hands agents** (delivered handling/answering clauses 1,490 → 1,237; every event case's delivery, per the snapshot, 9,076 → 7,317 words). Drops narration of what Leaf does by itself, restatements, justifications and the `invalid-registry` finding, which nothing produces. Moves the anchor-move rule from every reply clause to the `relocated-anchor` finding, and corrects `page check --help`: a plain check also runs the page's scripts and browser-judged widgets. A sixth commit repoints four references at conversation-loop.md's "Page availability and handoff", which main renamed from "Status and handoff" without updating them, and fixes packages.md's pre-#3593 path to `src/leaf/layer-registry.md`. ## Eval-backed passages kept - Answer a question you can already settle before revising the page (`parent-keeps-leaf-responsive/known-answer`, #3169). - The `leaf task plan` paragraph and example (`0ae092c32`, 1/5 → 4/4 on Claude Code). - The second `thread summarize` example (`thread-fold-without-summary-prose`). - Progress and failure replies publish nothing. - A bounded `<pre>` or table clips what runs past it, with the `data-bound` and `<details>` routes (#3347). - The touch route for hiding markers: the leaf's menu → Annotations → Hide annotations (`pin-takes-no-page-room`). - The route to a package's other audiences, such as a contract's `producer`. - A widget output's value must fit its contract, since nothing checks it; `wireInput`'s keys; `failSoft`'s `source`; a `start` that throws not running again. - The progress line before any other command, "even a read" (`first-command-says-what-comes`), and the reply's own check of the saved edit. - "An option the user added needs no writing in" on the markup clause (#2632). ## Checks - `pytest -n 3` over test_hooks, test_stop_guard, test_wait, test_receipts, test_thread_reading, test_interact_layer, interact_contract/, test_delivery, test_interact_product, test_interact_anchors, test_activity and test_product_page: 848 passed, 1 failed. The failure, `test_hooks.py::test_a_prompt_re_vendors_a_page_an_older_leaf_vendored_and_hands_over_its_input`, received a pointer instead of an inline delivery on a host at load average 30; it passes when run alone. - The six snapshots group J's strings reach were regenerated with `--regtest-reset` from the resolved code; `tests/process/website_server/test_app_server.py` passes with its snapshot unchanged. - `node --test tests/runtime/widget-api.test.mjs`, which requires every authoring export to be named in a module reference: 4 passed. - `leaf package check` on all eleven bundled packages: no findings. - `pre-commit run --files` over the 53 changed files: passed. - Every `file.md, "Heading"` and `file.md#anchor` pointer in the changed prose resolves on this tree, and pointers into files groups A–E change resolve on those branches. No removed heading is cited anywhere. - An independent review redid each group's merge file by file and checked every conflict by hand against main's additions and the group's reviewed diff. It found no lost claim; three reviewed cuts that main's rewordings had brought back (a `--attempt` sentence in `thread reply --help`, a second `module-state.md` pointer in `package-data.md`, and the `lf-motion` registry string repeating `instructions/author.md`) are reapplied in the last commit, with the command-help snapshot regenerated. Not run: the browser and journey tiers, and no evals were rerun after assembly; each group's evals ran on its own branch against its merge base. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
Two defects in an
lf-options choosegroup's "Add another option" field, reported from a live page: submitting an answer grew its row (44px → 60px in a card group), and a few seconds later the agent's revision moved the option between two authored ones.Size. In a titled (card) group the field sat on the joined cell's 8px inset while the card it becomes has 16px. The field now takes the card's inset and stands on the option's own line:
lf-optionsresolves--lf-option-line(a registered length, the group's1lh), which the field's text, the pre-upgrade reserve and the Add seat all read. That keeps the row's height at working density (cards inherit the page's 1.45 line), under a coarse pointer (the field's text rises to the 16px entry floor), and in an opened settled group (the field takes the card border's room). The empty card field is now card height at rest, and its Add seat centres on its line.Order. A pick of an added option was owed a version whose markup marked it
chosen, which forced the agent to write the option in and choose where.page_action_unsettlednow compares the markup with the authored part of a pick; the part naming a standing add's option is the log's, and the next stamped version takes it in. The add and markup handling clauses, thelf-optionsinstructions andauthoring-revisions.mdtell the agent to leave the option out of the markup. The runtime already keeps it after the authored options, in add order, across revisions.Done. On the page, each action on a widget unit now settles by its own record, so a multiple-choice Done no longer lets a version settle the answer without marking the authored picks
chosen. In frozen thread markup the reply to the newest action still answers them all.Known limit: under a finger, a multi-line answer wraps onto more lines in the field (16px, so phones don't zoom) than in the option, so a long answer still changes height on submission there.