Skip to content

Wait for the disclosure to hold the thread before pressing it open - #25

Merged
max-sixty merged 4 commits into
mainfrom
fix/ci-32540635010
Aug 24, 2026
Merged

max-sixty merged 4 commits into
mainfrom
fix/ci-32540635010

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Aug 22, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

ci went red on main at fa59396 (run 32540635010, attempt 1, 921 passed / 1 failed) on test_a_key_on_screen_is_a_key_that_works, timing out for 30s trying to click the first thread inside the resolved disclosure. The commit itself touches an example, SKILL.md, the bundled registry and one new unrelated test — nothing on this path. (That run was rerun, and attempt 2 failed on a different pair — the z-press shape #24 is open against. The two attempts are disjoint, so neither PR alone turns main green.)

The test resolves two threads and takes Resolved (2) on the summary as its cue to press the disclosure open. That count is the log's: renderThreads writes it the frame the resolve settles, while the thread itself only reaches the disclosure when its 220ms fold is over ("Counted off the log, listed off the page", leaf.js). So the press lands inside the fold, on a list still moving under the pointer — which is what the failing call log reports on the very next action, element is not stable twice before it settles into element is not visible for the remaining 27 seconds. It is the shape tests/CLAUDE.md names in "A state the page passes through is not a state to poll for".

Solution

Wait for the fact the fold states — the disclosure listing the threads it now holds — before pressing the summary, at the three sites that press without it. That is the pattern every other resolve test in the file already follows (e.g. test_resolving_an_early_thread_renumbers_the_rest_in_place, which asserts .lf-details .lf-thread[data-id=…] before its own summary press). Nothing is relaxed: each site gains an assertion.

Two of the three took the count instead. The third, test_a_resolved_thread_can_be_reopened, took round_trip — a tighter window rather than a safer one, since foldOut is driven from the reconcile that trip comes back on, so the trip lands as the fold begins and the press goes out into the whole 220ms. It had been surviving on Playwright's own stability retry, which is exactly the thin part the failing run's element is not stable names.

test_a_late_reply_to_a_resolved_thread_stays_above_its_reopen_footer presses the summary without the wait too and is deliberately left alone: its resolve is in the log before open_page, so the thread is never drawn open and foldOut returns with no fold to race.

Testing

uv run pytest tests/test_render.py -q --run-nightly — 479 passed on this branch; pre-commit clean on the changed file. The whole suite (uv run pytest tests --run-nightly, 922 passed) is green at the failing commit locally too, on the same 4-CPU / 8-worker shape CI uses, so the window is narrow — see the note below on what is verified and what is inferred.

Evidence, and what is inferred

Verified. The gap is real and measured at each site. Putting an assertion's own bug back prints Playwright's re-ask trail at exactly the point the old code pressed. In test_a_key_on_screen_is_a_key_that_works (to_have_count(3)):

- waiting for locator(".lf-details .lf-thread")
   4 × locator resolved to 1 element
     - unexpected value "1"
  10 × locator resolved to 2 elements
     - unexpected value "2"

Four re-asks with one thread listed: when the loop's last expect returned, the second thread was still folding, and the summary press went out into that window. In test_a_resolved_thread_can_be_reopened (to_have_count(2)), the same trail, one step earlier:

   4 × locator resolved to 0 elements
     - unexpected value "0"
  10 × locator resolved to 1 element
     - unexpected value "1"

Four re-asks with the disclosure holding nothing at all — the fold had not finished when round_trip returned, so that press was the least protected of the three.

The failing run's own call log agrees from the other side — the element was visible-but-moving (element is not stable) for the first ~120ms after the press.

Inferred. What turned "moving" into "invisible for 27s" is not proven. A stale handle is ruled out: a replaced node makes Playwright log element was detached from the DOM, retrying (checked against a standalone probe), and the CI log carries no such line, so the same node stayed connected and lost its box — i.e. the disclosure ended up closed after a press that should have opened it. Nothing in the runtime ever writes open = false, so this reads as the press being delivered twice or lost against a moving target, which is the risk of pressing mid-animation rather than a runtime fault.

Not reproduced. ~160 targeted repetitions of the sequence, including CPU throttling at 4/6/10/20× via CDP and a full-machine load, all passed. Recent main history shows a rotating cast of different browser tests failing per run, the contention signature running-tend names — so this fix removes a real window rather than one proven to be the whole story of that run.


Automated fix for failed run

The resolved count is written off the log the frame a resolve settles, while the
thread reaches the disclosure only when its 220ms fold is over. Two tests took
the count as their cue and pressed the summary inside that window, on a list
still moving under the pointer; every other resolve test here waits for the
disclosure to list the thread first. Wait for the list.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The diagnosis holds up against the runtime: renderThreads writes Resolved (${resolved.length}) straight off the log while the same reconcile filters the listed children with !folding.has(t.root.id), so the count genuinely lands a fold ahead of the list, and FOLD_MS = 220 is the gap. Both added assertions consume the fold's own last step — the disclosure holding the thread — which is the fact tests/CLAUDE.md asks for under "A wait consumes a fact the system states", and neither relaxes anything: each site gains an assertion it did not have. to_have_count(2) is reachable in both places because a thread only reaches resolvedBox once folding has dropped it.

One thing the sweep turns up. The commit message says "every other resolve test here waits for the disclosure to list the thread first" — test_a_resolved_thread_can_be_reopened is the exception, and it has the same shape with a tighter window:

page.locator(f'.lf-thread[data-id="{comment}"] .lf-resolve').click()
round_trip(page)
page.locator(".lf-details summary").click()
page.locator(f'.lf-details .lf-thread[data-id="{comment}"] .lf-reopen').click()

round_trip waits for the page's sends to come back, and foldOut is driven from that reconcile — so it returns roughly when the fold starts, and the summary press goes out into the whole 220ms rather than into its tail. It has been surviving on Playwright's own stability retry, which is exactly what the failing run's element is not stable shows to be the thin part. The fix is the pattern the two siblings already use — expect(page.locator(f'.lf-details .lf-thread[data-id="{comment}"]')).to_have_count(1) before the summary press, the same assertion test_resolving_an_early_thread_renumbers_the_rest_in_place and the inline-conversation reopen test take. It costs nothing to satisfy there: the very next line already requires that element to exist and be visible.

test_a_late_reply_to_a_resolved_thread_stays_above_its_reopen_footer presses the summary without that wait too, but it is safe by construction — the resolve is in the log before open_page, so the thread is never drawn open and foldOut returns null with no fold to race.

Happy to push the one-line addition to this branch if you want the third site closed here rather than left for the next red run; leaving it out keeps the PR scoped to the failure it was opened for, which is also a defensible read.

Not approving — self-authored, so GitHub would reject it anyway.

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

One scoping note on the run this PR cites: 32540635010 was rerun, and the 921 passed / 1 failed in the body is attempt 1. Attempt 2 is the current one and failed differently — 2 failed, 920 passed, on test_z_walks_back_through_gestures_rather_than_toggling_one and test_a_rebuild_keeps_what_the_reader_did_inside_the_change, both the z-press shape #24 is open against. Nothing here is wrong about its own failure; the two attempts are disjoint, so this PR and #24 together cover fa59396 and neither alone turns main green. Details of attempt 2 are on #24.

`test_a_resolved_thread_can_be_reopened` presses the summary on the trip
back from the resolve, and `foldOut` is driven from that same reconcile —
so the trip lands as the fold begins rather than after it, and the press
goes out into the whole 220ms rather than into its tail. It has been
surviving on Playwright's own stability retry, which the failing run's
`element is not stable` shows to be the thin part.

It waits for the disclosure to list the thread first, the same assertion
the two sites in this branch and `test_resolving_an_early_thread_...`
already take. Measured: putting the assertion's own bug back prints four
re-asks with the disclosure holding nothing, so the window is real and
not a formality.

`test_a_late_reply_to_a_resolved_thread_stays_above_its_reopen_footer`
presses the summary without the wait too and is left alone: its `resolve`
is in the log before `open_page`, so the thread is never drawn open and
`foldOut` returns with no fold to race.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Closed the third site here rather than leaving it for the next red run — 7147c76. The review's read of it holds: round_trip is the tighter window, not the safer one, since foldOut is driven from the reconcile the trip comes back on, so the press went out into the whole 220ms rather than into its tail. Measured with the same bug-back the PR used for the other two — to_have_count(2) in place of the new assertion prints 4 × locator resolved to 0 elements before it resolves to 1, so at the moment the old code pressed, the disclosure was holding nothing at all. That is one step worse than the count-first sites, where the disclosure at least held the first thread.

test_a_late_reply_to_a_resolved_thread_stays_above_its_reopen_footer stays as it is, for the reason the review gives: its resolve is in the log before open_page, so the thread is never drawn open and there is no fold to race.

On scope — a press into a fold is one defect with three sites, so fixing two and knowing about the third would have been the split that leaves the next red run to rediscover it, not a tighter PR. The description now covers all three and the one deliberate exception.

tests/test_render.py -q --run-nightly: 479 passed at 7147c76; pre-commit clean on the file.

@max-sixty
max-sixty merged commit deb7a0b into main Aug 24, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-32540635010 branch August 24, 2026 23:32
max-sixty added a commit that referenced this pull request Sep 18, 2026
A rejected candidate now earns one line and the number that decided it,
so asking again costs a glance rather than a survey. The digest store
leaves TODO for that table: it buys disk and nothing else, 38 KB a save
against 3.28 MB. Five conditional items become one line each under what
would trigger them, the items that stay lose their narrative and keep
what constrains the work, and the header states the rule so the lists
stay this way.

Two measurements land with it. The chrome libraries are answered while
the question stays open: 12 commits since the rename across the ~500
lines of dialog and popover glue one of them would own, against 88
across the margin, the keyboard and the trays — worth reaching for where
the platform has no primitive, not as a retrofit. And #774 left `Handler`
wearing `BaseHTTPRequestHandler`'s shape over a starlette response, which
is now item #25, because a compatibility layer inside a finished cutover
is the one thing this repository does not keep.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 18, 2026
The Lit application arc between 2026-09-13 and 2026-09-17 closed #1 and #3 without
the list recording it: `semantic-state.js` is 77 lines over one publisher and
`application.js` holds no DOM reference, while `version.js` activates through one
door returning one result that `state-application.js` adopts atomically. Both leave
for git history.

The largest remaining duplication was not on the list. `scripts/browser/application.ts`
re-derives the Ask inventory, the winner resolution and each thread's `awaits_reader`
from a wire that already carries all three, roughly 750 lines that arrived in #746;
the two copies of the `when` predicate already disagree on an attribute recorded as
`null`, and nothing compares them. That inverts #4, which asked for a corpus proving
parity between the two implementations — built first it would police one that should
go — so #4 now names the deletion and the corpus follows it.

Three items are new. #25 is the Worker's second App Server client, whose reconnect
backoff is written four times and has already drifted. #26 is the generated-hint
machine that `go-to-sequence.js` and `target-chooser.js` each build. #27 is admission:
six of the nine `append_event` callers check no contract, and of the three that do,
`cmd_receipt` uses a validator `requests.py` defines itself, so the rules sit in two
homes and the gate in three against a stated boundary of validating once at the edge.

They take ids above #23 because `notes/workspace-followups.md` numbers its research
#1 to #23 and the workspace section here draws from it, so #9 and #10 were already
spoken for. The section now says where its ids come from rather than leaving the next
writer to rediscover it.

The items that stay keep their numbers and gain what the survey measured: how much of
`margin-projection.js` is already free of the DOM, what fraction of the render suite
drives no input, and the 53 capabilities `page.js` and `leaf.js` both name. #8 stops
waiting for a change to prove the need, which has happened.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 12, 2026
… connection, and choose Page Map receipts in the model (#2504)

Follow-up to #2349, from the review of the Lit survey PRs (items #25,
#26 and #27 in that review's numbering, not GitHub issues).

**#25: `said` deleted; one factory for element directives.** `said` had
one caller, which passed the constant `false`. Every other template
writes the label markers as static attributes, and that is now the only
form: thread-card's resolved summary writes `data-lf-gen="1"` again, and
`module-authoring.md` and the `relabel` comment now describe the static
markers. The `said` export, its test and its authoring line are gone.
`offered`, `contributionHost` and `contributionReceipts` each repeated
the same element-part skeleton; `elementDirective(name, write)` in
`widget-elements.js` now builds all three. Rendered markup is unchanged.

**#26: `commandsOn` attaches once per connection.** Before this change,
every render re-attached the scope, which meant re-validating it,
re-wiring its buttons and running `paintKeys()`. That made the next
frame re-read the shortcut attributes of every scoped element on the
page. Now a re-render puts a fresh scope with the latest declaration
(title, rows, callbacks, `when`) in place of the last one
(`standScope`). It then queues one reading of that element alone, the
same reading any new declaration gets on its first paint, without the
page-wide pass. As before, a row whose `when` turns false loses its
`aria-keyshortcuts` on the next frame. The scope is replaced rather than
changed because its contextual aliases are built from it once. Measured
with the reviewer's probe (20 template rows beside 300 other scoped
elements), an unchanged re-render now costs 120 attribute reads instead
of 2,040.

`detachScope(element, scope)` is now the one way an element's own
declaration is withdrawn: when the directive leaves, and when a first
reading refuses the declaration. It re-reads the element from whatever
scopes remain. That also fixes a bug `main` already had: a declaration
refused on re-render kept its stale `aria-keyshortcuts`, and because the
element then left the reference's list, nothing ever cleared it.
`forgetScopedElement` now itself checks that nothing else declares on
the element, which removes the same check from its three callers. The
never-passed `validateAtPaint` option is gone.

**#27: the Page Map's receipt choice moves into the model.**
`marginMapGroups` gives every row an `action.receipt` (and
`awaitsUser`). A control row gets the target's receipt when the margin
shows that receipt on the same control (`workflowCarrier`), and
otherwise its own record's receipt. Item rows and control rows now both
bind `contributionReceipts(action.receipt, action.awaitsUser)`.
`contributionHost(source, surface, record, options)` tracks the host on
its surface itself, as `materializeContributionControls` does for every
host it presents, and the `paint` callback is gone. The test that
asserted the callback received the control now asserts that the template
host matches the imperative host and that the host is found on its
surface. A new `margin-model` assertion covers which receipt each row
gets.

Line deltas (hand-written source excludes tests and Markdown):

| | source | tests |
|---|---|---|
| #25 (`widget-elements`, `thread-card`, `widget-api`, the directive
half of `contribution-controls`) | about −43 | −23 |
| #26 (`keyboard/scopes.js`) | +20 | +89 |
| #27 (`page-map-dialog`, `margin-map-model`, the host half of
`contribution-controls`) | about −5 | +13 |
| total | −28 (+132 −160) | +79 (+111 −32) |

