Skip to content

[UI Tests] Give Quick Accent scroll checks time on slow agents - #51346

Merged
Yu Leng (moooyo) merged 1 commit into
mainfrom
crutkas-quick-accent-scroll-wait-flake
Oct 16, 2026
Merged

Yu Leng (moooyo) merged 1 commit into
mainfrom
crutkas-quick-accent-scroll-wait-flake

Conversation

@crutkas

Copy link
Copy Markdown
Member

Summary of the Pull Request

Stabilizes the Quick Accent ScrollbarSpacingAppearsOnlyForOverflowingCharacterLists UI test, which timed out in CI build 391160 (Test x64Win10 Release) on a PR that only changed csproj settings, so the flakiness was already there.

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

The failure message was:

Keyboard navigation did not scroll the selected character into view. Viewport X=100, width=1720; selected last item X=1779, width=34; first item X=108 -> 0.

That last observed state already satisfies the geometry check (the last item spans 1779..1813, inside the 100..1820 viewport, and the first item has scrolled away). So the wait ran out of time; the UI was not wrong. In AssertKeyboardNavigationScrollsIntoView, every poll runs three winappcli UIA lookups (the viewport Find plus two FindCharacterItem calls). On CI agents each lookup can take seconds (other logs show winappcli slow call 4864ms), so 5 s with 3 consecutive matches leaves room for only one or two polls.

Changes, all in PowerAccentTestHelper.cs:

  • The scroll-forward wait and the return-navigation wait now share a ScrollIntoViewTimeoutMs of 15 s instead of 5 s, and need 2 consecutive matches instead of 3. Because the predicate still requires a selected item that is fully inside the viewport, 2 matches is enough to confirm the layout is stable.
  • Failure details now report Selected for the checked item, the width of the first item, and how many consecutive matches were reached. With that, the next failure will show whether selection lagged, whether the off-screen item reported an empty rect (X=0 means a virtualized or empty-rect peer, which still passes the < initialFirstX - 1 check), or whether the wait simply timed out.

No product code changed.

Validation Steps Performed

  • tools\build\build.ps1 -Platform x64 -Configuration Release '/restore' from src\modules\poweraccent\PowerAccent.UITests: passed, exit 0, 0 warnings, 0 errors (warnings are treated as errors).
  • I did not run the UI test locally. It needs an interactive desktop and installed PowerToys bits, so CI will exercise it.

Raise the keyboard-navigation scroll waits from 5s to 15s with 2 consecutive matches; each poll runs several slow winappcli UIA searches on CI. Include Selected, widths and match count in failure details. Seen in CI build 391160.
@crutkas Clint Rutkas (crutkas) added the Product-Quick Accent Refers to the Quick Accent PowerToy label Oct 15, 2026
@github-actions

Copy link
Copy Markdown

🧭 PR intake

Visual evidence: Not needed — The changed files do not indicate a visible UI change. No visual evidence is expected.

Recommendation

Link the issue this PR fixes using a closing keyword such as Closes #123.

✅ Ready for review

This PR passed the automated intake checks and is ready for maintainer review.

Automated PR intake; PowerToys maintainers make final decisions.

@moooyo
Yu Leng (moooyo) merged commit 8ecd599 into main Oct 16, 2026
13 checks passed
@moooyo
Yu Leng (moooyo) deleted the crutkas-quick-accent-scroll-wait-flake branch October 16, 2026 09:32
Boliang Zhang (LegendaryBlair) pushed a commit that referenced this pull request Oct 19, 2026
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

Stabilizes the Quick Accent
`ScrollbarSpacingAppearsOnlyForOverflowingCharacterLists` UI test, which
timed out in [CI build
391160](https://microsoft.visualstudio.com/Dart/_build/results?buildId=391160)
(Test x64Win10 Release) on a PR that only changed csproj settings, so
the flakiness was already there.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

The failure message was:

```
Keyboard navigation did not scroll the selected character into view. Viewport X=100, width=1720; selected last item X=1779, width=34; first item X=108 -> 0.
```

That last observed state already satisfies the geometry check (the last
item spans 1779..1813, inside the 100..1820 viewport, and the first item
has scrolled away). So the wait ran out of time; the UI was not wrong.
In `AssertKeyboardNavigationScrollsIntoView`, every poll runs three
winappcli UIA lookups (the viewport `Find` plus two `FindCharacterItem`
calls). On CI agents each lookup can take seconds (other logs show
`winappcli slow call 4864ms`), so 5 s with 3 consecutive matches leaves
room for only one or two polls.

Changes, all in `PowerAccentTestHelper.cs`:
- The scroll-forward wait and the return-navigation wait now share a
`ScrollIntoViewTimeoutMs` of 15 s instead of 5 s, and need 2 consecutive
matches instead of 3. Because the predicate still requires a selected
item that is fully inside the viewport, 2 matches is enough to confirm
the layout is stable.
- Failure details now report `Selected` for the checked item, the width
of the first item, and how many consecutive matches were reached. With
that, the next failure will show whether selection lagged, whether the
off-screen item reported an empty rect (X=0 means a virtualized or
empty-rect peer, which still passes the `< initialFirstX - 1` check), or
whether the wait simply timed out.

No product code changed.

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

- `tools\build\build.ps1 -Platform x64 -Configuration Release
'/restore'` from `src\modules\poweraccent\PowerAccent.UITests`:
**passed**, exit 0, 0 warnings, 0 errors (warnings are treated as
errors).
- I did not run the UI test locally. It needs an interactive desktop and
installed PowerToys bits, so CI will exercise it.

(cherry picked from commit 8ecd599)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Quick Accent Refers to the Quick Accent PowerToy Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants