Repository navigation
Update five nightly tests to the thread card's native details shape - #917
Conversation
#905 replaced the thread card's custom accordion with a native named `<details>`, and six nightly tests in five other files still read the old shape: two focused the card root, which a `<details>` does not take; one read a quote out of a card nobody had opened; one claimed a `thread-card` focus ring whose CSS rule #905 deleted; one expected the accordion to hand its disclosure to the next thread when the open one resolved; and one asserted a chart inside a collapsed card had no box, where the closed disclosure's skipped contents still lay out against the panel. No runtime code changes.
leaf-agent
left a comment
There was a problem hiding this comment.
The chart test's rewritten docstring names the wrong gate, and the assertion that replaced clientWidth == 0 no longer says anything about the widget.
Measured on this branch, with the panel open and the card still collapsed: document.getElementById('msg-chart') has no svg child at all — {has: False, box: 385, rect: 385}. So "the panel is what the chart waits for, and opening the card's title is what puts the drawing on screen" is false; the card's title is what hands the chart its box, and until then there is nothing to put on screen.
The mechanism is the split the new > 100 reading walks straight past. measure() in skills/leaf/assets/runtime/widget-elements.js gates on its unmeasured ResizeObserver, and a content-visibility-skipped subtree reports 0×0 to ResizeObserver while answering a layout query with the panel's width. The 385 the test now asserts is the number the runtime does not read. Both the old == 0 and the new > 100 therefore stand for the same non-claim: one was a false measurement, the other a true one about a box nothing consults.
The arrangement worth stating is the pair — a box is readable here and the chart is still undrawn — which is exactly what distinguishes a shut card from the shut panel the line above already covers. I'm pushing that correction onto this branch: the two are read together in one evaluate, and the docstring names ResizeObserver as the gate rather than the panel.
Verification
All six node ids pass on this branch under uv run pytest -q -n0 --run-nightly on this CI host, before and after the correction, including test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus (105s). The removed thread-card ring case checks out: no rule in skills/leaf/assets/*.css declares --lf-here-ring: thread-card, and the ring test's own population comparison would have reported an unexercised declaration otherwise.
Bug-back on the new assertion: opening the card's title before the read makes it fail (drawn True), so it discriminates the two arrangements rather than restating the one above it.
The rewritten docstring said the panel is what the chart waits for and the card's title only puts an existing drawing on screen. Measured with the panel open and the card shut, `#msg-chart` has no `svg` at all: `measure()` gates on its `unmeasured` ResizeObserver, and a `content-visibility`-skipped subtree reports 0x0 there while answering a layout query with the panel's width. So the 385 the assertion read is the number the runtime does not consult, and both it and the `== 0` it replaced stood for nothing about the widget. The pair is the claim: a box is readable and the chart is still undrawn, which is what tells a shut card apart from the shut panel the line above covers. Opening the title before the read makes the assertion fail, so it discriminates the two arrangements.
leaf-agent
left a comment
There was a problem hiding this comment.
The not drew half of the new assertion passes in the arrangement it claims to exclude, so the pair still does not tell a shut card from an open one.
Measured on this branch, sampling [clientWidth, Boolean(querySelector('svg'))] on #msg-chart once per rendering turn after the panel opens:
- card shut:
[385, false]at all twelve samples; - card open:
[385, false],[385, false], then[385, true]from the third on.
The read is the first sample. panel_settled returns on the class, which moveContentFrame flips inside the gesture — the helper's own docstring says there is no pending frame to wait on — so not drew holds because the read arrives before the runtime's first turn, not because the card is holding the chart back. The draw lands three to four turns after the box appears. tests/CLAUDE.md, "Make a green test non-vacuous", asks what single product change would make an assertion fail; for that half there is none.
There is no settled frame to move the read behind, either. The settle would have to be a fact saying this chart's measurement is still outstanding, and the runtime publishes none: measure() in skills/leaf/assets/runtime/widget-elements.js parks the wait in unmeasured.observe(el), and nothing routes it through deferredArrival — interaction-gallery.js is the only caller — so lfPageArrived() is already true when open_page hands the page over with the chart undrawn. A frame count in the test would stand in for that missing fact, which tests/CLAUDE.md rules out under "Do not substitute frame counts or quiet windows for these distinctions".
So it is the approach I would question here rather than the line, and this is the third round in a row where the fix drew the next finding. Two ways out, and the call is a maintainer's:
- land the box reading alone and let the docstring carry the
ResizeObservergate as measured mechanism rather than as an assertion — the suggestion below; - give the runtime a published fact for a widget still waiting on a box, so a reader outside the page can tell one that will draw from one that never will, and state the negative against that.
Nothing else in the PR turns on this. The five other readings stand, and this test's subject is held by its ending — the title opens, the svg becomes visible, and its width matches the box.
How the samples were taken
A scratch test built the same page and events, opened the panel, then read chart => [chart.clientWidth, Boolean(chart.querySelector('svg'))] twelve times with page.evaluate(RENDERED) between reads, once with the card left shut and once with .lf-thread-summary clicked first. The shut run never changed; the open run flipped at the third sample.
uv run pytest -q -n0 on this node id passes both as pushed and with and not drew dropped, which is the point — the half is not what the test is standing on.
# Conflicts: # tests/test_render_controls.py
|
I have merged The ring case is now The remaining four files are unchanged from what was reviewed. Verification on this CI host, both runs under At the merged head fe475a5, the five pass: So |
Leaf can now host an operable page inside `lf-specimen`, with its own choices, comments, drafts, and reset lifecycle. The developer gallery uses the same host for its passive replays, retaining playback, looping, pointer choreography, and viewport controls while removing its separate document/bootstrap construction. The child is an ordinary server-backed Leaf page created from a captured template, layer, data, and optional conversation history. Authoring validation traverses each child with the ordinary document checks while preserving separate identity spaces and authored diagnostic lines, and allocation uses those same child-document bytes. A template can declare conversation references before its seed log arrives; allocation requires every selected root to exist. Children use normal event admission and state projection; the parent owns allocation and disposal. Runtime requests follow document identity independently of shared immutable asset URLs. Delivery declares each child's reader-storage scope once for prepaint and runtime. Static export recursively bakes the rendered child with the same exporter used for its parent; offline-interactive export refuses server-dependent specimens. The main boundaries are `runtime/specimen.js` for browser lifetime and focus, `leaf/specimens.py` for captured child-page creation, and the ordinary HTTP page endpoint for serving it. Host labels, controls, and instructions sit outside the specimen gutter. Authoring and package references document the contract. This adds live-page hosting rather than claiming a net reduction in repository complexity. It removes duplicated startup knowledge and shares production behavior, at the cost of temporary child-page allocation and lifecycle management. The final simplification pass removed an unused resizing API and reduced seeded child creation to one activation. Coverage includes parent/sibling isolation, real choices and comments, optimistic refusal, nested Escape, reset/disconnect races, captured resources, read-only render previews, scoped MCP/website routes, and standalone export. The live specimen and retained gallery interactions were also exercised in Chrome. Local validation: 1,272 everyday tests and 635 focused contract/server/document/product cases pass. All 59 export tests and both corpus render-gate cases pass, including first-version specimen seeding. Eight focused specimen/Escape integration cases, 33 runtime tests, 64 Worker tests, and 10 specimen/startup cases also passed during review. The complete controls file has 95 passes and one obsolete walked-thread ring expectation; that failure reproduces identically on clean base `4486b342` and is already addressed by PR #917. The website build produces all 81 pages. The final gallery renders cleanly in Chrome, light/dark and desktop/mobile sizes. > _This was written by Codex on behalf of max-sixty_
|
The next complete suite after the one recorded above — run 35708552730 on
No fix PR from this Failure summary from run 35708552730 |
…s, banner shelf, and gallery layout (#930) `ci` on `main` is red: the [scheduled complete suite on 4ffc2bd](https://github.com/max-sixty/leaf/actions/runs/35718248873) reported nineteen failures. Fourteen of those node ids, across twelve nightly browser cases, read chrome shapes that three of the morning's merges moved, and this updates those readings. A fifteenth case, which that run did not reach, broke on the merge after it. The remaining five are #917's, already open against #905's native `<details>`; nothing here touches them, so `main` needs both to come back green. No runtime code changes. ## What moved, and what each test reads now **#921 (4ffc2bd) gave the thread panel two selection levels.** Escape from a selected thread now returns to whole-panel selection, and the press after that closes the panel. Nine node ids across four files walked out of Threads in two presses and asserted the panel gone on the second. Each now states the level it gained — `.lf-threads` holds the selection — before the press that closes the panel, which is the shape #921 gave the tests it could see in `test_render_navigation.py`. The intermediate `expect` is also the arrangement: it settles the release before the next Escape rather than firing two presses into one turn. **#918 (a45144d) made the thread lifecycle filters a `wa-radio` group.** Three tests read the standing choice off `aria-pressed`, which a radio does not wear; they now use `to_be_checked()`, the reading the everyday-gate tests #918 updated already use. The same change also made the group exclusive, so re-pressing the standing member no longer widens the list — `test_an_ok_on_the_agents_latest_reply_takes_the_thread_out_of_waiting` pressed "On you" a second time to get every thread back and now chooses the group's open member instead. That second fault was behind the first: the test stops at the `aria-pressed` read, so the run never reached it. **#923 (c6c9cb3) added touch-only selection controls to the banner shelf and renamed the `s` command.** `commentSelection` and `cancelSelection` rank after `threads`, and `select-element` is `alwaysFolded`, so two tests counting the shelf's markup — the last child of `.lf-banner-actions`, the number of children in `.lf-banner-menu` — were reading inventory where they meant what the reader meets. Both now read what stands: the last *visible* control in the row, and, for the door, what is behind it once it is opened. A third read the reference's wording for `target.chooser.open`, a string `test_render_semantic_selection.py` also reads; this reads the reference row by its command id instead, so the words are stated in one place rather than two. Both cases are nightly, so nothing holds that string before `main` either way — #923 updated the one and not the other, which is the whole fault. **#924 (ff34b91) grew the feature gallery between a case's scroll target and its subject.** `test_g_hints_reach_a_late_visible_action_only_location` scrolled to `#bg-quoted-and-visual` and asked for the go-to chip belonging to `#bg-shot`'s margin entry; the new `#bg-live-practice` section sits between the two, so that scroll now leaves the entry about 1,200px below the scrollport and the hint layer is right not to draw a chip for it. The case reached that state because its guard was `to_be_visible`, which says a control is laid out rather than that a reader can see it. It now scrolls to the location's own anchor and reads `to_be_in_viewport`, so the premise it states is the one the hint layer acts on. Checked alone at both commits: green on 4ffc2bd, red on `ff34b919`. ## Why these are updates rather than a fix under them Each failure is a nightly test hand-reading a shape the runtime or the corpus owns, changed by a pull request whose own gate could not reach it: `ci` runs the complete suite on `main` and on the schedule, never on a pull request, because it holds a runner for over an hour on a shared pool — a trade-off `ci.yaml` states, with `main`'s own run and `tend-ci-fix` as the designed repair step. So the level above these tests is working as intended, and the durable improvement available inside them is to read a declaration instead of an incidental shape. Every fault here but the Escape depth moves that way: a radio's checked-ness and its exclusivity, a command id, and — twice — the run that stands rather than the shelf's markup. The Escape-depth nine have nothing more declarative to read — the press count *is* the behaviour — and each states the unwind because the assertion around it is about where focus lands and what stays open, so they keep their own narration. The gallery case is the same move at the arrangement end: it now states the premise the hint layer actually reads, so corpus content growing under it fails loudly rather than quietly changing what the case is about. That leaves the seam #917 named for the thread card exactly as reachable as it found it: the panel's chrome has no single place a change to it can find its readers. ## Verification All fourteen failed in the scheduled run on 4ffc2bd, and each passes on this branch under `uv run pytest --run-nightly -n0` on this CI host. The fifteenth was found by running the six changed files whole: `test_render_aim.py`, `test_render_anchors.py`, `test_render_controls.py`, `test_render_margin.py`, `test_render_navigation.py` and `test_render_reactions.py` are 574 cases under `--run-nightly -n2`, and the only two failures were `test_g_hints_reach_a_late_visible_action_only_location`, now fixed here, and `test_a_thread_at_rest_shows_only_the_marks_that_stand_in_it`, which is #917's. `pre-commit` passes on the changed files. Besides the gallery case above, two cases have their arrangement changed rather than only their assertions, so those three are the ones worth a second look: `test_the_responsive_action_row_keeps_primary_actions_in_reach` opens the overflow door to read what stands behind it and closes it again, because the shelf freezes its partition while the door is open and the test registers another control straight after; and `test_covering_threads_keeps_the_reader_and_their_work_inside` reads the document's scroll position after the thread releases to the panel rather than before, the release being the press that no longer closes the sheet. A pull request runs the everyday gate, which reaches none of these files, so `ci` here says nothing about them; `main`'s own complete suite on the merge is the first run that reads them. --------- Co-authored-by: leaf-agent <[email protected]>
…d assets in the site fixture (#931) The complete suite on [ff34b91](https://github.com/max-sixty/leaf/actions/runs/35720951649) — this branch's merge base — reported twenty-one failures and two errors over twenty-two distinct node ids. Nineteen were already red on its parent 4ffc2bd ([its own run](https://github.com/max-sixty/leaf/actions/runs/35718248873)) and belong to #930 and #917, which are open against them. Three are first red on ff34b91 and so are #924's: the two this fixes, and `tests/test_render_margin.py::test_g_hints_reach_a_late_visible_action_only_location`, which #930 already rewrites. No test here overlaps either of those branches. ## A specimen refused to open on a page whose log had not been written into `test_an_anchor_written_from_the_mapped_revision_lands_on_the_page[feature-gallery]` failed in teardown on four browser problems, the first of which is `POST /api/specimens` answering `400 unknown specimen conversations: 2be2443f0bb6cc49fc86b52f340e6073`. That sweep serves the gallery with `seed_log=False` — the page as its markup and its data make it, which is the ordinary shape of one created from its source — and the gallery's four templates each declare that root. Allocation required every declared root to be in the log, so on such a page no specimen opened at all and the runtime's rejection reached the console as an unhandled error. The declaration is a selection over the parent's standing log, and the log is not something the document owns: `specimen_events` now copies the conversations the log holds and lets a root it does not hold read as absent, so a first version, or a page re-created from its source, opens its specimens the same as any other. Nothing above the door was stating that rule either way — `version check` deliberately permits the forward reference and allocation refused it, so the same declaration decided two different things at two boundaries. What the strictness was protecting is still held, in two places that can tell a typo from a page nobody has written into yet: - `scripts/corpus.py` selects against the example's own shipped log, where every declared root exists by construction, and exits naming the source and the ids. - The child's ordinary document checks still refuse a child that names a conversation it does not have. `test_specimens_seed_only_the_declared_conversations_and_reset_by_recreation` now covers both halves: a template whose markup does not depend on the conversation opens with an empty log, while the one carrying `<lf-suggestion resolves="aabb0011">` is refused in that element's own words. `validation/source.py` also drops the `selected & available` it was narrowing with before calling in — the same rule stated a second time at a caller — so static validation and allocation build the same child from one reading. ## The site fixture served a document only the edge could complete `test_every_published_page_stands_as_a_live_page@site` timed out waiting for the gallery's four `iframe[data-interaction-ready]`, with 404s on `/_leaf-release/<release>/examples--feature-gallery/revisions/r3-…/leaf.js` behind it. Production is not affected: one public origin is two servers there, and `worker/src/index.ts` answers `/_leaf-release/<release>/<key>/…` from the build's sibling asset tree — the tree `publish_live_shells` writes — before handing every other route to `worker/server.py` inside the reader's container. `WebsitePageEndpoint._specimen_asset_root` captures that release namespace for a published revision, which is what lets a child share the shell's release-captured graph. #924 thereby made a specimen the first container-served document to depend on bytes only the edge holds, and `served_example` and `hosted` stand the adapter up with nothing in front of it. Both fixtures now answer the release namespace from the build's asset tree, using `releaseAssetRoute`'s own rewrite: the key after the release names the page, and what follows it is that page's published path under the tree. `hosted` gets it too, so the next test to reach a specimen through it does not find the same hole. ## Verification Both cases fail at ff34b91 and pass here, checked on this CI host. Around them: `tests/test_site.py` whole (51 cases, `--run-nightly -n0`), `tests/test_render_pages.py` whole (53, `--run-nightly`), `tests/test_interact_server.py` and `tests/test_interact_document.py` (276), `tests/test_interact_contract.py`, `tests/test_website_server.py`, `tests/test_render_startup.py` and `tests/test_interact_mcp.py`. `scripts/corpus.py` regenerates the corpus byte-identically. `pre-commit` passes on the changed files. The everyday suite leaves six failures this sandbox owns rather than the branch — `AF_UNIX` is unavailable here, and the published-capture case needs the browser-build dependencies — and the same six fail identically with these changes stashed. CI's own `test` job was green on ff34b91. A pull request runs the everyday gate, which reaches neither `test_site.py` nor `test_render_pages.py`, so `ci` here says nothing about either case; main's complete suite on the merge is the first run that reads them. Co-authored-by: leaf-agent <[email protected]>
Thread headers inherited the generic disclosure background and 18px top margin, while section labels were shortened before the panel could lay them out. Remove the chevrons and permanent header tint, reset the inherited card spacing, and retain full labels so each display can wrap or ellipsize them to its available width. Apply the same full-text rule to Page Map, Ask answers, design and reaction labels, target descriptions, and targeting names. Page Map headings and action labels clamp to two lines in CSS. Generated spoken margin names share a bounded excerpt that preserves useful text even without spaces; visible and searchable titles remain complete. Scroll reachability rechecks child controls when layout changes, so an initially empty Page Map list yields its Tab stop when actions arrive. Targeting guidance describes the complete visible text in submitted actions. Keep bounded anchor/search context and measured chart clipping intact. Verified the real panel with mouse and keyboard, retained reply drafts, and narrower widths. Before integrating main: 1,239 everyday tests, 97 conversation tests, 33 runtime tests, and lint passed. The two broader widget-test failures reproduce on the unchanged baseline; #917 owns their fixes. After integrating main, lint, all 33 runtime tests, and four focused browser cases pass; those same two baseline cases still fail. A targeting regression verifies that long names and submitted context retain their complete text. After the review repairs, all 34 runtime tests and 16 focused Page Map/browser cases pass, including keyboard focus in a genuinely overflowing list at 390×480 and at 390×760. Lint passes. Five failures from the broader margin test file reproduce on the unchanged base; PR #930 has already fixed those tests on main. > _This was written by Codex on behalf of max-sixty_
Reading widgets reconstructed their registration declarations and searched generated wrappers whenever they reconnected. Keep one layout handle containing the nodes and region declarations instead. Its connect/disconnect lifecycle owns registration and root-fitting observers, so structural widgets, playgrounds, and visual reviews reuse their existing DOM and controls. Replace the separate registration and root-fitting APIs throughout the runtime, package callers, examples in tests, and package guidance. Reconnect coverage exercises retained nodes and playground values, then continues keyboard and responsive-layout journeys. Single-arrangement widgets retain a successful handle before marking their upgrade complete, so refused region admission can retry on a later connection. Compound widgets keep their one-shot chrome/listener builds and reconnect only retained layouts. A browser regression reproduces occupied-region refusal, release, retry, and a second reconnect with the same nodes and reader draft; it fails against the base runtime's generated-wrapper rediscovery. Validation: all 1,272 everyday tests, 33 runtime tests, and pre-commit checks passed. The complete startup/widgets/projection selection had 423 passes; three environmental failures passed on rerun. Two remaining thread-disclosure expectations reproduce identically on the base tree and are already being updated in #917. Matched desktop playground screenshots were byte-identical; startup used the same 172 requests and 2,700 fewer response-body bytes. > _This was written by Codex on behalf of max-sixty_
Dragging a resize handle after keyboard use kept its tall keyboard focus outline visible. Let native pointer focus clear that state, then restore focus when a drag ends or is cancelled so mouse and touch both retain arrow-key resizing. The shared handler covers the thread panel and tray edge. Keep resize presses out of composer dismissal, and only snap text selections for gestures that began in page content. Resizing therefore preserves an open draft and an existing partial-text selection. Selection-snapping tests now arrange complete pointer gestures, including releases across shadow roots. Validation includes mouse, touch, and cancelled-touch regressions on both edges, direct before/after browser checks, the full browser gate, selection and draft browser tests, runtime tests, and pre-commit. The complete anchor and MCP browser files pass all 105 tests. The selection/draft run passed 122 tests; its remaining failure (`test_a_refused_comment_takes_its_message_back_and_returns_the_words`) reproduces on base `c1f6b33b` and is already covered by #917. The mouse-ring regression fails on the unchanged baseline; the expanded regression reproduced the composer dismissal and selection rewriting before the repair. > _This was written by Codex on behalf of max-sixty_
An asynchronous arrival could capture reader intent after waiting for rendering or hydration, allowing older work to take focus or restore scrolling after the reader had moved elsewhere. Revision restoration, Ask materialization, lazy data links, and nested disclosure now retain the original intent throughout the operation and yield to newer input. Nested reveals share that predicate, and synchronous panel or tray focus transfers preserve its original input generation. Anchor navigation uses the shared mechanism instead of maintaining a separate input tracker. Values and disclosures cross replacement unconditionally. Eligible fields receive focus and caret synchronously so typing can continue while renderers load; reading-layout also preserves focus while wrapping existing controls. Only scroll correction waits for presentation. The widget-author contract documents the navigation rule. Integration retains PR #946's native tab navigation and removal of its parallel scroll cache; the delayed-layout regression now verifies the native arrival and newer wheel movement. Validation: 1,219 everyday tests and 22 focused browser cases passed before integrating main. After integrating main, all 1,276 everyday tests pass. After the focus repair, 34 runtime tests and 24 focused browser cases pass, including patch/reload, mid-string typing without refocusing, newer wheel input, explicit blank-page clicks, and untouched restoration. The new interrupted-navigation cases fail on the original code while untouched controls pass. A further 18 focused browser cases pass after separating mandatory value carry from focus ownership, including an arriving custom element that takes focus. Broader runs exposed stale native-accordion test assumptions: PR #917 handles the widget/chart cases, and a separate local follow-up covers bottom-clamped versus freely aligned long-thread arrivals. > _This was written by Codex on behalf of max-sixty_
…osure and message workflow line (#951) `ci` on `main` is red. The complete suite on [fd25b4a](https://github.com/max-sixty/leaf/actions/runs/35758716384) reported twenty-one failures and two errors; nineteen of those node ids are already repaired on `main` by #930, #917 and #931. This updates the readings behind the rest, behind two cases those runs never reached, behind two more that #925 reddened after that run — one of which #917 had just repaired — and behind the receipt element #933 removed while this branch was open. No runtime code changes. `main` moved while this branch was open, so it carries a merge of `f4107f63` and every claim below is against that merge base rather than the branch's original `26aa5e20`. ## What moved, and what each case reads now **#936 gave go-to-threads one destination.** `g T` now selects the whole panel whichever thread the reader stood on to ask for it. `test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline` pressed it from an inline page thread, expected the matching panel card selected, and walked back out in two Escapes; it now reads `.lf-threads` and leaves in one. #936 updated the two navigation cases it could see — this is the third, in a nightly file its gate does not reach. **#933 replaced the message receipt with one workflow line.** Nothing under `skills/leaf/assets/runtime/` writes `.lf-receipt` or `data-receipt-id` any more: a message's status is the `.lf-msg-sending` span in its head, labelled by `conversation/workflow.js`'s `workflowLabel` with the claim detail on `title`. The same `test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline` read the old element for the root thread on both surfaces and for two later messages, so after #933 it died there — above the go-to-threads reading this PR repairs. Each reading now takes the workflow line under the same head; the identity probes still hold, because the span is retained across the pickup update on both the inline and panel views. **#945 made the thread filters toggles rather than one radio group.** Two cases read the standing status filter with `to_be_checked()`, which a toggle does not answer, and `test_inner_state_is_left_before_the_surface_around_it` read the `w` line as "all threads" where #945 renamed it "clear waiting filter" while the narrowing stands. Each now reads `aria-pressed` and the current wording. **#925 made narrowing retain a card's disclosure.** Its commit message states it — "Native thread disclosure survives filtering, so an answer returns where the reader left it unless they selected another conversation" — and the same commit rewrote `thread-list-view.js`'s module header to match: "Narrowing retains that disclosure; opening another named card closes it natively." Two nightly cases press a card's summary a second time to reopen what the narrowing used to close, so that press now *closes* an open card: - `test_an_ok_on_the_agents_latest_reply_takes_the_thread_out_of_waiting` presses it after restoring the waiting narrowing, and the reaction chip under the agent's message is never visible — `Locator.click: Timeout 30000ms exceeded` on `.lf-react[data-token="keep"]`, "element is not visible". Reading the card's `open` either side of the press: `True` before, `False` after. - `test_every_control_the_layer_offers_is_a_box_the_reader_can_hit` presses it after narrowing to Resolved, so `.lf-reopen` — the one control that arrangement exists to stand up — reads hidden and the aim sweep never reaches its own assertion. Each now asserts the retained disclosure where it used to press for it, so the contract is stated rather than depended on. A third case in the same family took the other half of its repair through #955, now on `main` — see below. **#932 reset the thread card's inherited top margin and dropped its chevron column.** `test_covering_threads_keeps_the_reader_and_their_work_inside` holds the thread list's raw `scrollTop` equal across the placement crossing, which reads as the reader's place only while the list can hold that offset at both placements — a covering sheet's list has a shorter scrollport than the strip beside the document, so the two have different scroll limits. With twelve comments the shorter cards left a list whose whole scrollable range was 63px covering and 17px beside, so the place the case established sat on the covering limit and the crossing clamped it to 85 where 131 was recorded. That is Chromium enforcing the lower limit, not the panel losing the reader's place. The repair states that premise instead of widening the reading. The fixture goes from twelve comments to twenty-four, which is what gives the place headroom at both placements — at twelve the guard fires immediately, `{'at': 36, 'limit': 36}`. `reading_place()` then takes the offset together with the list's own limit and fails at the arrangement unless the offset stands strictly inside it, and each crossing reads it on the placement it leaves *and* on the one it arrives at, because the arrival's limit is the one that can clamp. This replaces the `min(list_at, max_scroll)` clamp #945 put on the same assertion: the clamp settles the symptom, but it accepts whatever the limit imposes, so the crossing assertion can no longer fail and the case stops saying what its docstring says. Bug-backed by forcing a 600px offset before the second crossing — clear of the covering limit at 617, past the beside limit at 571 — which now fails at the arrangement (`the list holds no reading place clear of its limit: {'at': 571, 'limit': 571}`) rather than as `assert 571 == approx(600)`. ## What this leaves on `main` - **The quoted passage's shortcut line is the third retained-disclosure case, and #955 supplied its other half.** `test_a_comments_quoted_passage_is_in_the_keyboard_journey` pressed the card's summary after narrowing to Resolved on a 390px sheet, so — exactly as in the reactions and aim cases above — the press shut a card the narrowing kept open, the quote lost its box, and its command scope left the shortcut bar with it. This branch carries that case's `aria-pressed` hunk; #955 (`fc9d316e`) states the disclosure thirty lines away in the same function. Neither takes it green alone, and with both in it passes. - **#948's strip regression is fixed on `main` by #954** (`13e84e14`). `test_taking_the_panels_strip_leaves_the_reader_on_the_same_words` — the reader landing three paragraphs back when the strip arrives — passes there. Nothing here touches it. #952 tracks both cases with the per-commit evidence; its remaining half closes when this branch lands. - **#933's other stale receipt readings are unswept.** `tests/test_render_startup.py` alone names `.lf-receipt` on twenty-four lines, mostly as positive readings rather than count-zero guards, and `test_render_options.py`, `test_render_margin.py`, `test_render_conversations.py` and `test_render_export.py` carry more. `test_a_thread_says_what_the_agent_is_doing_about_it` and `test_a_work_line_says_when_its_claim_has_gone_quiet` both fail on this branch for the same missing element, and `test_the_thread_follows_the_decision_that_still_stands` reads the status filter as `Resolved` where #945 gave it the `Resolved (0)` count this branch already reads in `test_render_controls.py`. They are the same class of stale reading as the six here, but a separate sweep in files this branch does not touch: `main`'s own complete suite on `f4107f63` is the run that enumerates them, and it was still queued when this was written. ## Verification The four touched files run entire on the branch under `--run-nightly`, on the Linux CI runner, against the branch's own merge base `f4107f63`: `tests/test_render_anchors.py` at 93 passed, and `test_render_controls.py`, `test_render_navigation.py` and `test_render_reactions.py` together at 322 passed with two failures — `test_taking_the_panels_strip_leaves_the_reader_on_the_same_words` at `assert 'p8' == 'p11'` and `test_a_comments_quoted_passage_is_in_the_keyboard_journey` missing `return to the passage`. `main` has since moved to `13e84e14`, which settles both: this head merged with it takes those two cases green, along with `test_covering_threads_keeps_the_reader_and_their_work_inside`, whose placement crossings #954's transition reordering could have reached. The merge is clean. Every case this branch repairs on its own is green, and nothing else in those four files is stale. `pre-commit` passes on the changed files. A pull request runs the everyday gate, which reaches none of these files, so `ci` here says nothing about them. `main`'s own complete suite on the merge is the first automatic run that reads them. --------- Co-authored-by: leaf-agent <[email protected]>
Five nightly browser tests still assumed the thread card’s former custom accordion after its conversion to native
<details>. This updates focus to the native summary, opens collapsed cards before reading their contents or invoking their controls, and explicitly opens the next card after resolving the previous one.The chart test now checks the reader-visible outcome: a chart connected while the panel is closed becomes visible and matches its available width after the panel and card open. It removes the intermediate width/no-SVG assertion, which could pass before an open card finished drawing, and names the test after the outcome it actually verifies. No runtime code changes.
Validation: all five affected nightly browser cases pass locally. A mutation that prevents an initially hidden chart from scheduling its draw makes the chart case fail at the visible-SVG assertion.