Repository navigation
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The review remained incomplete because one or more reviewers received a runtime budget-stop instruction.
No open issues 🎉
What changed in this PR
Fixes TokenizingTextBox counter colors when the control’s local theme changes, preserving the template’s theme-aware resource references.
Changes:
- Replaces direct foreground assignments with the inner TextBox’s existing visual states.
- Adds Light → Dark → Light regression coverage for empty and full counters, including recovery after
ClearAsync.
| File | Description |
|---|---|
| components/TokenizingTextBox/tests/Test_TokenizingTextBox_General.cs | Tests counter colors against element-local theme probes and verifies limit recovery. |
| components/TokenizingTextBox/src/TokenizingTextBoxItem.AutoSuggestBox.cs | Selects counter visual states without replacing template ThemeResource expressions. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Although native WinUI CI passed, no UWP component tests were discovered and Uno jobs failed before build, leaving cross-target runtime validation of the shared XAML visual-state change incomplete and requiring human assessment.
No open issues 🎉
Review effort: Balanced
azchohfi
marked this pull request as ready for review
November 25, 2026 22:57
This branch has not been deployed
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 free
to 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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
8d1a56150c135da04315181a9deeeeafb23d9959↑ All 14 build and both package jobs passed after the main merge.
↓ UWP component tests are not discovered, and other Uno targets have no runtime counter test evidence.
↑ Preserving the existing template ThemeResource expressions fixes both failures and limit recovery.
↓ The original wrapped 2.2 matrix was not rerun, and its captures do not establish a contrast ratio or app-wide Dark failure.
Fixes
No linked issue. The counter theme failure was reproduced with a bare native control in the existing component-test CI before adding the correction.
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The counter template declares a
ThemeResourceforeground, but its loaded/count-update code replaces that reference with a brush fromApplication.Current.Resources. Changing the control's localRequestedThemecan leave the counter using the previous theme's color.The test-only baseline reproduced this on native WinUI 1.8.260204000. In local Dark, the empty counter stayed
#9E000000instead of the element-local probe's#C5FFFFFF. At the limit, it stayed#FFC42B1Cinstead of#FFFF99A4.What is the new behavior?
Count updates select the existing inner TextBox
MaxReachedStateorDefaultvisual state rather than assigning the foreground directly. Both colors stay owned by the template's existingThemeResourceexpressions. The shared path handles initial loading, token additions and token removals.The bare native regression applies Light, Dark, and Light again directly to the control and its element-local secondary/critical probes, leaving the window root and application theme untouched. It first asserts that each probe has different Light and Dark colors, so matching an unchanged brush cannot pass the oracle.
The two cases cover the empty below-limit counter and the full counter followed by recovery through the existing
ClearAsyncAPI. They use the suite's existing loaded/render helpers, without arbitrary delays, app-wide theme changes, resource overrides, or wrappers.PR Checklist
Please check if your PR fulfills the following requirements:
Other information
git diff --checkpassed before the test and product commits.git diff --check origin/main HEADalso passed after merging main. No new source file or component was added, so their checklist items do not apply.The standard
CIworkflow runs the Windows App SDK component suite with this command.Before the fix, commit
f8800615cc053cec1a6c251f34b284a0292bda0dcompiled successfully and both regression rows failed at the counter-color assertion. Their differing-color oracle and effective-theme assertions passed first. Native baseline job.The overall baseline suite later aborted after losing communication with its test host while a Sizers test was active. It reported 25 passed and 2 failed, with an unknown total. This is evidence of the two specific native failures, not a cleanly completed full-suite run.
After the fix, the same command passed on commit
87b9bfbee112122d79d84adb71b5768bdb0637bf. Both unchanged regression rows passed, including limit recovery. The full native suite completed with 384 total, 381 passed and 3 skipped. After-fix native job, original attempt.The same native job also passed all 39 source-generator tests with this command.
Those before/after runs restored
Microsoft.WindowsAppSDK.WinUI1.8.260204000, Foundation 1.8.260203002, Base 1.8.251216001, and InteractiveExperiences 1.8.260125001. These native CI results are not a rerun of the separate wrapped 2.2 compatibility matrix.The first after-fix UWP attempt failed in the gallery's .NET Native compiler with MSB6006 (
ilc.exeexit -1073741819). A single unchanged UWP retry built successfully and passed the 39 source-generator tests. Both the test-only UWP baseline and this retry reportedNo test is available in entrypoint\CommunityToolkit.Tests.Uwp.exefor the component-test command below. Their green job status is therefore build evidence, not a UWP regression-test pass. That lane restored Microsoft.UI.Xaml 2.8.7.The final two-file diff was reviewed directly with no actionable finding. The first hosted review was explicitly incomplete after a runtime budget stop and is not treated as completed review. The hosted retry completed at the original after-fix head
87b9bfbee112122d79d84adb71b5768bdb0637bfwith no open issues or inline findings. Its state isCOMMENTED, not a human approval.Current head after the main merge
Main commit
af067edcc29e92cb28376aaf54f4cd99c8ac523ffrom #893 was integrated with a normal, non-rewriting merge. The new head is8d1a56150c135da04315181a9deeeeafb23d9959, pushed only to the fork feature branch. The native component tree is identical to the original after-fix head, and the net diff against main remains the same two native files. No branch-specific CI workaround was added.Current-head CI completed successfully. All 14 build jobs and both package jobs passed, along with XAML styling, sample-index and wasm-linux checks. Signing and release were skipped as expected for this PR. CLA passed. No fork workflow approval was needed or performed.
All eight formerly failing Uno lanes now passed their Uno Check step, MSBuild step and whole job on this head.
The new-head WASDK job reran both commands above successfully. Both counter regression rows passed, the component suite again reported 381 passed and 3 skipped out of 384, and all 39 generator tests passed. It restored the same 1.8 package versions listed above. This is additional new-head evidence, not a relabeling of the original before/after runs.
The new-head UWP job built successfully and passed 39 generator tests with Microsoft.UI.Xaml 2.8.7. Its component-test command again reported no tests available. No UWP runtime counter validation is claimed.
Copilot was requested exactly once for this new head. Its completed review has no open issues or inline threads, but calls for human assessment of cross-target runtime coverage. Its reference to Uno pre-build failures describes the earlier run, now superseded by the eight successful jobs above. The UWP discovery and broader runtime-coverage limits remain valid. The review is
COMMENTED, not human approval.All current-head automated gates have passed. Human review is still required. No merge or auto-merge is requested or enabled. No local GUI, Appx, or OS operations were used.