Skip to content

Two browser tests fail since #6230 sent open_threads through the leaf's menu: lost selection, Threads tab outside the viewport #6239

Closed

Description

@leaf-agent

Three browser tests fail on main since #6230 (60f772078, "Have the On Me mark press Next On Me with its m, and say Working until the agent's line"). They pass locally at its parent f34db42c9 and fail at 60f772078 and at main 0aed5e727. CI first saw them in push run 43988963960 at b2ab51ef6; they passed in the previous push run at 36c650ed4.

  • tests/browser/navigation/test_key_scopes.py::test_a_close_request_takes_one_step_at_a_time, subtest "Escape takes the view and leaves the selection to back": after select_words(page, "#p"), open_threads(page) and one Escape, getSelection().toString() is '' (test_key_scopes.py:1843).
  • tests/browser/test_render_reactions.py::test_a_message_reaction_trigger_meets_its_header_and_covers_no_words[360-True] and [1440-False]: open_panel_thread → open_threads → threads_tab(page).click() times out after 120 s. Playwright resolves the Threads tab (.lf-fp-controls .lf-fp-filters button) but reports "element is outside of the viewport" on every retry, at both widths with a 740 px viewport.

#6230 moved the On Me list from the On Me mark to the On view's tab. In dev/leaf_dev/browser.py it replaced the mark press in threads_tab with on_view_tab, which reaches the On view by clicking the leaf (.lf-fp-leaf), so every open_threads now goes through the leaf's menu. Both failures sit on that route. Not yet established: whether pressing the leaf drops the page's selection, which would be a product regression for a user who selects words and then opens Threads, or whether only the test's order of steps changed. Also unknown is whether the menu's On view tabs land below the fold on PANEL_PAGE, which a pointer user would hit too. Reproduction should settle each before choosing between a runtime fix and a test fix.

Cause of a failure tracked in #3985.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    #6244 fixes the two test_render_reactions failures. The Threads tab was really out of reach, for pointer and touch users as well as for the test: the On view's tab strip keeps its min-content width, so a long agent name in the On ‹agent› tab made the strip 667 px wide inside a 340 px panel that clips it, and the strip never scrolled. #6244 caps the strip at the controls' width so it scrolls. Both parametrizations fail on main and pass with it. CI and landing are pending.

    The test_key_scopes subtest is still open. I don't have a fix I can defend yet.

    • Lost selection. Pressing the leaf opens the menu with focus in its search field (.lf-fp-search), and that field takes the page's selection. The On Me mark kept the selection because focus stayed on the mark. So any route through the leaf drops a selection. Have the On Me mark press Next On Me with its m, and say Working until the agent's line #6230 didn't change the menu; it only made every open_threads go through it.
    • Keyboard route. Opening Threads with g T (go_to_threads) instead keeps the selection. The subtest then passes every time when run alone. Run alongside two other browser tests, it failed 4 of 6 times, and adding panel_settled(view="threads") before Escape didn't change that. When it fails, focus is in the Threads view (.lf-fp-view[data-lf-route=threads]), but the dispatcher's Escape rows are composer.close and navigation.back. composer.close wins and calls dismissFab, which removes the selection while Threads stays open. When it passes, navigation.back is the only Escape row.

    Two things are still unknown. First, what opens the comment composer for the selection only under load. Second, whether composer.close should take Escape ahead of a focused panel view at all: browser/runtime/keyboard/AGENTS.md, "Escape", says page-side composers "coexist beside a view the floating panel opens, and focus decides which answers first". The next step is to log composerOpen changes and their stack in browser/runtime/composing/surface.js during a loaded run, then decide whether the ranking or the test's order of steps is wrong.

    Reproduction

    At main 2685a3205, with open_threads in the subtest replaced by go_to_threads(page):

    uv run pytest "tests/browser/navigation/test_key_scopes.py::test_a_close_request_takes_one_step_at_a_time" \
      "tests/browser/test_render_reactions.py::test_a_message_reaction_trigger_meets_its_header_and_covers_no_words" \
      "tests/browser/test_render_floating_panel.py::test_threads_grow_in_place_and_hold_news_until_asked" -q
    

    Run alone with -n0, it passes every time.

  3. leaf-agent commented on Nov 17, 2026

    @leaf-agent
    CollaboratorAuthor

    Both failures are resolved on main, so I'm closing this.

    Two things from the earlier investigation are product behavior, not test failures. They still apply on any route through the leaf:

    • Pressing the leaf focuses the menu's search field, and that clears a selection the user made on the page.
    • In the g T variant under load, composer.close took Escape ahead of a focused Threads view.

    No test on main exercises either one. I'm leaving them as observations rather than opening an issue.

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