Skip to content

test(samplesapp): Settle the shell layout guard on frames - #25647

Merged
Xiaoy312 merged 1 commit into
masterfrom
dev/xygu/20261022/shell-layout-guard-transitions
Oct 23, 2026
Merged

Xiaoy312 merged 1 commit into
masterfrom
dev/xygu/20261022/shell-layout-guard-transitions

Conversation

@Xiaoy312

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #25276

PR Type:

🏗️ Build or CI related changes (test infrastructure)

What changed? 🚀

Given_ShellLayout checks that every test leaves the runner's test host where it found it. On Android Skia group 3, that check fails in the cleanup of When_Focus_Mode_Exit_Button_Idles_It_Hides_Until_Activity in about half the builds (137 of 268 since 2026-10-09). The message is almost always The test host was at 963,80,637,0 and is now at 643,80,637,0. The test body passes every time.

Cause: when the SplitView's inline pane closes, its transition applies its KeyTime-0 frames at two different times:

  • The Grid.Column/ColumnSpan change (ObjectAnimationUsingKeyFrames) applies immediately.
  • The ContentTransform.TranslateX = OpenPaneLength frame (DiscreteDoubleKeyFrame) applies on the next CompositionTarget.Rendering.

So the host first sits at its final position, jumps +320 on the next frame, and then slides back. WaitForIdle doesn't wait for a frame. On the emulator, When_Browser_Toggled_Pane_And_Toggle_Follow_View_Model therefore passed its cleanup check on the first read, before the jump. The next test's [TestInitialize] then recorded the +320 frame as its baseline.

The less frequent When_Browser_Toggled_Pane_And_Toggle_Follow_View_Model Cleanup failures (baseline 644–687) are the same problem one test earlier: its baseline catches the end of the slide left by Given_ShellHomeView.When_Category_Card_Invoked_Browser_Opens_On_It.

Change: the guard now records and compares the test host only once its bounds have stayed the same for 3 rendered frames. Cleanup also waits until that steady position matches the baseline. The 3 s timeout is unchanged.

Validation:

  • Runtime (Skia desktop, Windows):
    • A throwaway probe closed the pane 12 times and read the host right after WaitForIdle. In 2 runs it read the final position before the jump.
    • In those 2 runs, the new helper's per-frame readings were 827, 827, 630, 565, 538, 520, 509, 507, 507, 507, 507, 507, settling at 507. The +320 position lasts two frames, which is why it waits for 3.
    • Given_ShellLayout plus the preceding Given_ShellHomeView test, 10 iterations each: 17/17 passed.
  • Not run locally: the Android emulator and the WinAppSDK head. The Android Skia group 3 lane is the real check.

The framework-side gap (KeyTime-0 frames of one storyboard not applying together across animation types) is left alone here. Changing it would need WinUI ground truth first.

PR Checklist ✅

🤖 Generated with Claude Code

WaitForIdle can return before the SplitView close transition renders its
first frame. The host then already sits at its final position, so the
cleanup guard passed at once, and the next test's TestInitialize recorded
the +320 frame that followed as its baseline.

Record and compare the test host only once it has held still for a few
rendered frames.

Fixes #25276

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Oct 22, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@mergify

mergify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@Xiaoy312
Xiaoy312 merged commit 82b7598 into master Oct 23, 2026
50 checks passed
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20261022/shell-layout-guard-transitions branch October 23, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SamplesApp shell: test-host guard records a pane transition frame

3 participants