Skip to content

Fix intermittent UI test failures on Windows CI - #6

Merged
kylebavis merged 1 commit into
mainfrom
claude/windows-tests-dependabot-3cce24
Sep 19, 2026
Merged

kylebavis merged 1 commit into
mainfrom
claude/windows-tests-dependabot-3cce24

Conversation

@kylebavis

Copy link
Copy Markdown
Owner

What

RebuildSidebar now suppresses the sidebar load handler while it restores the cursor.

Why

The first load's UI callback moved the sidebar cursor, which started a second LoadEntriesAsync on a pool thread. That cleared _session.Entries while the UI thread was still reading it, so UI tests failed intermittently ("Terminal.Gui main loop faulted"). Windows CI on main was red since the Test.Sdk bump; the race predates it and reproduces locally.

Testing

  • New InitialLoad_FetchesEntriesOnce fails without the fix (2 loads) and passes with it.
  • UI suite: 25/25 clean runs after the fix (about 1 in 9 failed before).

The open Terminal.Gui 2.5.0 bump PRs fail for an unrelated reason (ConfigurationManager removed) and are not addressed here.

🤖 Generated with Claude Code

RebuildSidebar set the selection without suppressing the load handler,
so the first load triggered another that cleared the session's entries
while the UI thread was still reading them. This made the UI tests fail
intermittently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kylebavis
kylebavis merged commit 54e661f into main Sep 19, 2026
6 checks passed
@kylebavis
kylebavis deleted the claude/windows-tests-dependabot-3cce24 branch October 18, 2026 21:48
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