Skip to content

Fix C8R many-tab UIA selection - #935

Merged
coneilen merged 1 commit into
mainfrom
coneilen-fix-c8r-many-tabs-shell
Oct 26, 2026
Merged

coneilen merged 1 commit into
mainfrom
coneilen-fix-c8r-many-tabs-shell

Conversation

@coneilen

Copy link
Copy Markdown
Collaborator

Summary

Fix the C8R s-tabs-many-first failure by deriving the actual contiguous visible tab roster and using an exact stable-ID bridge before reacquiring and selecting the first tab. The product/provider contract is unchanged: hidden overflow tabs remain unpublished, tab names and IDs remain exact, and tab rows do not claim the sidebar-only ScrollItem pattern.

Changes

  • Derive visible tab indexes from owned stable AutomationIds instead of assuming a ten-tab window.
  • Bridge through the nearest visible tab edge, reacquire the UIA roster, and invoke the exact requested tab ID without extending action deadlines.
  • Preserve strict refusal coverage for missing, foreign, duplicate, out-of-order, misnamed, wrongly selected, offscreen, and genuinely unavailable elements.
  • Record the exact failed lease/job/manifest/fixture evidence in the matched-tab contract and document the overflow route.

Test plan

RED: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -MatchedScenarioContractOnly -ScratchRoot .build\c8r-many-tabs-red2 -> 6/8; s-tabs-many-first failed UIA element 'Shell' did not become available before the reserved deadline.
GREEN: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -MatchedScenarioContractOnly -ScratchRoot .build\c8r-many-tabs-green5 -> 8/8 passed.
REGRESSION: UiCaptureDriver D:\gcf3; real-zmx D:\gcr3; ValidationRunner; validate.ps1 -Task hardening -> 182/182, 185/185, 166/166 plus nested 182/182, and hardening 3/3 passed; no capture or lease used.

Additional checks:

  • PowerShell parser passed for all changed scripts.
  • git diff --check passed.
  • git ls-files --eol reported LF for all changed files.
  • The real-zmx run used immutable C:\e8\runtime\zmx.exe SHA-256 65E585375017EB2344655DAF2014AE8B6C5015923A0B3803C3890C83D4A1F702.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

make test and make check are macOS gates and were not run for this Windows-only capture-tooling change; the Windows validation matrix above passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen merged commit 5f7d579 into main Oct 26, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant