Skip to content

On me navigation leaves the reached suggestion unfocused #5152

Closed

Description

@leaf-agent

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.navigation.test_on_panel::test_m_lands_what_it_reaches_above_the_open_on_me_view — Linux
browser = <render_harness.WatchedBrowser object at 0x7f8d858d5f70>
serve = <function serve.<locals>.go at 0x7f8d851d5a80>

    def test_m_lands_what_it_reaches_above_the_open_on_me_view(browser, serve):
        """With On me open, `m` lands a suggestion the view would cover above the view,
        since every landing clears the panel's whole box rather than its row alone
        (base.css, `--lf-panel-reach`). The suggestion ends a paragraph whose start the
        arrival aligns, as the feature gallery's "A pencil is useful too." does; the asks
        after it fill the list, so the view stands most of the window tall."""
        filler = "".join(f"<p>Paragraph {n} of the release notes.</p>" for n in range(30))
        asks = "".join(
            f'<lf-ask id="ask-{n}"><h2>Question {n}</h2><lf-options id="pick-{n}" choose>'
            f'<lf-option id="yes-{n}">Yes</lf-option><lf-option id="no-{n}">No</lf-option>'
            "</lf-options></lf-ask>"
            for n in range(10)
        )
        page = open_page(
            browser,
            serve(
                leaf_page(
                    "Suggestions",
                    f"<h1>Suggestions</h1>{filler}"
                    '<p id="forms">'
                    + "".join(f"Line {n} of the packing list.<br>" for n in range(8))
                    + 'Bring a notebook.<lf-suggestion id="insert"><lf-new> A pencil is '
                    "useful too.</lf-new></lf-suggestion></p>"
                    f"{filler}{asks}",
                )
            ),
        )
        page.keyboard.press("g")
        page.keyboard.press("Shift+m")
        panel_settled(page, view="queue")
        card = page.locator(".lf-fp-card")
        suggestion = page.locator("#insert")
        page.keyboard.press("m")
>       expect(suggestion).to_be_focused()
E       AssertionError: Locator expected to be focused
E       Actual value: inactive 
E       Call log:
E         - Expect "to_be_focused" locator("#insert") with timeout 120000ms
E         - waiting for locator("#insert")
E           243 × locator resolved to <lf-suggestion id="insert" data-lf-done="1" data-lf-inline="" data-lf-awaits="" aria-keyshortcuts="1 2" data-lf-content="members">…</lf-suggestion>
E               - unexpected value "inactive"
E       
E       Aria snapshot:
E       - text: proposed insertion A pencil is useful too.

/home/runner/work/leaf/leaf/tests/browser/navigation/test_on_panel.py:1077: AssertionError
tests.browser.navigation.test_on_panel::test_m_lands_what_it_reaches_above_the_open_on_me_view — macOS
browser = <render_harness.WatchedBrowser object at 0x118f3a750>
serve = <function serve.<locals>.go at 0x11c20fa60>

    def test_m_lands_what_it_reaches_above_the_open_on_me_view(browser, serve):
        """With On me open, `m` lands a suggestion the view would cover above the view,
        since every landing clears the panel's whole box rather than its row alone
        (base.css, `--lf-panel-reach`). The suggestion ends a paragraph whose start the
        arrival aligns, as the feature gallery's "A pencil is useful too." does; the asks
        after it fill the list, so the view stands most of the window tall."""
        filler = "".join(f"<p>Paragraph {n} of the release notes.</p>" for n in range(30))
        asks = "".join(
            f'<lf-ask id="ask-{n}"><h2>Question {n}</h2><lf-options id="pick-{n}" choose>'
            f'<lf-option id="yes-{n}">Yes</lf-option><lf-option id="no-{n}">No</lf-option>'
            "</lf-options></lf-ask>"
            for n in range(10)
        )
        page = open_page(
            browser,
            serve(
                leaf_page(
                    "Suggestions",
                    f"<h1>Suggestions</h1>{filler}"
                    '<p id="forms">'
                    + "".join(f"Line {n} of the packing list.<br>" for n in range(8))
                    + 'Bring a notebook.<lf-suggestion id="insert"><lf-new> A pencil is '
                    "useful too.</lf-new></lf-suggestion></p>"
                    f"{filler}{asks}",
                )
            ),
        )
        page.keyboard.press("g")
        page.keyboard.press("Shift+m")
        panel_settled(page, view="queue")
        card = page.locator(".lf-fp-card")
        suggestion = page.locator("#insert")
        page.keyboard.press("m")
>       expect(suggestion).to_be_focused()
E       AssertionError: Locator expected to be focused
E       Actual value: inactive 
E       Call log:
E         - Expect "to_be_focused" locator("#insert") with timeout 120000ms
E         - waiting for locator("#insert")
E           2 × locator resolved to <lf-suggestion id="insert" data-lf-done="1" data-lf-inline="" data-lf-awaits="" data-lf-obligation="1" aria-keyshortcuts="1 2" data-lf-content="members">…</lf-suggestion>
E             - unexpected value "inactive"
E           239 × locator resolved to <lf-suggestion id="insert" data-lf-done="1" data-lf-inline="" data-lf-awaits="" aria-keyshortcuts="1 2" data-lf-content="members">…</lf-suggestion>
E               - unexpected value "inactive"
E       
E       Aria snapshot:
E       - text: proposed insertion A pencil is useful too.

/Users/runner/work/leaf/leaf/tests/browser/navigation/test_on_panel.py:1077: AssertionError

The full tracebacks are in that run’s pytest-results-* JUnit artifacts.

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 3, 2026
  2. leaf-agent commented on Nov 3, 2026

    @leaf-agent
    CollaboratorAuthor

    #5039 caused this. Since that change, opening On me with a key selects its first row. That row counts as standing on its obligation, so the next m steps on to the second item instead of landing on the first. The same change broke test_on_me_stays_over_only_the_items_it_lists, which #5153 and #5154 tracked before both closed as duplicates of each other. A bisect over cc5df725e..72afa89ec found #5039 as the first bad commit, and both tests still failed on current main.

    #5198 updates both tests to the new behaviour. It also fixes a comment in the obligation-walk test that described the old start. The two failing tests pass with it locally, and its CI is running now. Whether m should step past a row that a key-opened view selected is still a product question, so #5199 asks the maintainer to decide.

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