Skip to content

Command reference tests cannot find the thread resolution command #5076

Closed

Description

@leaf-agent

Push run 41395985405, at 5d7e533eb225, records the following failures.

Both cases wait for .lf-command-reference-command[data-lf-command="thread.resolution.toggle"] and find no element. Determine whether the command contract changed or the reference omits a reachable action.

  • tests.browser.navigation.test_command_reference::test_the_reference_runs_available_commands_and_explains_the_rest: AssertionError: Locator expected to have count '1' Actual value: 0 Call log: - Expect "to_have_count" locator(".lf-command-reference").locator(".lf-command-reference-command[data-lf-command="thread.resolution.toggle"]") with timeout 120000ms - waiting for locator(".lf-command-reference").locator(".lf-command-reference-command[data-lf-command="thread.resolution.toggle"]") 243 × locator resolved to 0 elements - unexpected value "0"
  • tests.browser.navigation.test_command_reference::test_the_reference_keeps_local_search_state_on_one_lit_surface: AssertionError: Locator expected to have attribute 'true' Actual value: None Error: element(s) not found Call log: - Expect "to_have_attribute" locator(".lf-command-reference").locator(".lf-command-reference-command[data-lf-command="thread.resolution.toggle"]") with timeout 120000ms - waiting for locator(".lf-command-reference").locator(".lf-command-reference-command[data-lf-command="thread.resolution.toggle"]") Aria snapshot: - main: - heading "Noted" [level=1] - paragraph: The first passage under discussion, with words enough for two separate remarks to land in it. - paragraph: A short second passage. - figure "A figure, f
Representative failing boundary
DOM, which is both the visual order and the Arrow-key command rail. A
        # trailing separator asks for continuations, and case puts the shifted face first.
        search.fill("g ")
        ranked = help_el.locator("[role=row][data-lf-command]:visible").evaluate_all(
            """rows => rows.map(row => ({
              command: row.dataset.lfCommand,
              binding: [...row.querySelectorAll('kbd')].map(key => key.textContent).join(' '),
            }))"""
        )
        assert ranked and ranked[0]["binding"].startswith("g "), ranked
        first_other = next(
            (
                index
                for index, row in enumerate(ranked)
                if not row["binding"].startswith("g ")
            ),
            len(ranked),
        )
        assert first_other > 0, ranked
        assert not any(row["binding"].startswith("g ") for row in ranked[first_other:]), (
            ranked
        )
        search.fill("g t")
        assert (
            help_el.locator("[role=row][data-lf-command]:visible").first.get_attribute(
                "data-lf-command"
            )
            == "navigation.target.filter.threads"
        )
        search.fill("g T")
        assert (
            help_el.locator("[role=row][data-lf-command]:visible").first.get_attribute(
                "data-lf-command"
            )
            == "navigation.panel.threads"
        )
        page.keyboard.press("ArrowDown")
        expect(
            help_el.locator(
                '.lf-command-reference-command[data-lf-command="navigation.panel.threads"]'
            )
        ).to_have_attribute("data-lf-selected", "true")
        expect(help_el.locator(".lf-command-reference-meta")).to_have_text(
            "Threads · g · ⏎ activate"
        )
        search.fill("Tab")
        tab_matches = help_el.locator(
            ".lf-command-reference-binding-matches [role=row][data-lf-command]:visible"
        ).evaluate_all("rows => rows.map(row => row.dataset.lfCommand)")
        assert "page.search.match.next" in tab_matches, tab_matches
        search.fill("w")
        w_results = help_el.locator("[role=row][data-lf-command]:visible").evaluate_all(
            "rows => rows.map(row => row.dataset.lfCommand)"
        )
        assert w_results.index("draw.mode.exit") < w_results.index("page.down"), w_results
        w_matches = help_el.locator(
            ".lf-command-reference-binding-matches [role=row][data-lf-command]:visible"
        ).evaluate_all("rows => rows.map(row => row.dataset.lfCommand)")
        assert "draw.mode.exit" in w_matches, w_matches
        assert w_results.index("page.down") >= len(w_matches), w_results
    
        search.fill("r resolve")
        result = help_el.locator(
            '.lf-command-reference-command[data-lf-command="thread.resolution.toggle"]'
        )
>       expect(result).to_have_count(1)
E       AssertionError: Locator expected to have count '1'
E       Actual value: 0 
E       Call log:
E         - Expect "to_have_count" locator(".lf-command-reference").locator(".lf-command-reference-command[data-lf-command=\"thread.resolution.toggle\"]") with timeout 120000ms
E         - waiting for locator(".lf-command-reference").locator(".lf-command-reference-command[data-lf-command=\"thread.resolution.toggle\"]")
E           243 × locator resolved to 0 elements
E               - unexpected value "0"

/home/runner/work/leaf/leaf/tests/browser/navigation/test_command_reference.py:396: AssertionError

This session read the CI evidence but ran no local reproduction. Reconcile current main, later repairs and active work first; reproduce the focused boundary and read the introducing change’s intent before choosing a repair. Preserve the user behavior, and distinguish a stale test contract from a product regression. A passing attempt alone does not retire an intermittent failure.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions