Skip to content

fix(planning): ui.test.sh phone keyboard-up checks flake on a loaded test-bash leg #10492

Closed

Description

@kyle-sexton

Problem

plugins/planning/shared/tests/ui.test.sh failed main's post-merge verify in run 40542589182 (test-bash (0), 16:45Z 2026-10-27). The commits in that range (#10301, #10485) do not touch plugins/planning/, and the run before it on main passed, so this reads as a flake under a loaded leg (UNVERIFIED: not reproduced).

Failing assertions, from the job log:

FAIL 390x844, 20+ messages, at the newest: with the keyboard up the newest message is whole above the field  [201 px below the list's bottom edge, visual viewport 508]
FAIL 390x844, keyboard up: typing 3 lines keeps the newest message in view  [247 px below the list's bottom edge, visual viewport 508]
FAIL 390x844, keyboard up: a message that arrives shows whole above the field  [285 px below the list's bottom edge, visual viewport 508]

All three are the phone keyboard-up viewport checks; a likely cause (UNVERIFIED) is that the position is measured before the list finishes scrolling to the newest message.

Acceptance criteria

  • The keyboard-up checks wait on the list's scroll settling (or the newest message's bounding box) instead of a fixed delay before measuring.
  • ui.test.sh passes 10 consecutive runs on a test-bash leg.
  • scripts/check-changelog-fragments.sh --check-required origin/main exits 0.

Refs: #10466 (same pattern in surface-ui-c), #10446.

Activity

  1. added
    needs-triage
    on Oct 27, 2026
  2. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    I understood this as a flaky failure of three 390x844 keyboard-up checks in ui.test.sh, seen on one post-merge run of main. The next main run passed, so main isn't red now. A later comment on this issue says merged fix #10490 addressed the cause in the page itself, not in the test's wait. If so, nothing is left to do here. If the checks fail again on a head after that merge, a new issue with the failing run would help. I found no duplicates among the open issues.

    Automated triage, applied by the lanes App.

  3. removed
    needs-triage
    on Oct 27, 2026
  4. added
    status: ready
    needs-owner-decision
    and removed
    status: ready
    on Oct 27, 2026
  5. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: its done-when asks for what an unattended lane run cannot perform: item 2 (a repeated run: "ui.test.sh passes 10 consecutive runs on a test-bash leg."); recommended split: keep the other items here as the admissible issue and move these to a needs-human child issue. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  6. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: needs-decision; its comment says why.

  7. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: The three phone keyboard-up checks in ui_chat.js stop flaking on a loaded test-bash leg, with the cause confirmed first.

    Open questions

    1. The three failing checks are in plugins/planning/shared/tests/ui_chat.js:177-182, not ui.test.sh, and they already poll with until(..., 3000) instead of a fixed delay. So is the cause a too-short 3000 ms timeout, or a real page bug where the list does not re-scroll after the simulated keyboard resize?
      RECOMMENDED: Treat the cause as unconfirmed. Have the run first raise the newest() timeout, and wait on atRest (ui_chat.js:51) before measuring, and also check whether the page re-pins the list to the newest message after a visualViewport resize. Basis: plugins/planning/shared/tests/ui_chat.js:169-182
    2. The gaps were 201, 247 and 285 px, which are far off, and the first check also requires kiaStill, which the log does not say failed. Should the criterion be a timeout and settle-wait change only, or may the run also change the page's scroll-to-newest code if the test change alone does not fix it?
      RECOMMENDED: Allow a page fix only if the test change cannot make the checks pass, and require the PR to say which one it was. Basis: judgment
    3. Is the title's ui.test.sh the right place to look? The failing text lives in ui_chat.js and ui_layout.js has a similar keyboard helper (ui_layout.js:46). Should #​10466's surface-ui-c fix share one helper?
      RECOMMENDED: Fix ui_chat.js only in this issue and leave a shared helper to #​10466 or #​10446, so the two do not collide. Basis: judgment

    Sources read

    • plugins/planning/shared/tests/ui_chat.js:169-182: the newest() helper already polls with until(..., 3000) and where() reports the gap only after that poll fails
    • plugins/planning/shared/tests/ui_chat.js:50-59: atRest waits for scrollTop to hold for 250 ms but is not used before these checks
    • plugins/planning/shared/tests/browser_harness.js:114: until wraps page.waitForFunction and defaults to 8000 ms

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  8. kyle-sexton commented on Oct 28, 2026

    @kyle-sexton
    MemberAuthor

    Re-triage. Merged work supersedes this issue, so it closes as completed.

    #10490 (merge a8d71de632, 2026-10-27 21:22Z) fixed the cause of these three failures: the 390x844 keyboard-up checks in ui_chat.js, with the newest message 201, 247 and 285 px below the list's bottom edge. The cause was a race in the page, not the test's wait. web/app.js read the pin's own delayed scroll event as the reader scrolling away. That cleared mStick, and the list stayed unpinned for the rest of the keyboard steps. The PR shows a longer wait cannot fix it, since newest() already polls for 3 s.

    This issue's failure (run 40542589182, 16:45Z) predates that merge. No keyboard-up flake has been reported since. So the first criterion (wait on scroll settling) is superseded by the page fix, and the 10-run criterion has no remaining defect to prove. If the checks fail again on a head after a8d71de632, file a new issue with that run.

  9. removed
    needs-owner-decision
    on Oct 28, 2026
  10. github-actions commented on Oct 28, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 1 of 2).

  11. added
    status: ready
    needs-owner-decision
    and removed
    status: ready
    on Oct 28, 2026
  12. kyle-sexton commented on Oct 31, 2026

    @kyle-sexton
    MemberAuthor

    Reopening. The 10-run criterion was never run. One 10-run pass on a host clears it.

  13. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Closing as completed: 10 recorded host passes of the UI part-a suite, each exit 0 with ui_chat.js 60 passed, 0 failed (Issue Triage session runs on 2026-11-01, sequential on one WSL host, at origin/main 83bb8be, which contains #10490's page fix).

    Command: bash plugins/planning/shared/tests/ui-a.test.sh (ui_chat.js runs in part a per plugins/planning/shared/tests/ui-parts.txt:9; ui.test.sh was split into ui-a/b/c by #10928).

    • Runs 2-10: 03:54Z to 04:39Z, each exit 0, fails=0, ui_chat 60/60.
    • Run 11: ended 05:00Z, exit 0, ui_chat 60/60, every other ui_* file 0 failed.

    Criterion 1 is superseded by #10490's page fix (comment 6483104739); criterion 3 needs no change. Host runs, not a CI test-bash leg.

  14. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Closing on the 10 recorded passes in the comment above.

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

    needs-owner-decision

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions