You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_a_reply_notice_survives_a_failed_state_and_keeps_its_agent: unchanged write to the leaf menu's children since #6230, under a slow CPU #6259
tests/browser/test_render_pages.py::test_a_reply_notice_survives_a_failed_state_and_keeps_its_agent errors at teardown on main with the browser write watch's finding:
AssertionError: http://127.0.0.1:38993/: unchanged write: children of div.lf-fp-menu
The test body passes. clean_browser (tests/render_harness.py) then rejects a write that left the leaf menu's children (div.lf-fp-menu, rendered at browser/runtime/floating-panel.js, html\
…`) as they were. CI first showed it in [push run 44012703080](https://github.com/max-sixty/leaf/actions/runs/44012703080) on 7a55b0b. Earlier push runs at 0aed5e7andb2ab51e` passed it.
Reproduction. It depends on CPU speed. On fe402e39a (current main) it passes 5/5 at full speed and fails every time with --cpu-throttle 4:
uv run pytest "tests/browser/test_render_pages.py::test_a_reply_notice_survives_a_failed_state_and_keeps_its_agent" -n0 --cpu-throttle 4
Introducing change.git bisect run from 624c282d5 (good) to 0aed5e727 (bad), with two throttled runs per step, names #6230 (60f772078, "Have the On Me mark press Next On Me with its m…"). Its parent f34db42c9 passes. #6230 moved threads_tab in dev/leaf_dev/browser.py to on_view_tab, which reaches Threads by clicking the leaf, so every open_threads/open_panel_thread in this test now opens the leaf's menu. That makes this the third failure on #6230's route. #6239 tracks the first two (the lost selection, and the Threads tab outside the viewport that #6244 fixed). This one is a different mechanism, so it has its own issue.
Not yet established: which render writes the menu's children unchanged, and whether a user who opens the leaf menu while a state read lands (the test refuses and retries /api/state around then) triggers the same redundant write. In that case the fix belongs in the menu's render, not the test. The throttled reproduction above should show which write it is.
#6260 fixes this in the menu's render rather than the test. The menu drew its rows as an unkeyed list. When a row came or went while the menu was drawn, Lit rewrote each later position with its neighbour's row. It removed and recreated equal buttons and the rule, and moved the copy shortcut's element out and back, all in one paint (paintNow). That is the redundant write the watch reports, and a user who has the menu open while its rows change pays for it too. Keying the rows by their seat key makes Lit move rows instead.
The test failed in both throttled runs (--cpu-throttle 4) on main and passed in 3 of 3 with the change. The menu's own browser tests and test:runtime pass. PR CI and landing are pending.
Activity
leaf-agent commentedon Nov 17, 2026
#6260 fixes this in the menu's render rather than the test. The menu drew its rows as an unkeyed list. When a row came or went while the menu was drawn, Lit rewrote each later position with its neighbour's row. It removed and recreated equal buttons and the rule, and moved the copy shortcut's element out and back, all in one paint (
paintNow). That is the redundant write the watch reports, and a user who has the menu open while its rows change pays for it too. Keying the rows by their seat key makes Lit move rows instead.The test failed in both throttled runs (
--cpu-throttle 4) on main and passed in 3 of 3 with the change. The menu's own browser tests andtest:runtimepass. PR CI and landing are pending.