Uh oh!
There was an error while loading. Please reload this page.
Fix flaky render snapshot tests caused by blinking caret - #943
Merged
Conversation
Pass fDrawSel: false when capturing render-verification bitmaps. The view's insertion-point caret blinks on a 500ms timer, so drawing the selection captured the caret non-deterministically and caused flaky pixel diffs. Regenerate the affected baselines to match the caret-free capture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Render comparison artifactsRender snapshot failures were reported in a9370efc1932 run 27300040374.1, but the latest run a1e8ad3951f5 run 27307710408.1 is clean. This comment will be replaced if a future run produces render snapshot failures again. |
NUnit Tests 1 files 1 suites 10m 45s ⏱️ Results for commit c0f48f7. ♻️ This comment has been updated with latest results. |
rtl-script and multi-ws rendered Arabic via the host's Segoe UI, whose Arabic glyphs vary by Windows version — making those snapshots non-deterministic across machines and CI. Download Scheherazade New (pinned release, loaded privately, no system install) at build time and tag Arabic runs with it, then regenerate the two affected baselines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
johnml1135
approved these changes
Jun 10, 2026
Uh oh!
There was an error while loading. Please reload this page.
jasonleenaylor added a commit
that referenced
this pull request
Jun 11, 2026
* Fix flaky render snapshot tests caused by blinking caret Pass fDrawSel: false when capturing render-verification bitmaps. The view's insertion-point caret blinks on a 500ms timer, so drawing the selection captured the caret non-deterministically and caused flaky pixel diffs. Regenerate the affected baselines to match the caret-free capture. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Render Arabic snapshots with a pinned Scheherazade New font rtl-script and multi-ws rendered Arabic via the host's Segoe UI, whose Arabic glyphs vary by Windows version — making those snapshots non-deterministic across machines and CI. Download Scheherazade New (pinned release, loaded privately, no system install) at build time and tag Arabic runs with it, then regenerate the two affected baselines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 7b1269e)
jasonleenaylor added a commit
that referenced
this pull request
Aug 17, 2026
Narrows the PR's comment edits to the five commits that introduced the bulk of them: the Avalonia conversion foundation (#964), the Views render optimizations, the .NET tooling modernization (#678), the Charis test font change (#945), and the blinking-caret snapshot fix (#943). The eight files reverted here carried one to five edited comment lines each, traced by git blame to unrelated commits going back to 2012. Each file is restored to its merge-base content; all eight diffs were comment-only, so no code changes are affected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The render-verification snapshot tests intermittently failed because the captured bitmap sometimes contained the text insertion-point caret and sometimes did not.
DummyBasicView.MakeRootinstalls an insertion-point selection, and the capture passedfDrawSel: truetoVwDrawRootBuffered.DrawTheRoot. The Views engine draws that selection viaVwSelection::DrawIfShowing, gated onm_fShowing— whichSimpleRootSite's 500 ms blink timer toggles. So whether the ~1px-wide caret landed in the snapshot was timing-dependent, producing diffs that crossed the 4px tolerance on some runs (e.g.mediumdiffered by exactly 5px).Change
fDrawSel: falsein both capture paths (RenderBenchmarkHarness.cs,CompositeViewCapture.cs). A correctness snapshot should capture content, not the transient caret.rtl-scriptis left untouched (its RTL Arabic shaping is environment-sensitive) and will be regenerated on a matching machine if the caret removal trips its tolerance on CI.🤖 Generated with Claude Code
This change is