Checks: the `command-controls`, `margin-workflow`, `margin-model`,
`passage-boundaries` and `indication` runtime tests. The two new
`command-controls` cases fail on `main`. In one, an unchanged re-render
reads an unrelated scoped element 3 times. In the other, a refused
re-render leaves `aria-keyshortcuts` behind. Browser: two Page Map cases
(`test_open_page_map_uses_the_canonical_margin_entry_record_and_live_state`,
`test_unit_claim_arrivals_share_one_window_with_the_open_page_map`) and
three `commandsOn` journeys (quoted passage, Questions panel, a thread
Question's Done).

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Oct 12, 2026
…nd argument type guards, and the unused x-paints key (#2555)

Browser-runtime and package code that re-checked what Leaf's own server,
composer or producers already guarantee, retried or rolled back faults
nothing records, or type-checked arguments the next line would reject
anyway. It goes; checks that stop bad input passing silently into
admitted events, stored decisions or anchors, guards against hangs, and
`current()` race checks stay. Part of the complication-weight sweep
(#18, #22, #23, #25 and #27 there); follows #2507.

**#18 Re-checks of Leaf's own output**
- `validDrawing` re-validated every drawing against the full comment
schema on each paint, though admitted drawings passed it at the append
door, `drawing.js` clamps every bound, and the versioned `format`
separates old drafts. It is now the format check; the generated bound
constants stay. `drawing-record.test.mjs` goes; the malformed-draft
browser test now uses a `leaf-drawing/2` draft.
- Spot checks of `$layer` facts, four `/api/state` fields, the
deferred-data reply echoing its request, the export payload and "a
single main" (which `page check` refuses) go from `widget-loader.js`,
`state-application.js`, `data.js`, `context.js`, `version.js` and
`layer-client.js`. `loadDeferred` keeps its two `current()` checks. The
two deferred-load tests now inject an HTTP 500 instead of a bad echo.
- `summary-ranges.js` stops re-checking the contiguity `events.py`
builds.

**#22 Retry and rollback for faults nothing records**
- The thread list's one-shot retry of a failed render (with
`RetainedThreadListError` and its `recovered` plumbing) goes; a failure
restores the committed list once and is reported, and the next reading
paints. The sibling-cohort rollback stays.
- The Questions banner rolled back twice on one failure, and its inner
rollback ran before `view.js`'s rule that an obsolete attempt must not
roll a newer reading back; `view.js` is now the one owner.
- The file editor's merge `Compartment` could never switch; the merge
view is built once.
- lf-diff's four assertions on its vendored Pierre's output shape go;
`renderedLines`' row check, which keeps a datum key off the wrong row,
stays.

**#23 (runtime half)** The torn-opening-line thread recovery, which
#2507 made unreachable by refusing a reply to a withdrawn message, goes
from `thread/model.js`'s contract, `module-authoring.md` and
`application.ts`, with its runtime test.

**#25 Argument type guards** About sixty `typeof`/`instanceof` checks on
module-API arguments, including bundles only the runtime passes, go
across `projection/`, `thread/`, `keyboard/` and the top-level runtime,
and in lf-visual-review, lf-playground and lf-diff. Kept because they
guard a rule rather than a type: `projectData`'s non-empty key and
identity (a package passing an object would otherwise anchor a stored
comment to an unrelated datum; new `project-data.test.mjs`),
`setReaction`'s boolean, `declaredScope`'s Escape enum, double
registration, visual-part uniqueness and `requireReference`.

**#27** The `x-paints` registry key, which no tag in the tree declares
since lf-task left, goes with its runtime reader, render-check half,
schema, docs and tests.

**Not cut:** `canonicalBinding`'s `"Space"` alias, which is what makes
the non-canonical check refuse a binding that would otherwise never
fire.

**Tests:** with the retry gone, the `choose-earlier` boundary variant
holds each failing reading at a gate before it paints, so the user's
choice happens on the committed list and one release fails all three
readings; the shift watch stays on and the test asserts both the
retained reading and its stability.

> _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 21, 2026
…side it (#3396)

A survey of `notes/` against the code and history at d91b67b. Where a
note's design has landed, its contract moves beside the code if it
wasn't already there, and the note or section goes; what is still
unresolved stays.

- **Deleted:** `floating-panel/GOAL.md` (every departure is now recorded
in `floating-panel.js` and `styles/floating-panel.css`; #3392 moved the
last one, the draft posture, beside `drafted`, and this adds the
no-key-hints decision to the header), `browser-reactivity.md` (its
design is in module headers; why paints that must land in the turn use
`render` moves to `assets/AGENTS.md`, and the margin's double draw
becomes a TODO implementation candidate) and `chrome-and-covers.md`
(`page-layout.md` holds the workspace decision; the `layouts.css`
Workspace comment now records the rejected main-region-scrolls design).
- **Trimmed:** `agent-usability-evals.md` drops the findings through
2026-10-12, which have landed. `comparisons.md` drops the phone-pin
finding (#2680), the 4 October follow-up proposals and two landed
lessons. `user-feedback-responsiveness.md` narrows delegated work to
Codex and Pi (#3370) and drops "Explicit stdin" (#3375). `threads.md`
drops request buttons (#1327), placement (#2134) and notification
transitions. `shared-decisions.md` points at the recorded owner
contract. `browser-support.md` drops two fixed entries and owners #3100
removed.
- **TODO.md** follows each: #28 points at the module header, #25 asks
for the board's write rather than an owner, the annotation-placement
item loses its landed phone half, and the delegated-work and
reply-budget items lose what #3370 and #3372 settled.
- Smaller corrections in `shift-watch-cost`, `undo-reach` (#3271),
`named-widget-interfaces`, `codex-integration` (`codex_tool.py`), the
long-read eval's provenance comment, and `motion.js`'s fold comment. The
runtime comment edits rebuild `kernel.json` only.

No behavior changes.

> _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 25, 2026
)

A review page that asks Next, Later or Drop beside each proposal and
also shows every answer on a board used to record two independent facts:
the section's `lf-options` pick and the board card's `move`. The door
admitted both, `page state` reported both, and nothing said which one
held. The obligation model had already settled that the section's widget
owns the answer; this builds the board's write to that owner.

## The contract

A board card with `shows="<widget id>"` is a view of that widget's
answer (`x-shows`, owned by `src/leaf/shown_answers.py`):

- **Source identity.** `shows` is a plain `x-refers` relation to a
widget in the card's own document: the page, or the reply that holds it
(frozen-thread scope). A card in a reply that names a page widget is
refused (`shows-outside`).
- **Column to value, without coupling core to `lf-options`.** The card's
`x-shows.value` names the attribute on its compound owner (`lf-column
value`) holding the answer that column stands for. The widget says how
its answer reads as a value: a `value` record's attribute value, or, for
an `attribute` record, the new `x-awaits.key`, which `lf-options`
declares as `value` on each `lf-option` (unique per group through
`x-unique`). An answer names a value only when it is one string; an
empty pick, an option the user wrote in (no `value`), or picks with
different values name none, and the card stands in a column without
`value`, as it does for a value no column holds.
- **The write is the owner's own command.** The board composes through
the existing public API: `shownAnswer(card)` (new export in
`widget-api.js`, `browser/runtime/shown-answer.js`) reads the owner's
state through its controller and `answer(value, says)` sends the owner's
`x-awaits.value` verb through `widgetController(owner).dispatch`. A drop
and a section pick are the same event at `[rail-choice, rail-choice,
choose]`, so undo, refusal and `restated` work on one fact and both
views redraw from it.
- **Admission.** The guarantee composition lacked was not the owner
write (the owner's own declaration already admits or refuses every value
a view can send) but the second fact: the door now refuses a position
move of a unit that shows an answer (`shown-unit`).
- **Markup.** `page check` and message admission refuse a card placed
apart from its widget's authored answer (`shown-elsewhere` names the
column to move it to), a board with no column for answers that name no
value, a column value the widget cannot answer, and a `shows` naming a
widget whose answer no view can show. `package check` holds both sides
of the declaration (`shows-reference`, `shows-value`, `awaits-key`).
- **Order.** A shown card keeps its authored order in whichever column
its answer puts it; the arrows only change its column and the grip
offers no up or down. Order stays a board fact for the board's own
cards; a shown card's order would be a second fact placed among columns
the answer decides.
- **Multiple selection.** A `multiple` group shows by the value its
picks share; a drop replaces the set with the member holding the
column's value, and the group's Done still completes the obligation.

## Alternatives rejected

- An Answer record or a value field on `lf-ask` (the note's reason: it
moves the answer off the widget that owns its words, options and
obligation).
- A `via` field naming the view, with the door proving the view may
invoke the owner's command. The owner's declaration already decides
every value; the field would be bookkeeping no reader needs, and it
would have been a protocol change.
- Board ranks for shown cards. Allowing a reorder `move` would need the
door and both folds to read another widget's state to keep its column
consistent; dropped until a page needs ranked answers.
- The discarded prototype's coupling (board naming
`lf-options`/`choose`, option `for` overloaded): the mapping is now
declared on both sides and read generically.

No protocol bump: the change adds an `x-` key, an `x-awaits` field and a
widget-api export, and the door's new refusal can only fire on pages
vendored with `x-shows`. An earlier page's vendored layer has none of
these.

## Key files

- `src/leaf/shown_answers.py`: the contract, the value rule and the
markup checks; door refusal in `event_contracts.position_record_error`.
- `browser/runtime/shown-answer.js`: the browser reading and write.
- `packages/default/widgets/lf-board.js`: places shown cards from the
answer in `render()`, routes drops to the owner, per-card movability.
- `packages/default/registry.json`, `browser/registry.json` (`x-shows`,
`$awaits.key`), `src/leaf/schema.py`, `src/leaf/registry/widgets.py`.
- Instructions: `skills/leaf/references/authoring-decisions.md` ("One
decision in its section and on a board"), `package-data.md` ("Views of
an answer"), `module-reading.md` (`shownAnswer`), `events.md` (position
moves).
- `examples/developer/feature-gallery.html`: a Decisions scenario
(`bg-ask-board`).
- `notes/shared-decisions.md` is deleted (its contract now lives in
`shown_answers.py` and the references); TODO #25 is removed.

## What ran

- `tests/model/test_shown_answers.py` (new): door refusal, the four
markup refusals, reply scope, the value rule.
- `tests/model/interact_contract/test_registry_door.py`: the three
declaration refusals, and the rest of `interact_contract`,
`test_obligations.py`, `test_interact_document.py`,
`test_interact_product.py`, `test_interact_layer.py`,
`test_unused_exports.py`.
-
`tests/browser/widgets/test_boards.py::test_a_section_and_a_board_answer_one_decision`
(new, 2.5 s): a section pick and a keyboard drop land as two `choose`
actions on the section's group, undo restores both views, a version that
marks the group `restated` retracts the pick in both, and a refused drop
leaves both where the server has them; plus the existing board tests
touching availability, keyboard and pointer moves.
- `pnpm run test:runtime` (550 pass), `pnpm run check:browser`,
pre-commit.
- Real-browser journeys with `leaf-dev probe` on a two-proposal page,
Chromium (recorded) and Firefox: section pick, keyboard drop, pointer
drag, undo, refused drop and refused pick, and a live revision restating
a pick; a board in an agent reply showing a group frozen in the same
reply.

Not done: no `evals/` run for the new authoring section; it is
conditional on the user needing all answers on one board, so I judged
the risk to other decision pages low.

> _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 Nov 6, 2026
…the words after it

A worktree's summary draws its label and its branch on two rows of a grid, but the
template ran `</strong>` straight into the branch's `<span>`, so both readings read
"retain-draftscodex/retain-drafts" and searching "retain-drafts codex/retain-drafts"
found 4 on main and none here (#25). Ten figure captions in docs/ui.html (7) and
docs/threads.html (3) run a title the docs' CSS draws as a block straight into the
caption's text, so "A large windowThe workspace…" read as one word and searching
"window The workspace" found 1 on main and none here (#26).

Each now has whitespace there, which the grid and the block title draw as nothing. A
`<summary>` holds phrasing content only, so the worktree's two rows stay spans; the
captions keep the one form every other caption in the docs has, a title and then
its text after a space.

The `serve` fixture now resolves an example's package selected by its path from the
checkout (the docs' `./docs/package`) against the checkout rather than the page's
scratch directory, so a test can serve a product doc as it ships.

Tests, each failing on a930610 in Chromium and Firefox:
- test_page_search_reads_a_worktrees_label_and_branch_apart (#25);
- test_page_search_reads_a_docs_captions_title_apart_from_its_text, on ui and threads
  (#26).
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