Repository navigation
Closed
Labels
tend-ci-causeA root cause of a CI failure report
Description
The scheduled run 41432142330 records the following failing boundary. This is CI evidence, not a claim that the failure persists on current main or that its cause is established.
Reconcile current main, existing repairs and active work before reproducing. Diagnose the shared failing operation before choosing a fix; split ownership if reproduction establishes different mechanisms. Preserve the intended behavior from the originating changes and follow the repository’s focused verification, review and landing gates.
tests.browser.startup.test_keys::test_a_key_pressed_before_presentation_runs_once_the_page_presents[True-module] — Linux
browser = <render_harness.WatchedBrowser object at 0x7f8d8749b170>
serve = <function serve.<locals>.go at 0x7f8d84406160>, stage = 'module'
touch = True
@pytest.mark.parametrize("stage", ["module", "state"])
@pytest.mark.parametrize("touch", [False, True])
def test_a_key_pressed_before_presentation_runs_once_the_page_presents(
browser, serve, stage, touch
):
"""`t` walks threads the first state answer brings, so a press before presentation
is held, shown as held, and replayed into the presented page — whether the runtime
had not loaded or had loaded and not yet read the log."""
url = serve(HELD_KEYS_PAGE, events=[HELD_KEYS_THREAD])
page = browser.new_page(
viewport={"width": 390 if touch else 1200, "height": 900}, has_touch=touch
)
watched(page)
held, release = _hold_startup(page, stage)
page.goto(url, wait_until="commit")
holding(page, held, 1, f"the {stage} request")
if stage == "state":
page.wait_for_function("() => document.body.dataset.lfUpgraded === '1'")
expect(page.locator("#said")).to_be_visible()
page.keyboard.press("t")
echo = page.locator(".lf-held-keys")
expect(echo).to_be_visible()
expect(echo).to_contain_text("Page still loading")
expect(echo.locator("kbd")).to_have_text("t")
bounds = echo.bounding_box()
assert bounds and bounds["y"] >= 0
assert bounds["y"] + bounds["height"] <= page.viewport_size["height"], bounds
expect(page.locator("body")).not_to_have_attribute("data-lf-presented", "1")
release()
> expect(page.locator('[data-thread="held-thread"]').first).to_be_focused()
E AssertionError: Locator expected to be focused
E Actual value: inactive
E Call log:
E - Expect "to_be_focused" locator("[data-thread=\"held-thread\"]").first with timeout 120000ms
E - waiting for locator("[data-thread=\"held-thread\"]").first
E 238 × locator resolved to <div class="lf-fp-head" data-lf-thread-view="" data-thread="held-thread">…</div>
E - unexpected value "inactive"
E
E Aria snapshot:
E - button "Back to Threads"
E - heading "Walk to me." [level=2]
E - button "Show on page"
E - button "Resolve thread"
E - button "Close"
/home/runner/work/leaf/leaf/tests/browser/startup/test_keys.py:373: AssertionError
tests.browser.startup.test_keys::test_a_key_pressed_before_presentation_runs_once_the_page_presents[True-state] — Linux
browser = <render_harness.WatchedBrowser object at 0x7f7c283926f0>
serve = <function serve.<locals>.go at 0x7f7c241cbe20>, stage = 'state'
touch = True
@pytest.mark.parametrize("stage", ["module", "state"])
@pytest.mark.parametrize("touch", [False, True])
def test_a_key_pressed_before_presentation_runs_once_the_page_presents(
browser, serve, stage, touch
):
"""`t` walks threads the first state answer brings, so a press before presentation
is held, shown as held, and replayed into the presented page — whether the runtime
had not loaded or had loaded and not yet read the log."""
url = serve(HELD_KEYS_PAGE, events=[HELD_KEYS_THREAD])
page = browser.new_page(
viewport={"width": 390 if touch else 1200, "height": 900}, has_touch=touch
)
watched(page)
held, release = _hold_startup(page, stage)
page.goto(url, wait_until="commit")
holding(page, held, 1, f"the {stage} request")
if stage == "state":
page.wait_for_function("() => document.body.dataset.lfUpgraded === '1'")
expect(page.locator("#said")).to_be_visible()
page.keyboard.press("t")
echo = page.locator(".lf-held-keys")
expect(echo).to_be_visible()
expect(echo).to_contain_text("Page still loading")
expect(echo.locator("kbd")).to_have_text("t")
bounds = echo.bounding_box()
assert bounds and bounds["y"] >= 0
assert bounds["y"] + bounds["height"] <= page.viewport_size["height"], bounds
expect(page.locator("body")).not_to_have_attribute("data-lf-presented", "1")
release()
> expect(page.locator('[data-thread="held-thread"]').first).to_be_focused()
E AssertionError: Locator expected to be focused
E Actual value: inactive
E Call log:
E - Expect "to_be_focused" locator("[data-thread=\"held-thread\"]").first with timeout 120000ms
E - waiting for locator("[data-thread=\"held-thread\"]").first
E 241 × locator resolved to <div class="lf-fp-head" data-lf-thread-view="" data-thread="held-thread">…</div>
E - unexpected value "inactive"
E
E Aria snapshot:
E - button "Back to Threads"
E - heading "Walk to me." [level=2]
E - button "Show on page"
E - button "Resolve thread"
E - button "Close"
/home/runner/work/leaf/leaf/tests/browser/startup/test_keys.py:373: AssertionError
tests.browser.startup.test_keys::test_a_key_pressed_before_presentation_runs_once_the_page_presents[True-module] — macOS
browser = <render_harness.WatchedBrowser object at 0x1193d4e90>
serve = <function serve.<locals>.go at 0x11bc844a0>, stage = 'module'
touch = True
@pytest.mark.parametrize("stage", ["module", "state"])
@pytest.mark.parametrize("touch", [False, True])
def test_a_key_pressed_before_presentation_runs_once_the_page_presents(
browser, serve, stage, touch
):
"""`t` walks threads the first state answer brings, so a press before presentation
is held, shown as held, and replayed into the presented page — whether the runtime
had not loaded or had loaded and not yet read the log."""
url = serve(HELD_KEYS_PAGE, events=[HELD_KEYS_THREAD])
page = browser.new_page(
viewport={"width": 390 if touch else 1200, "height": 900}, has_touch=touch
)
watched(page)
held, release = _hold_startup(page, stage)
page.goto(url, wait_until="commit")
holding(page, held, 1, f"the {stage} request")
if stage == "state":
page.wait_for_function("() => document.body.dataset.lfUpgraded === '1'")
expect(page.locator("#said")).to_be_visible()
page.keyboard.press("t")
echo = page.locator(".lf-held-keys")
expect(echo).to_be_visible()
expect(echo).to_contain_text("Page still loading")
expect(echo.locator("kbd")).to_have_text("t")
bounds = echo.bounding_box()
assert bounds and bounds["y"] >= 0
assert bounds["y"] + bounds["height"] <= page.viewport_size["height"], bounds
expect(page.locator("body")).not_to_have_attribute("data-lf-presented", "1")
release()
> expect(page.locator('[data-thread="held-thread"]').first).to_be_focused()
E AssertionError: Locator expected to be focused
E Actual value: inactive
E Call log:
E - Expect "to_be_focused" locator("[data-thread=\"held-thread\"]").first with timeout 120000ms
E - waiting for locator("[data-thread=\"held-thread\"]").first
E 235 × locator resolved to <div class="lf-fp-head" data-lf-thread-view="" data-thread="held-thread">…</div>
E - unexpected value "inactive"
E
E Aria snapshot:
E - button "Back to Threads"
E - heading "Walk to me." [level=2]
E - button "Show on page"
E - button "Resolve thread"
E - button "Close"
/Users/runner/work/leaf/leaf/tests/browser/startup/test_keys.py:373: AssertionError
tests.browser.startup.test_keys::test_a_key_pressed_before_presentation_runs_once_the_page_presents[True-state] — macOS
browser = <render_harness.WatchedBrowser object at 0x10a253860>
serve = <function serve.<locals>.go at 0x10bb3a020>, stage = 'state'
touch = True
@pytest.mark.parametrize("stage", ["module", "state"])
@pytest.mark.parametrize("touch", [False, True])
def test_a_key_pressed_before_presentation_runs_once_the_page_presents(
browser, serve, stage, touch
):
"""`t` walks threads the first state answer brings, so a press before presentation
is held, shown as held, and replayed into the presented page — whether the runtime
had not loaded or had loaded and not yet read the log."""
url = serve(HELD_KEYS_PAGE, events=[HELD_KEYS_THREAD])
page = browser.new_page(
viewport={"width": 390 if touch else 1200, "height": 900}, has_touch=touch
)
watched(page)
held, release = _hold_startup(page, stage)
page.goto(url, wait_until="commit")
holding(page, held, 1, f"the {stage} request")
if stage == "state":
page.wait_for_function("() => document.body.dataset.lfUpgraded === '1'")
expect(page.locator("#said")).to_be_visible()
page.keyboard.press("t")
echo = page.locator(".lf-held-keys")
expect(echo).to_be_visible()
expect(echo).to_contain_text("Page still loading")
expect(echo.locator("kbd")).to_have_text("t")
bounds = echo.bounding_box()
assert bounds and bounds["y"] >= 0
assert bounds["y"] + bounds["height"] <= page.viewport_size["height"], bounds
expect(page.locator("body")).not_to_have_attribute("data-lf-presented", "1")
release()
> expect(page.locator('[data-thread="held-thread"]').first).to_be_focused()
E AssertionError: Locator expected to be focused
E Actual value: inactive
E Call log:
E - Expect "to_be_focused" locator("[data-thread=\"held-thread\"]").first with timeout 120000ms
E - waiting for locator("[data-thread=\"held-thread\"]").first
E 238 × locator resolved to <div class="lf-fp-head" data-lf-thread-view="" data-thread="held-thread">…</div>
E - unexpected value "inactive"
E
E Aria snapshot:
E - button "Back to Threads"
E - heading "Walk to me." [level=2]
E - button "Show on page"
E - button "Resolve thread"
E - button "Close"
/Users/runner/work/leaf/leaf/tests/browser/startup/test_keys.py:373: AssertionError
The full tracebacks are in that run’s pytest-results-* JUnit artifacts.
Cause of a failure tracked in #4225.
Metadata
Metadata
Assignees
Labels
tend-ci-causeA root cause of a CI failure report
Activity
leaf-agent commentedon Nov 4, 2026
Fix opened in #5350. The failure comes from the test, not the product. #5039 opens page threads in the floating panel on windows narrower than the rail room, so on the 390px touch window the held
tnow lands on the panel's thread view. The assertion took.firstof[data-lf-thread="held-thread"], and on a phone that resolves to the panel's head (.lf-fp-head), which never takes focus. The assertion now accepts the thread in the panel or in a margin card, as #5337 did for the 600px Threads test.On current main, both touch cases failed locally with the same
inactivemessage. All four cases pass with the change. The PR's CI and review will decide whether it lands.