Skip to content

Fix three nightly failures: margin preview spacing, a hidden panel filter, and the export preparation wait - #676

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-34752912213
Sep 13, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-34752912213

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The scheduled complete-suite ci run 34752912213 on e2ebdcb came back 3 failed, 2573 passed. All three reproduce on that commit under -n0 with the repository's browser, and all three pass here. They have separate causes, so each is described on its own.

The margin preview's opening message stood 36px under its subject

test_the_margin_groups_meanings_at_one_destination_without_moving_the_page asserts the card's head and the conversation it heads read as one group: messageHead.top - head.bottom < 24. The reading was 36.

That gap is the preview list's margin-top (16px), the thread's resting padding (4px) and the first message's own margin-top (16px). The last of those is not supposed to be there — .lf-margin-thread .lf-conversation-msg:first-child exists to collapse it. It has been inert since a thread carrying its settlement action grew a .lf-thread-head, which takes the first child slot and leaves the opening message matching nothing. The rule had no visible cost while a message's margin was 8px, because 10 + 4 + 8 cleared the contract by two pixels; #671's calmer rhythm raised the list inset to 16 and the message margin to 16, and the dormant rule showed.

Addressing the message by type rather than by position is what the sibling rules in this area already do — theme.css and chrome.css both reach the opening message as .lf-conversation-msg:first-of-type for this same reason. .lf-thread-head is a <header> and the messages are <div>s, so the selector lands on the opening message with or without a settlement action.

A nightly case pressed a filter the panel now folds away

#671 moved the thread filters behind a Filters disclosure: filterControls.hidden = true in panel-elements.js. Its test updates opened the disclosure everywhere the everyday gate runs, and everywhere in test_render_conversations.py it touched — but test_panel_settlement_moves_focus_with_optimistic_state_and_restores_a_refusal still pressed [data-filter-value="resolved"] directly, and waited thirty seconds on a button that is never visible. The case now opens the disclosure first, as the cases around it do.

Export preparation outlived the patience its wait was given

test_an_exported_page_fixture_stands_on_its_own[corpus] failed with v1.html could not read its browser state or probe module. The probe module was loaded and the reading was already true; the page simply could not answer.

prepareExport returns as soon as it has started work, and that work is proportional to the document: every fragmented widget materializes the payloads it has been holding, and the corpus's diff loads and highlights every manifest entry. Measured here, the page's main thread is occupied for about 41 seconds afterwards — a single page.evaluate issued into it returns only when that finishes — so no rAF fires, no timer runs, and nothing Playwright polls on can be delivered. The exportPrepared wait carried SERVED_TIMEOUT_MS, 30 seconds, and expired inside that window.

This is not a regression in the preparation itself. Before #664 the same work was awaited inside a single page.evaluate, which has no deadline; #664 replaced it with a synchronous probe plus a polled readiness wait, which put the shared readiness patience around unbounded work for the first time. git bisect names 70977079 as the first commit where this case fails, and the last nightly before it recorded the corpus export at 78.52s and green.

The wait now takes a budget the export states for it, next to the call and with the reason beside it. wait_for_probe gained a timeout_ms keyword; every other caller keeps the shared patience, which is right for a reading that arrives once the page settles.

Verification

All three failing cases pass, and the files that own the surfaces the diff touches are green.

Runs on this branch
$ uv run pytest tests -q
4 failed, 1039 passed, 3 skipped in 203.78s

$ uv run pytest tests/test_render_margin.py tests/test_render_conversations.py \
    tests/test_render_export.py -q -n 2 --run-nightly
3 failed, 242 passed in 635.29s

$ uv run pytest tests/test_render_drafts.py tests/test_render_navigation.py \
    tests/test_render_projection.py -q -n 2 --run-nightly
328 passed in 477.05s

$ uv run pre-commit run --files <the four changed files>
Passed

The failures in those two runs are this container's, not the branch's, and each reproduces on e2ebdcb with the diff stashed: test_the_stated_host_wildcard_serves_both_families needs IPv6, three test_interact_* cases need a writable /tmp and a permissive umask, and test_the_example_preview_command_exports_a_file_that_opens_on_its_own and test_exporting_an_example_leaves_the_live_preview_untouched need a Chrome this sandbox cannot launch as a subprocess. None of them is in the failing run. One conversation case failed once under -n 2 on a thread count and passed on its own; it is unrelated to the diff, which changes one vertical margin.

$ uv run pytest tests/test_render_conversations.py -q -n0 --run-nightly -k "resolve or settle"
21 passed, 57 deselected in 103.81s

…lter, and the export preparation wait

The scheduled complete-suite run on main came back red with three failures, all
reproducible on the merge base with `-n0`.

The margin preview's opening message sat 36px under the card's subject, past the
24px that case names. `.lf-margin-thread .lf-conversation-msg:first-child` was
written to collapse that margin but has been inert since a thread grew a
`.lf-thread-head`, which now holds the first child slot; the wider conversation
rhythm made the dormant rule visible. Addressing the message by type restores it.

The panel's filters now disclose on demand, so a nightly case pressing Resolved
directly waited on a hidden button. It opens the disclosure first, as the cases
around it already do.

Export preparation stopped being a probe the page could answer. It materializes
every held payload — on the corpus that occupies the page's main thread for
around forty seconds — and the wait behind it carried the shared thirty-second
readiness patience, so the export exited claiming it could not read the page's
probe module. The wait now takes a budget the export states for it.
@max-sixty
max-sixty merged commit 7b75688 into main Sep 13, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-34752912213 branch September 13, 2026 15:29
max-sixty added a commit that referenced this pull request Sep 17, 2026
…ruled out (#768)

The cutover list scored its candidates from a survey's estimates. Six of
the rows ranked next were measured against the code, and every one was
stale or overstated; an independent review then confirmed the six
verdicts and corrected three of the reasons behind them. The rows now
carry what was measured, and the ones the measurements ruled out have
moved to the survey note, whose table is now named Rejected.

What the measurements found:

- **`html` as the page scroller** was already done: `26feec8b` made the
switch on 2026-08-29, `theme.css` holds the rule, and the runtime reads
`document.scrollingElement`. The row is gone.
- **Same-document View Transitions** claimed ~150 lines against a
`motion.js` of 87. The update applies after the old state is captured,
later than the gesture's own turn; pointer input misses the page while
it animates; a fold collapses height so later content slides, which a
root cross-fade does not draw; and board cards move inside their own
scroller, whose clip a snapshot escapes under the Chrome 125 floor. #666
removed the paint-boundary transition version travel used, which also
leaves `theme.css`'s `lf-versioning` rule dead — deleted here.
- **idiomorph for the version patch**: a live-tree diff keeps only the
reader state an exclusion names, while `dom-children.js` compares
authored source with authored source and keeps all of it. It has needed
no fix since #514 split it out.
- **`tsc --checkJs`** runs in under a second, but a bug-back over six
runtime fixes (#404, #448, #625, #660, #676, #757) found no error that
the fix removed from the files it touched, and the errors it does report
are inference artifacts.
- **Browser-owned anchoring** was spiked on `agent-a4111d25e33d466d2`.
All three capture paths cut over and the anchors matched the Python
capture exactly, but Python grew by 168 lines, a quoted `leaf comment`
went from 0.2 s to 1.3 s and now needs Chrome, and the anchor tests went
from 8 s to 37 s: the refusals and the diagnostics for a quote the page
does not show read authored source the rendered page no longer holds.
- **The user-level daemon** nets roughly zero lines. The browser already
receives pushes over `EventSource`, the 70 µs stat loop serves CLI
writers in other processes, pid probing and most locks stay, Windows is
not a goal, and a user-level database stops the page directory being the
deployment unit.

Two rows are new. A size-first sweep of the largest hand-written
mechanisms found one candidate the defect-led survey missed: serving
each page through starlette and uvicorn, which `mcp` already installs,
keeping one process per page. And the keyboard system becomes item #24
under architecture simplification: the reader keeps every key, sequence,
hint, and the one-press-per-layer Escape, while the code that infers
which surfaces are open — where ten of the last 24 keyboard fixes landed
— gives way to a layer stack that openers push and closes pop. No
library owns that; the ones that came closest are in Rejected.

The preamble now says effort and confidence are estimates unless a row
cites a measurement.

Checks: the everyday suite (1,135) and
`test_a_revision_navigates_without_the_view_transition_api`, which
exercises activation with the View Transition API switched off, both
pass; pre-commit is green on the changed files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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