Skip to content

TitleBar defaults its icon from the window icon - #1153

Merged
Alexandre Zollinger Chohfi (azchohfi) merged 33 commits into
mainfrom
azchohfi-titlebar-icon-default
Sep 1, 2026
Merged

Alexandre Zollinger Chohfi (azchohfi) merged 33 commits into
mainfrom
azchohfi-titlebar-icon-default

Conversation

@azchohfi

@azchohfi Alexandre Zollinger Chohfi (azchohfi) commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The WinAppSDK Reactor templates carry a redundant line — they ship a window icon, then restate it on the title bar:

var titleBar = TitleBar("MyApp").Icon("ms-appx:///Assets/AppIcon.ico");  // redundant

TitleBarElement's descriptor wrote IconSource unconditionally, so a null Icon wrote IconSource = null. The WinUI control does not fall back to the window icon on its own. This makes Reactor do the right thing by default, which is what lets the downstream templates delete that line.

What

A TitleBar(...) with no .Icon(...) now inherits the window's icon. New .NoIcon() opt-out.

Precedence mirrors ReactorWindow.ApplyChrome — declared WindowSpec.Icon first, then the Assets\AppIcon.ico convention. The practically exercised order is the inverse of how that reads: all three templates this unblocks call ReactorApp.Run<App>("Name") with no icon: argument and ship Assets\AppIcon.ico, so the convention probe is the common path and a declared WindowSpec.Icon is the explicit opt-in.

One deliberate divergence. The window chain's third stage — the executable's PE-resource icon via ExtractIconExW — yields a raw HICON and no path, while a XAML IconSource needs an ImageSource. Not implemented. An app whose only icon is the PE resource gets a title bar with no icon, exactly its behaviour before this change.

Agreeing with the window

The title bar must agree with the caption about which source won, not merely which file a declaration names — WindowIcon.Apply is TryResolvePath plus a catch-wrapped SetIcon, and LoadConventionAssetIcon goes through LoadImageW, which refuses files File.Exists accepts. So ReactorWindow publishes two verdicts (DeclaredIconApplied, UnloadableConventionIconPath) recorded pessimistically and cleared only once the icon has actually reached the AppWindow.

The convention verdict is a path, not a bool, and that distinction is load-bearing. The window always probes AppContext.BaseDirectory; the projection's root is redirectable for tests. A bare boolean let the title bar blank itself over a file it had never resolved — and an earlier attempt to fix that by sharing one probe root is what broke CI (see below). They are reconciled by comparing resolved paths: not deriving one fact twice, but refusing to combine two facts until they are known to refer to the same object.

Cache policy mirrors ApplyChrome arm by arm, because its arms differ: the declared arm re-resolves on every application (no memo), the convention/PE arm caches both a hit and a miss for the window's lifetime. Matching only one of them produced two separate bugs in opposite directions.

Measured, not assumed

WindowIcon's own remarks record that AppWindow.SetIcon silently applies a default icon when handed an ms-appx: URI in a packaged app. XAML is a different kind of consumer, but that is an argument, not a measurement — so I spiked it:

Question Result
ImageIconSource + BitmapImage with ms-appx:///…ico renders, 128×128
same with file:///…ico renders, 128×128
which .ico frame decodes the largest, not a 16×16 frame 0 — no DecodePixelWidth hint needed
WinUI TitleBar template icon part Viewbox PART_Icon; with no IconSource it is absent from the visual tree, not merely zero-width
AppWindow.SetIcon on a text file named .ico, and on a real .ico held FileShare.None accepted both — it does not throw for a path that exists

That last row is why there is no end-to-end fixture for "declared icon rejected by SetIcon": the scenario is not stageable, so it is covered headlessly instead of by an oracle that cannot fail. ImageIconSource rather than BitmapIconSource is likewise deliberate — the latter's ShowAsMonochrome defaults to true and would flatten a full-colour .ico into a silhouette.

The packaged case is covered too. The MSIX tier runs this same fixture corpus under real package identity, including the arms that assert the ms-appx: scheme specifically.

Tests

18 selftest fixtures + 37 headless tests. Two oracles per positive arm — IconSource is the right object and the template's PART_Icon is realized with non-zero width; _BarLaidOut guards the inverse trap so an absent icon part is never mistaken for a missing layout pass.

Every behavioural change in this PR is mutation-checked: the guard is removed or inverted, the run is shown to redden the specific arm that covers it, and the mutation is reverted. Where a mutation reddens only one of several arms, that is stated, because it establishes the arms are independent rather than one condition observed repeatedly.

13,819 unit tests / 0 failures. 1,502 selftest checks / 0 failures. Release clean for src/Reactor (TreatWarningsAsErrors), Reactor.Tests, AppTests.Host — worth running explicitly, since XML-doc edits in this change broke the Release-only gate four times (CS1573 ×2, CS0419, CS1574) while Debug stayed green.

What review caught

Ran the repo's pr-review skill across all 8 dimensions before opening, then looped Copilot reviews until a round returned no comments (20 rounds; 6 → 3 → 1 → … → 0). The findings clustered into three recurring shapes.

1 — The out-of-band push not honouring a rule the render path does.

  • Ambient state laundered through an element diff. OneWayPropEntry.Update compares get(oldEl) with get(newEl); both read the same ambient window state, so after WindowSpec.Icon changed they compared equal and the title bar kept the stale icon. Now an Imperative entry comparing against what was last written to the control, plus a push from ApplyChrome.
  • The push resolved the wrong window. ReactorHost scopes ActiveHostInternal around each render, but ApplyChrome is reachable from Update at any time — so with two windows open, updating the one that was not currently ambient wrote the other window's icon.
  • The push clobbered author writes. Raw setters run after every descriptor prop (spec 058, "setters apply last / win"), so .Set(b => b.IconSource = …) owns the slot even with no declared Icon.

2 — Ownership inferred instead of observed. Distinguishing a repeating .Set(...) from a one-shot .OnMount(...) went through three wrong inferences (Setters.Length, then a mount-pass flag) before landing on the only thing that actually answers it: when the divergence appears. Setters run before ApplyModifiers; mount/update actions run inside it — so ObserveAfterSetters and ObserveAfterModifiers each see exactly one, and the phase then says whether a modifier write recurs (OnMountAction once, OnUpdateAction every update). Misclassification is now self-correcting rather than permanent.

3 — State keyed or scoped too narrowly. Only the last-mounted title bar was refreshed (the Gallery mounts four at once: the shell's own plus three previews on its TitleBar page); a replacement bar's state was wiped by its predecessor's unmount, because the type-mismatch branch mounts before it unmounts; a departed bar's caption height was retained; the tracking used a WeakReference to a managed RCW rather than the native control — the exact hazard ReactorAttached.StateProperty exists to fix — and the close path never released it, because Reconciler.Dispose unmounts navigation-host children but not the root tree.

CI failure, and what it taught

An earlier fix unified the window's and the title bar's convention probe roots. That made the test override steer the window's native icon load, and — measured, not inferred — Reactor.AppTests.Host.exe has 0 PE icons and ships no AppIcon.ico, so LoadImageW → GetIconIdFromIcon → SetIcon → DestroyIcon had been dead code in that host. Selftests went green ×3 → 0xC0000005 ×2, with a different blamed fixture each time. Replaced with the path-identity check described above; CI recovered immediately.

Fixtures that passed against broken code

Four, each caught by a positive control or a mutation check rather than by reading the code. Recorded because the reasoning is written into the fixtures so nobody simplifies them back:

Intended target Why it proved nothing
two-window push updating the last-opened window makes it the ambient one, so correct and incorrect coincide
replacement title bar a keyed swap is unmount-then-mount; only a type change is mount-then-unmount
departed bar's height one component owning both bars re-renders the survivor, which repairs the state incidentally
.OnUpdate icon write OnUpdateAction is gated on oldM is not null; the element carried no modifiers, so it never ran

A fifth — a wrapper-level .OnMount — was deleted rather than shipped: its modifier receives a Border, not the TitleBar, so the scenario is unreachable via that shape. The accompanying symmetry fix is kept and labelled defensive rather than proven.

Declined with reasons recorded on the threads: two github-code-quality findings that contradicted each other (fixed at the root instead — both suggestions would have deleted one half of a matched null guard), narrowing a catch (Exception) that would have let ObjectDisposedException escape, and the samples' explicit .Icon(...) calls (still valid API — this removes the obligation, not the option).

Scope note for reviewers counting templates

ReactorTabViewApp is the fourth Reactor template and is permanently out of scope: it sets its icon as TabStripHeader = Image(...), an Image element in the tab strip, not a TitleBar.IconSource. No design of this feature can subsume it. Three of four cleaned up is complete, not partial.

Known-failing, not from this change

Issue487_SV2ParkedAtBottom / Issue487_SV2ClampObserved are environment-dependent and reproduce on unmodified main. LT_Unmounts_Exactly_30 / LT_NoLeak_MountsEqualUnmounts is open issue #994, titled for exactly those two checks.

Sequencing

#1145 landed first (this builds on its chain). Next: ship a Microsoft.UI.Reactor version containing both, then microsoft/WindowsAppSDK#6728 bumps to it and deletes the .Icon(...) line from the three templates.

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build metrics

Artifact sizes for 6dcc12e vs the base branch (27ed666).

Packages (compressed .nupkg)

Artifact base PR Δ
Microsoft.UI.Reactor.nupkg 1.66 MB 1.68 MB +18.4 KB (+1.08%) ⚠️
Microsoft.UI.Reactor.Advanced.nupkg 487.5 KB 487.5 KB -4 B (0.00%) ≈
Microsoft.UI.Reactor.Devtools.nupkg 283.3 KB 283.3 KB -10 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor

Artifact base PR Δ
Reactor.Analyzers.dll 360.5 KB 360.5 KB +0 B (0.00%) ≈
Reactor.dll 2.42 MB 2.43 MB +7.00 KB (+0.28%) ⚠️
Reactor.Localization.Generator.dll 16.0 KB 16.0 KB +0 B (0.00%) ≈
Reactor.Wrappers.Abstractions.dll 10.5 KB 10.5 KB +0 B (0.00%) ≈
Reactor.Wrappers.Generator.dll 99.5 KB 99.5 KB +0 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor.Advanced

Artifact base PR Δ
Reactor.Advanced.dll 1021.5 KB 1021.5 KB +0 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor.Devtools

Artifact base PR Δ
Microsoft.UI.Reactor.Devtools.dll 784.5 KB 784.5 KB +0 B (0.00%) ≈

✅ smaller / ⚠️ larger / ≈ within noise. Sizes come from a Release dotnet pack on the CI runner: packages are the compressed .nupkg download size, assemblies the uncompressed DLL inside it.
workflow run.

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🧪 Merged coverage

Coverage for 6dcc12e vs the base branch (f5fa90d) — unit + selftest merged.

Metric base PR Δ
Line 85.68% 85.72% +0.04 pp ≈
Branch 77.29% (929/1202) 77.37% (930/1202) +0.08 pp ≈

No coverage change beyond the noise floor. ✅

✅ higher / ⚠️ lower / ≈ within noise. Δ is in percentage points; coverage is unit + selftest merged (Debug x64) on the CI runner. Cobertura reports attached to the workflow run as artifacts.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Makes TitleBar inherit the owning window’s icon by default while preserving explicit overrides.

Changes:

  • Adds inherited icon resolution and .NoIcon().
  • Shares window/convention path resolution.
  • Adds unit/self-tests, template updates, and documentation.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Reactor/Core/Element.cs Integrates icon projection.
src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs Implements inheritance and synchronization.
src/Reactor/Elements/ElementExtensions.cs Adds .NoIcon().
src/Reactor/Hosting/AppIconConvention.cs Centralizes convention probing.
src/Reactor/Hosting/ReactorWindow.cs Pushes window icon updates.
src/Reactor/Hosting/WindowIcon.cs Exposes shared path resolution.
tests/Reactor.Tests/TitleBarIconDefaultTests.cs Tests resolution and precedence.
tests/Reactor.Tests/WindowIconResourceUriTests.cs Adds test isolation.
tests/Reactor.Tests/TestIsolationCollections.cs Defines isolation collection.
tests/Reactor.AppTests.Host/SelfTest/Fixtures/TitleBarIconDefaultFixtures.cs Adds live WinUI coverage.
tests/Reactor.AppTests.Host/SelfTest/SelfTestFixtureRegistry.cs Registers fixtures.
tools/Templates/templates/WinUIApp-CSharp/App.cs Removes redundant icon declaration.
docs/_pipeline/apps/windows/App.cs Adds documentation snippet.
docs/_pipeline/templates/windows.md.dt Documents icon behavior.
docs/guide/windows.md Updates generated guide.
skills/reactor.api.txt Indexes new API.
plugins/reactor/skills/reactor-dsl/references/reactor.api.txt Updates plugin API index.
Suppressed comments (2)

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:212

  • Caching a failed declared-icon resolution by WindowIcon reference can permanently desynchronize the two surfaces. If the path is initially absent, then the same spec/icon object is reused after the file appears, WindowIcon.Apply re-probes and updates the caption, while this cache keeps returning null and the title bar stays blank. Revalidate on the out-of-band resync path (the inverse file-removal case is stale too).
        var cached = Volatile.Read(ref s_declared);
        if (cached is not null && ReferenceEquals(cached.Key, declared)) return cached.Value;

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:225

  • The convention cache has the same stale-resolution problem as the declared cache: once Assets/AppIcon.ico is observed absent or present, later ApplyChrome calls re-probe it for the window caption, but the title bar never does. Adding or removing the convention asset while an unpackaged app runs therefore makes the caption and title bar disagree. Revalidate this cache when synchronizing after a window update.
    private static IconData? ResolveConvention()
    {
        var cached = Volatile.Read(ref s_convention);
        if (cached is not null) return cached.Value;

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread skills/reactor.api.txt Resolved
Comment thread src/Reactor/Hosting/WindowIcon.cs Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.

Suppressed comments (3)

Previously missed (1) — in code that hasn't changed since the last review.

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:82

  • SuppressIcon is public and documented to suppress the icon entirely, but this ordering ignores it whenever callers initialize both Icon and SuppressIcon = true directly. That contradictory record currently renders the explicit icon instead of honoring the suppression contract. Check SuppressIcon first; the fluent .Icon()/.NoIcon() paths are unchanged because they already normalize both fields.
        if (element.Icon is not null) return element.Icon;
        if (element.SuppressIcon) return null;

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:183

  • The identity guard still cannot preserve a setter that deliberately writes IconSource = null. If the inherited projection was initially null, both last.Source and control.IconSource are null, so adding a WindowSpec.Icon passes this check and overwrites the author’s setter. Please track setter ownership independently of the value identity (or perform the resync through the normal descriptor/setter pass), and cover the no-icon → window-icon transition with a null setter.
        if (!s_applied.TryGetValue(control, out var last) || last.ElementOwned) return;
        if (!ReferenceEquals(control.IconSource, last.Source)) return;

src/Reactor/Hosting/WindowIcon.cs:187

  • This contract says successful resolution always identifies an existing file, but filesystem probe failures intentionally return true with the original, unverified source in TryResolveExistingPath (lines 311–345). That permissive edge is important to callers and already required defensive handling in the new title-bar projection, so document it here rather than promising the stricter behavior.
    /// <summary>
    /// Resolves this icon to an existing file on disk, whichever kind it was
    /// constructed from. Shared with the <c>TitleBar</c> icon default, which needs the
    /// same file as a XAML <c>IconSource</c> rather than as a window <c>HICON</c> —
    /// going through one resolver means the two surfaces cannot disagree about which
    /// file a declared icon names.
    /// </summary>
    /// <returns>
    /// <c>false</c> when the source names no existing file. See the remarks on
    /// <see cref="Apply"/> for why a <c>ms-appx:</c> URI that maps to nothing is a
    /// failure rather than something to pass through.

@azchohfi

Copy link
Copy Markdown
Collaborator Author

Picked up the second review's suppressed comments — they don't create resolvable threads, so recording the disposition here. Three of the five were real bugs; fixed in 41370eb9.

Stale caches (suppressed ×2, TitleBarIconDefault.cs:212 / :225). Correct, and the sharpest of the batch: both resolved-path caches were write-once, while the window re-probes on every ApplyChrome. So an asset appearing after a cached miss updated the caption while the title bar stayed blank, and one deleted after a cached hit left the title bar showing an icon the caption had dropped — precisely the divergence that sharing the resolver was supposed to make impossible. The resync now invalidates first so both surfaces probe in lockstep. It only runs on a spec change, so the cost lands at a moment the window is already hitting the filesystem.

SuppressIcon ordering (:82). Correct. Both Icon and SuppressIcon are public init properties, so a record initializer can set both, and Project checked Icon first — rendering an icon for an element whose SuppressIcon contract says the icon is suppressed entirely. Only reachable by direct construction since the fluent pair normalizes, but reachable is reachable. SuppressIcon is checked first now, with a unit test for the contradictory record.

Null setters (:183). Correct, and it predicted the failure mode exactly: identity cannot see a setter that wrote IconSource = null, because when the projection was also null the author's null and mine are the same reference.

Worth reporting how the fix went, because the first attempt was wrong. I initially skipped the push for any setter-bearing element — and the existing fixtures immediately reddened six checks across Follows and PerWindow, because every BarComponent uses .Set(b => capture = b) to grab the control. That guard would have disabled inheritance wholesale for a very common idiom. Narrowed to the genuinely ambiguous window: decline only when the recorded source was null and the element has setters. Both the narrow guard and last round's identity guard are mutation-checked and redden exactly their own arm.

WindowIcon.cs:187 — fair. The <returns> promised stricter behaviour than TryResolveExistingPath delivers at its permissive edge, which matters now that it's a shared contract the title-bar projection has to defend against. Documented on the method rather than silently relying on callers knowing.

Verification: 13,718 unit tests / 0 failures, 1481 selftest checks / 0 failures, Release clean where TreatWarningsAsErrors applies.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Suppressed comments (1)

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:177

  • This equality fast path leaves ElementHasSetters stale. For example, if a render adds .Set(b => b.IconSource = null) while the projection remains null, Apply returns with the old false flag; a later window-icon resync then treats that null as Reactor-owned and overwrites the setter. Refresh the tracked setter-presence metadata even when the icon write itself can be skipped.
        if (!force
            && s_applied.TryGetValue(control, out var last)
            && last.ElementOwned == owned
            && EqualityComparer<IconData?>.Default.Equals(last.Value, projected))
        {
            return;

Comment thread src/Reactor/Core/Element.cs Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/Reactor/Core/Element.cs:4860

  • This is a user-visible default change and adds the public .NoIcon() opt-out, but the PR has no CHANGELOG.md entry. The repository's contributor rules at CHANGELOG.md:10-24 require significant or breaking changes to be recorded under [Unreleased]; add an entry explaining that existing bare title bars may need .NoIcon() to retain their previous appearance.
    /// <para>Left unset, the title bar inherits the <b>window's</b> icon —
    /// <see cref="WindowSpec.Icon"/> if declared, otherwise the
    /// <c>Assets\AppIcon.ico</c> convention — so an app that already has an icon
    /// need not restate it here. The WinUI control does not do this itself. An icon
    /// that exists only as an executable PE resource is not inherited: that stage

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Comment thread src/Reactor/Hosting/ReactorWindow.cs Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:417

  • This remark is stale: the fixture source is now linked into the packaged self-test host, and the PR specifically reports both URI schemes passing under package identity. Saying the packaged case could not be measured will mislead future maintenance of this path.
    /// <para>Both forms were measured to load unpackaged. <c>ms-appx:</c> is preferred
    /// for package content because it is XAML's native form and goes through MRT, so a
    /// packaged app can serve a scale-qualified variant — and the packaged case is the
    /// one that could not be measured here (the self-test host is
    /// <c>WindowsPackageType=None</c>).</para>

tests/Reactor.AppTests.Host/SelfTest/Fixtures/TitleBarIconDefaultFixtures.cs:976

  • The oracle description says the replacement is 256×256, but OnePixelPng below is explicitly a 1×1 PNG. Correct the stated size so the fixture rationale matches what it measures.
    //  The oracle is decoded pixel size, not the URI: the path is unchanged by
    //  construction, so only the decode can tell the two states apart. The test
    //  icon decodes at 32x32 and the replacement PNG at 256x256.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/Reactor/Hosting/ReactorWindow.cs:229

  • The strong list is not actually cleared on the window-close path. ReactorHost.Dispose calls Reconciler.Dispose, but that method only unmounts navigation-host children (Reconciler.cs:5744-5764), not the root visual tree, so ClearTitleBarControl is never reached for an ordinary native window close. A caller retaining a closed ReactorWindow therefore also retains every title-bar RCW and its AppliedIcon state indefinitely. Clear _titleBarIconControls explicitly from ReactorWindow.Dispose (or otherwise detach the root on close), and add a close-path regression check.
    /// <para>Not a leak: entries are dropped by <see cref="ClearTitleBarControl"/> on
    /// unmount, and the list itself is per-window, so anything still in it dies with the
    /// window.</para>
    /// </remarks>
    private readonly List<Microsoft.UI.Xaml.Controls.TitleBar> _titleBarIconControls = new();

Two findings, both correct, both about claims I had made too confidently.

1. .OnUpdate(...) is not a one-shot
------------------------------------------------------------------
Round 20 attributed every modifier-stage divergence to a one-shot, but
ApplyModifiers runs OnMountAction on mount and OnUpdateAction on EVERY
in-place update (Reconciler.cs:4266-4277). An update-time modifier write
therefore repeats, and marking it one-shot stranded its icon on the control
after the modifier was removed -- nothing re-applied it, and Apply's
one-shot guard stopped the projection replacing it.

The stage identifies the writer; the phase identifies whether it recurs.
ObserveAfterModifiers now takes isMount and records authorRepeats: !isMount.

New arm (d): OnUpdateAdd icon write added in one phase, removed in the next.
Mutation-checked by forcing authorRepeats: false:

    # oneShot: updateAfterRemoval=FontIconSource
    not ok TitleBarIcon_OneShot_UpdateModifierRemovalRestoresInherited

Its positive control earned its place immediately: the first version of the
arm asserted against a write that never happened, because OnUpdateAction is
gated on `oldM is not null` and the element carried no modifiers in phase 0.
The fixture now keeps a benign .Margin(0) in every phase, and the
TookTheSlot check is what caught it rather than a silent green.

2. "Not a leak" was wrong
------------------------------------------------------------------
I documented the strong title-bar list as safe because entries are dropped
on unmount. They are not, on the path that matters: Reconciler.Dispose runs
component cleanups and unmounts navigation-host children, but never the root
visual tree, so ClearTitleBarControl is not reached on an ordinary native
close. An app retaining a closed ReactorWindow retained every TitleBar
wrapper and its applied-icon record with it.

ReactorWindow.Dispose now clears the list, and the doc says what actually
releases it instead of asserting a property that did not hold.

New arm (e), via an internal count hook: one bar held while open, zero after
close. Mutation-checked by removing the clear:

    # oneShot: heldOpen=1 heldClosed=1
    not ok TitleBarIcon_OneShot_ReleasedOnClose (1)

The heldOpen==1 assertion is the control -- without it, a bar that was never
tracked would satisfy heldClosed==0 for the wrong reason.

Verified:
  - 13819 unit tests, 0 failures
  - 1502 selftest checks; only the known Issue487_SV2ParkedAtBottom /
    Issue487_SV2ClampObserved pair fails -- environment-dependent,
    reproduced on unmodified main, unrelated to windowing
  - Release clean: src/Reactor, Reactor.AppTests.Host
    (caught one more Release-only CS1573 for the new parameter)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a835913d-1966-41c4-b6e4-71ab470f3c45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Suppressed comments (3)

Previously missed (1) — in code that hasn't changed since the last review.

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:185

  • This explanation predates the two-stage observation fix: setters are observed before modifiers, so .Set(...) and .OnMount(...) are no longer indistinguishable here. Document the actual recurrence rule so future changes do not collapse the stages again.

This issue also appears in the following locations of the same file:

  • line 268
  • line 300
        /// Both land after the descriptor props and are indistinguishable to
        /// <see cref="ObserveAfterSetters"/> by inspection of the control alone, but they

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:270

  • ObserveAfterSetters now runs before ApplyModifiers, not after modifiers as this summary states. The ordering is the mechanism that distinguishes setter ownership from modifier ownership, so the documentation should preserve that boundary.
    /// Records whether a raw <c>.Set(...)</c> setter claimed the icon slot. Called by the
    /// reconciler after modifiers and setters have run, on both mount and update.
    /// </summary>

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:301

  • A modifier-stage write is not always one-shot: ObserveAfterModifiers(..., isMount: false) deliberately marks update modifiers as repeating. This sentence contradicts the implementation and the OnUpdateAdd regression coverage.
    /// repeats, and one that appears only in
    /// <see cref="ObserveAfterModifiers"/> came from a modifier and does not.</para>

Four documentation findings, all correct: the comments were written for the
round-18 inference and never updated as rounds 19-21 replaced it.

  AuthorRepeats remarks   claimed setters and .OnMount are indistinguishable
                          -- they have not been since the observers were split
  ObserveAfterSetters     summary said it runs after modifiers; it runs before
                          them, and that ordering IS the mechanism
  ObserveAfterSetters     said a modifier-stage divergence does not repeat,
                          which contradicts ObserveAfterModifiers(isMount:false)
                          and the OnUpdateAdd coverage
  fixture rationale       still described the rejected Setters.Length test as
                          the thing arm (a) guards against

All four now state the actual rule: the stage identifies the writer (setter
vs modifier) and the phase identifies whether it recurs (mount once, update
every time). The ObserveAfterModifiers summary no longer says 'one-shot' in
its first line, since that is exactly the collapse these comments invited.

Documentation only -- no behaviour change. Verified 18/18 TitleBarIcon
fixtures and a clean Release build of src/Reactor, since XML doc edits in
this file have broken the Release gate three times in this PR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a835913d-1966-41c4-b6e4-71ab470f3c45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Comment thread src/Reactor/Core/Reconciler.Update.cs Resolved
Comment thread src/Reactor/Core/Reconciler.Mount.cs Resolved
The two observation points were gated asymmetrically: the pre-modifier one
on `control is WinUI.TitleBar`, the post-modifier one on
`element is TitleBarElement`. Whatever the element side is meant to select,
the pair should agree -- a divergence recorded by one stage and not the
other is exactly the split that produces a stranded value.

Both are now gated on the control. The caption-height sync stays
element-specific, since it genuinely needs the TitleBarElement's
HeightOption.

On the scenario the review described
------------------------------------------------------------------
The finding said a transparent Component/Memo wrapper can target a native
TitleBar and have its own modifiers applied to that control, so a
wrapper-level .OnMount(...) icon write would go unrecorded.

I tried to build that fixture and could not, and the measurement is worth
recording because it contradicts the premise:

    Component<BareBar>().OnMount(fe => ...)   // BareBar renders TitleBar("Wrapped")
    # oneShot: wrapperOnMountSaw=Border

The modifier receives a Border. A modified Component element wraps its child
rather than forwarding modifiers onto the child's native control, so the
wrapper's write never reaches the TitleBar and there is nothing for the
observer to miss -- via this shape at least.

So the fixture was removed rather than shipped asserting behaviour that does
not occur; an oracle that cannot reach its own scenario is worse than none,
and three checks in it were failing for that reason rather than because of
any product defect.

The product change is kept regardless: it is a strict symmetry improvement,
costs nothing, and removes a difference between the two stages that a future
reader would have to re-derive. It is defensive rather than a proven fix,
and this message says so instead of implying coverage that does not exist.

Verified:
  - 13819 unit tests, 0 failures
  - 1502 selftest checks; only the known Issue487_SV2ParkedAtBottom /
    Issue487_SV2ClampObserved pair fails -- environment-dependent,
    reproduced on unmodified main, unrelated to windowing
  - Release clean: src/Reactor, Reactor.AppTests.Host

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a835913d-1966-41c4-b6e4-71ab470f3c45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated no new comments.

Suppressed comments (1)

tests/Reactor.AppTests.Host/SelfTest/Fixtures/TitleBarIconDefaultFixtures.cs:1074

  • This rationale still says .OnMount(...) and .Set(...) look identical to ObserveAfterSetters, but the current implementation distinguishes them precisely by observing setters before ApplyModifiers and mount actions afterward (Reconciler.Mount.cs:143-172). Describing the rejected ordering here makes the ownership behavior misleading; update the comment to document the staged observers.
    //  .OnMount and .Set both land after the descriptor props, so they look
    //  identical to ObserveAfterSetters -- but they need opposite handling.
    //  A .Set setter re-runs every render, so Reactor writing over it is
    //  harmless (the setter immediately wins again) and is what lets the
    //  projection return if the setter is removed. .OnMount runs ONCE, so
    //  writing over it destroys the author's value with nothing to restore it.

Round 22 refreshed the docs in TitleBarIconDefault but missed this fixture
header, which still claimed .OnMount and .Set 'look identical to
ObserveAfterSetters'. They have not since the observers were split: setters
run before ApplyModifiers and mount actions inside it, so each stage sees
exactly one of them.

Two lines below it were worse than stale -- they were inverted. The header
said the element carries no setters 'which is what makes the write one-shot',
and that a capture-only .Set 'would make it repeating'. That is precisely the
inference rounds 19-20 removed, and TitleBarIconDefaultOneShotBoundaries arm
(a) exists to prove the opposite. Rewritten to say the classification comes
from WHEN the divergence appears, and to point at the arm that pins the
capture-only case.

Comment only. Verified 18/18 TitleBarIcon fixtures and a clean Release build
of src/Reactor.

Unrelated CI note: Packaged Selftests (MSIX) failed this round on
Issue487_SV2ParkedAtBottom / Issue487_SV2ClampObserved -- the same
environment-dependent pair that fails locally and was reproduced on
unmodified main during #1145. Its appearance in CI as well as locally is
further evidence it is environmental rather than a property of this branch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a835913d-1966-41c4-b6e4-71ab470f3c45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

src/Reactor/Core/V1Protocol/TitleBarIconDefault.cs:339

  • The <param> tag is embedded after a second literal /// on the same XML-doc line, so the generated member documentation contains stray slash text instead of a clean parameter entry. Split it onto its own documentation line.
    /// </remarks>    /// <param name="control">The mounted WinUI <c>TitleBar</c> to observe.</param>

tests/Reactor.AppTests.Host/SelfTest/Fixtures/TitleBarIconDefaultFixtures.cs:742

  • This regression rationale still names the removed singular _titleBarIconControl field and says an unmount clears one reference. The implementation now tracks a list and removes only the departing control, so the comment should describe preserving the replacement's list entry; otherwise it sends future maintainers looking for a field that no longer exists.
    //  ChildReconciler's type-mismatch branch mounts the replacement subtree
    //  BEFORE unmounting the old control. The new mount records
    //  _titleBarIconControl; the old control's unmount then reaches
    //  ClearTitleBarControl. An unconditional clear there wipes the reference the
    //  replacement just recorded, and because that field is written only at mount

Two documentation defects, both mine, both introduced while fixing earlier
review rounds.

1. A <param> tag ended up appended to the same XML-doc line as </remarks>:

     /// </remarks>    /// <param name="control">...</param>

   The compiler accepted it -- Release was green -- but the generated member
   documentation carries the stray slashes. Split onto its own line. Worth
   noting the Release gate does NOT catch this shape, so it would have
   survived indefinitely; only reading the emitted doc finds it.

2. The type-replacement fixture header still described the singular
   _titleBarIconControl field and an unconditional clear. Round 14 replaced
   both with a list and a remove-then-check-empty rule, so the comment sent
   readers looking for a field that no longer exists. Rewritten to describe
   the current mechanism -- the departing control is removed and the
   window-wide state is withdrawn only once the list is empty -- and to say
   that this fixture is what keeps that true.

Swept the rest of the change for the same two defects rather than fixing
only what was reported: no remaining reference to _titleBarIconControl in
src or tests, and no other doubled-/// line in TitleBarIconDefault.cs (the
three hits are ms-appx:/// and file:/// URIs).

Comments only. Verified 18/18 TitleBarIcon fixtures and a clean Release
build of src/Reactor.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a835913d-1966-41c4-b6e4-71ab470f3c45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated no new comments.

@azchohfi
Alexandre Zollinger Chohfi (azchohfi) merged commit 05d3252 into main Sep 1, 2026
25 checks passed
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) deleted the azchohfi-titlebar-icon-default branch September 1, 2026 18:18
Alexandre Zollinger Chohfi (azchohfi) added a commit to microsoft/WindowsAppSDK that referenced this pull request Sep 1, 2026
Reactor 0.1.0-preview.14 makes TitleBar(...) inherit the window's icon
(microsoft/microsoft-ui-reactor#1153), so the explicit
.Icon("ms-appx:///Assets/AppIcon.ico") in the templates is now redundant.
Removing it keeps the scaffolded App.cs to the shape a starter template
should have, and the title bar still renders the app mark.

Applies to the three templates that use a TitleBar element: ReactorBlankApp,
ReactorMvuApp and ReactorNavigationApp. ReactorTabViewApp has no TitleBar --
it extends content into the title bar with a custom drag region and renders
its icon through TabStripHeader = Image(...), which is a different surface
that the inherit behaviour does not cover -- so it keeps its explicit
reference and is intentionally untouched.

Validated against the real 0.1.0-preview.14 package, four scaffolded apps,
with the icon line present and absent:

  control, .Icon present, preview.14    title bar mark shown
  line removed, preview.14              title bar mark shown  <- the change
  line removed + icon: arg, preview.14  title bar mark shown
  line removed, preview.13              NO mark

The last row is the negative control: identical source and capture method,
only the package version differs, so the mark on preview.14 is caused by the
inherit behaviour rather than by something incidental.

All four templates were then scaffolded from the built pack and built clean
on x64: Debug 0 warnings, Release 2 warnings. The Release warnings are
pre-existing IL2104 trim warnings from Microsoft.Windows.SDK.NET and
WinRT.Runtime, unrelated to this change and present without it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1
Alexandre Zollinger Chohfi (azchohfi) added a commit to microsoft/WindowsAppSDK that referenced this pull request Sep 2, 2026
* Set ApplicationIcon in the C# app templates

The eight C# app templates ship Assets\AppIcon.ico and reference it from the
window (AppWindow.SetIcon in the XAML templates, TitleBar.Icon in the Reactor
ones), but none of them set <ApplicationIcon>, so the icon was never embedded
into the built executable as a Win32 icon resource. Explorer, shortcuts, and
the taskbar for an unpackaged build therefore showed the default .NET icon.

Guarded with Condition=Exists so the property is simply skipped if a project
does not have the asset, matching the existing PublishProfile pattern in these
same templates.

Applied to all eight app templates that ship the asset -- the four WinUI XAML
ones and the four Reactor ones -- rather than only the Reactor set, so the
templates stay consistent with each other. ClassLibrary, PackagedApp, and
UnitTestApp do not ship an AppIcon.ico and are untouched.

Only ProjectTemplate.csproj is modified: that is the file scaffolded for the
user by both dotnet new and the VSIX. The WinUI.Desktop.Cs.*.csproj files are
VSSDK packaging projects for the VSIX itself, not scaffolded output.

Validated by scaffolding and building all eight templates (Debug, x64): all
build clean and the icon is embedded in the produced exe, confirmed by
ExtractAssociatedIcon returning a 32x32 icon for each. The two warnings from
winui-mvvm are pre-existing MVVMTK0045 diagnostics from the MVVM Toolkit and
are unrelated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Bump Reactor to 0.1.0-preview.14 and drop the explicit title bar icon

Reactor 0.1.0-preview.14 makes TitleBar(...) inherit the window's icon
(microsoft/microsoft-ui-reactor#1153), so the explicit
.Icon("ms-appx:///Assets/AppIcon.ico") in the templates is now redundant.
Removing it keeps the scaffolded App.cs to the shape a starter template
should have, and the title bar still renders the app mark.

Applies to the three templates that use a TitleBar element: ReactorBlankApp,
ReactorMvuApp and ReactorNavigationApp. ReactorTabViewApp has no TitleBar --
it extends content into the title bar with a custom drag region and renders
its icon through TabStripHeader = Image(...), which is a different surface
that the inherit behaviour does not cover -- so it keeps its explicit
reference and is intentionally untouched.

Validated against the real 0.1.0-preview.14 package, four scaffolded apps,
with the icon line present and absent:

  control, .Icon present, preview.14    title bar mark shown
  line removed, preview.14              title bar mark shown  <- the change
  line removed + icon: arg, preview.14  title bar mark shown
  line removed, preview.13              NO mark

The last row is the negative control: identical source and capture method,
only the package version differs, so the mark on preview.14 is caused by the
inherit behaviour rather than by something incidental.

All four templates were then scaffolded from the built pack and built clean
on x64: Debug 0 warnings, Release 2 warnings. The Release warnings are
pre-existing IL2104 trim warnings from Microsoft.Windows.SDK.NET and
WinRT.Runtime, unrelated to this change and present without it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1
Kyaw Thant (kythant) added a commit to microsoft/WindowsAppSDK that referenced this pull request Oct 2, 2026
* Remove github-artifacts mcp server (#6684)

* Remove github-artifacts mcp server

* Update review prompts for GitHub MCP migration (#6686)

Remove references to the retired github-artifacts helper and direct issue and PR review workflows to Copilot's standard web, file, and execution tools.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2b34993b-0dcf-4789-94c5-97fd92cce84d

---------

Co-authored-by: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com>
Copilot-Session: 2b34993b-0dcf-4789-94c5-97fd92cce84d

* MSIX: Always include PackageIntegrity/Content[Enforcement=on] in VS project templates (#6613)

* Bump VSIX build .NET SDK to 10.0.111 (security release) (#6699)

* Pin .NET SDK to patched 10.0.111 (CG DOTNET-Security-10.0)

Component Governance flags a vulnerable .NET SDK (10.0.101) against
/global.json. That version string is not in the repo -- global.json has
no "sdk" block at all, so builds resolve whatever SDK the agent image
happens to carry, and CG attributes what it detects to the nearest
manifest. Note "tools.dotnet" is a non-standard bootstrap field and does
not govern SDK resolution; only an "sdk" block does.

Pins sdk.version to 10.0.111 (runtime 10.0.11, 2026-08-11 security
release). Staying in the 1xx feature band already used here avoids
unrelated MSBuild/SDK/analyzer behavior changes.

Also bumps BuildVSIX 10.0.110 -> 10.0.111 so an SDK satisfying the pin is
actually installed -- rollForward only rolls forward, never backward.
That is independently a security improvement: 10.0.110 carries runtime
10.0.10 and is one security release behind. Follows up #6624.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5474160f-e555-4254-899b-783ad9211b71

* Remove root global.json SDK pin; scope PR to VSIX only

The root global.json `sdk` block is a repo-wide floor for every dotnet/MSBuild
invocation beneath it. Foundation/MRT/PREfast jobs install only .NET SDK 6.0.414
(matched to the shipping net6.0 / net6.0-windows10.0.19041.0 TFMs), and
rollForward never rolls backward across majors -- so Microsoft.NET.Sdk became
unresolvable and 10 CI jobs failed with MSB4236.

Scoping this PR to the BuildVSIX 10.0.110 -> 10.0.111 bump only. The CG
global.json remediation requires installing the pinned SDK in every job that
restores under the root global.json, and will be handled separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 484c9277-ea15-4f85-a4a0-0429347ade48

---------

Co-authored-by: Vineeth Thomas Alex <vithoma@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5474160f-e555-4254-899b-783ad9211b71
Copilot-Session: 484c9277-ea15-4f85-a4a0-0429347ade48

* [main] Update dependencies from microsoft/LiftedIXP/DCPP (#6636)

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260717.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1897.260717-1605.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260717.1

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260719.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1898.260719-1733.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260719.1

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260723.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1899.260723-1213.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260723.1

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260727.2
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1900.260726-2015.1
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260727.2

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260729.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1901.260728-1900.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260729.1

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260806.3
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1902.260806-0506.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260806.3

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260814.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1903.260814-0918.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260814.1

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260818.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1904.260818-1237.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260818.1

* Update dependencies from https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP build 20260823.1
On relative base path root
Microsoft.FrameworkUdk , Microsoft.ProjectReunion.InteractiveExperiences.TransportPackage From Version 3.0.0-experimental-27300.1896.260713-1015.0 -> To Version 3.0.0-experimental-27300.1905.260822-1925.0
Microsoft.WindowsAppSDK.InteractiveExperiences From Version 3.0.0-experimental-Rolling.20260713.2 -> To Version 3.0.0-experimental-Rolling.20260823.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* [57514396] Use the central TSA area path in Foundation native builds

* Fix "Cancel" button in the C# and C++ wapproj templates so that it returns to the "Configure your new project" menu instead of creating a broken project (#6708)

* Add nuget cli alternative to Test-DotnetnNewTemplates for local execution

* Add check in Build-VSIX-Local to verify that the templates are included in the VSIX

* Add MsBuild parameter to build and install VSIX scripts

* Set WindowsAppSDkVersion, WindowsSdkBuildToolsVersion,and WindowsSdkBuildToolsWinAppVersion to {name}$ (parent template parameter) instead of project template parameter

* Move the Windows platform selection wizard from the Wapproj.vstemplate to the PackagedApp.vstemplate

* Move the Windows platform selection wizard from the C++ Wapproj.vstemplate to the PackagedApp.vstemplate

* Substitute publisher name from parent project in C++ wapproj Package.appxmanifest

* Rename VsVersion in help guide to MsBuildVersion

* Update missing MSBuild error message to include the MsBuildVersion selected in the script

* Remove duplicate problems.Count newline

* Remove extra excludedVersionPrefixes in Test-DotnetNewTemplates.ps1

* Add Reactor (Microsoft.UI.Reactor) dotnet new templates (#6620)

* Add Reactor (Microsoft.UI.Reactor) dotnet new templates

Adds four Reactor project templates to the Microsoft.WindowsAppSDK.WinUI.CSharp.Templates dotnet-new pack, mirroring the WinUI templates but for Microsoft.UI.Reactor (pure C#, no XAML):

- Reactor Blank App        (reactor, reactor-blank)
- Reactor MVU App          (reactor-mvu)
- Reactor NavigationView   (reactor-navview)
- Reactor TabView App      (reactor-tabview)

Wired into dev/Templates/templates.props via the DotnetNewOnlyProjectTemplate
slot (dotnet-new only, no VSIX, no manifest; Reactor apps run unpackaged).
Each shares a common csproj referencing Microsoft.UI.Reactor +
Microsoft.WindowsAppSDK, bundles the WinAppSDK runtime self-contained, and
enables the Debug-only Reactor devtools surface. README and
Test-DotnetNewTemplates.ps1 updated to document and validate the new templates.

Validated end-to-end: pack -> install -> dotnet new -> build (Debug + Release)
for all four templates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Fix Reactor template runtime crash: remove TitleBar icon

TitleBar(...).Icon(FontIcon(...)) threw System.ArgumentException (E_INVALIDARG)
at runtime when Reactor set TitleBar.IconSource on Windows App SDK 2.1.3, so
the scaffolded Blank, MVU, and TabView apps crashed on launch. The glyph was
only a placeholder, so drop the icon; the title bar still shows the title text
and all four templates now launch cleanly (validated with dotnet run).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Bump Reactor templates to preview.12 and restore title-bar icon

microsoft/microsoft-ui-reactor#855 fixes the IconResolver FontSize=NaN crash
(FontIcon in an IconSource slot without an explicit size threw
ArgumentException from TitleBar.set_IconSource). That fix ships in
Microsoft.UI.Reactor 0.1.0-preview.12, so restore the placeholder title-bar
app-mark icon in the Blank, MVU, and TabView templates and bump the default
reactorVersion 0.1.0-preview.11 -> 0.1.0-preview.12 across all four templates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Provision .NET 10 SDK in dotnet-new templates test stage

The template smoke-test stage installed only .NET SDK 8.0.x, so scaffolding
and building the Reactor templates failed with NETSDK1045 (Reactor targets
net10.0 and declares a [10.0,) sdk-version constraint). The WinUI templates
auto-detect their TFM from the active SDK, so they built net8.0 and passed,
masking the gap.

Add a second UseDotNet@2 step (param reactorDotnetSdkVersion, default 10.0.x)
to the shared Test-Stage template so the agent has the .NET 10 SDK. Verified
locally that the WinUI templates still build cleanly on the .NET 10 SDK, so
existing coverage is unaffected. Both the official and PR pipelines consume
this shared stage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Address PR review: trim launchSettings comments, use per-template icons

Review feedback from @DinahK-2SO on #6620:
- Remove the explanatory comment block from the Reactor launchSettings.json
  files (the content overlapped the package README).
- Give the MVU, NavigationView, and TabView templates their own icon.png
  (reusing the existing WinUI mvvm/navigation/tabview template icons) instead
  of all reusing the blank-app icon.

The packaging/taskbar-icon, tabs-in-title-bar, and winui-* short-name comments
are still open pending a check with the Reactor team.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Add winui-reactor* short-name aliases to Reactor templates

Review feedback from @DinahK-2SO on #6620: give each Reactor template a
winui-reactor* alias (winui-reactor, winui-reactor-mvu, winui-reactor-navview,
winui-reactor-tabview) so they also surface under 'dotnet new list winui'
alongside the other WinUI templates. README updated to note the aliases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* reactor-tabview: integrate tabs into the title bar

Review feedback from @DinahK-2SO on #6620: instead of stacking a separate
TitleBar row above the TabView, put the tabs up in the title bar (Edge/Terminal
style) to look cleaner and save vertical space.

Uses supported Reactor APIs: UseWindow().NativeWindow with
ExtendsContentIntoTitleBar + SetTitleBar, the TabView TabStripHeader (app name
at the leading edge) and TabStripFooter (draggable region), and UseDpi +
UseWindowSize to reserve the caption-button inset (RightInset) across DPI and
resize. Verified by scaffolding the template, building, running, and
screenshotting the window: the tabs render inline in the title bar with the
caption buttons clear.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Make Reactor templates packaged (MSIX) and match the WinUI templates

Per review direction, the four Reactor templates now:

1. Are single-project MSIX packaged (like the WinUI templates) instead of
   unpackaged. Each gains app.manifest, Package.appxmanifest (EntryPoint
   Windows.FullTrustApplication since Reactor has no XAML App class), the shared
   Assets, and PublishProfiles. The csproj switches to EnableMsixTooling +
   Microsoft.Windows.SDK.BuildTools + Microsoft.Windows.SDK.BuildTools.WinApp so
   'dotnet run' registers a loose package and launches with MSIX identity.
   templates.props sets RenameManifestFrom and the template.json files gain the
   publisher / guid / build-tools-version symbols and the \\$
   modifier.

2. Visually match their WinUI counterparts:
   - reactor      -> title bar (app icon) + empty content (blank canvas).
   - reactor-mvu  -> centered 'Hello, WinUI!' + [+]/[-] icon counter (keeps the
     UseReducer MVU pattern under the same UI).
   - reactor-navview -> title bar + NavigationView Home/About + built-in Settings;
     pages render 'Title' + 'This is the X page'.
   - reactor-tabview -> MicaAlt, app-icon TabStripHeader, closable Home/About tabs
     with a '+' add button, tabs in the title bar.

Validated end-to-end for all four: pack -> install -> scaffold -> build ->
dotnet run (launches packaged with identity) -> screenshot matches the WinUI
counterpart. README updated (templates are now packaged).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* reactor-mvu: greet 'Hello, Reactor!'; use WinUI type-ramp styles for font parity

- MVU greeting is now 'Hello, Reactor!' (was 'Hello, WinUI!').
- Switch the Reactor text from Heading()/.SemiBold() (raw 28px Bold-700) to the
  type-ramp factories Title()/BodyStrong()/Body(), which apply the actual WinUI
  styles (TitleTextBlockStyle 28px Semibold-600, BodyStrongTextBlockStyle,
  BodyTextBlockStyle). This makes the Reactor headings/body render with the same
  weight and Segoe UI Variable optical size as the WinUI templates instead of a
  heavier bold. Applied to the mvu, navview, and tabview page text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* reactor-tabview: give tab pages a solid background to match WinUI

The WinUI TabView template's pages set Background=SolidBackgroundFillColorTertiaryBrush,
which covers the window's Mica in the tab content area. The Reactor version left
the pages transparent, so MicaAlt showed through the content. Wrap the tab page
content in a Border painted with that same tertiary brush so the content is a
solid surface and only the tab strip / title bar show Mica, matching X_Tab.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* reactor-tabview: stretch the tab page surface to fill the content area

The solid tertiary page background only covered the text at the top because
Reactor sizes the tab content to the element's desired size. Force the page
Border to HorizontalAlignment/VerticalAlignment Stretch so the solid surface
fills the whole tab content region, matching the WinUI TabView template
(verified: the content is a uniform solid fill down to the window bottom).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Fill reactor-tabview page surface to window height

Match the WinUI TabView template's uniform tertiary content background by
sizing the shared page surface to the window height, so it fills the whole
tab content area instead of shrinking to its text (two-tone with Mica below).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Use Reactor's navigation system in reactor-navview

Match the WinUI NavigationView template's shell: the title bar owns the back
and pane toggle buttons, and NavigationView's own copies are hidden.

Switch from hand-rolled tag state to Reactor's navigation handle
(UseNavigation + NavigationHost), so the title bar back button is wired by
.WithNavigation(nav) and tracks the back stack instead of never appearing.
Also request the tall title bar layout the WinUI template uses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Toggle the nav pane on the control instead of mirrored state

NavigationView opens and closes its pane on its own (light dismiss, display
mode changes), so a separate IsPaneOpen state copy drifted out of sync and
the title bar toggle needed two clicks to take effect.

Flip IsPaneOpen on the control directly, the same way the WinUI template's
code-behind does.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Match the WinUI page transition in reactor-navview

Reactor's NavigationHost slides pages in from the side, while WinUI's Frame
defaults to an entrance transition that rises the new page up into place.
Slide from the bottom so switching pages animates the same way.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Trim the Reactor templates to match the XAML templates' style

The Reactor templates carried long comments explaining Reactor concepts and
how they differ from XAML, which made them read like documentation rather
than a starting point. Keep only the brief, functional comments the XAML
templates use, and a single pointer to the Reactor project info.

Also drop the explicit navigation transition from reactor-navview: matching
the XAML Frame's entrance animation added verbosity and called out a
difference between the two, so use Reactor's default instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Mark the Reactor templates as experimental

Microsoft.UI.Reactor is prerelease and its API may still change, so label the
templates accordingly: add `(Experimental)` to each template name, an
`Experimental` classification so it shows in the dotnet new tags column, and
a note in each description and in the README.

Also correct the templates.props comment, which still described the Reactor
apps as unpackaged with RenameManifestFrom unset; they are packaged
(single-project MSIX) and do set it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Fix Reactor analyzer warnings in the MVU and TabView templates

The templates tripped four of Reactor's analyzers, so a freshly scaffolded
project did not build clean:

- REACTOR_A11Y_001 (x2): the MVU counter's icon-only buttons had no
  accessible name. Add .AutomationName().
- REACTOR_A11Y_002: the TabView tab strip icon is decorative. Mark it
  .AccessibilityHidden().
- REACTOR_HOOKS_013: the initial tab array was reallocated on every render
  though only read on the first. Wrap it in UseMemo.
- REACTOR_POOL_001: the page surface set MinHeight via .Set(...), which is
  reset when the element returns to the pool, so the tab content fill could
  be lost on re-render. Use the .MinHeight() modifier instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Use $targetentrypoint$ in the Reactor manifests, like the XAML templates

The Reactor manifests hardcoded EntryPoint=Windows.FullTrustApplication while
every XAML template uses the $targetentrypoint$ token. The token already
resolves to Windows.FullTrustApplication for these projects, so the generated
AppxManifest.xml is unchanged - this just removes an unexplained difference
between the two sets of templates.

The four Reactor manifests are now byte-identical to their XAML counterparts.

Verified: all four scaffold, build warning-free, generate the same
EntryPoint=Windows.FullTrustApplication, and launch with package identity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Commit the Reactor templates' publish profiles

The root .gitignore has a blanket `*.pubxml` rule, so the three publish
profiles in each Reactor template were silently never added. They existed
only on the authoring machine; a clean clone got none of them. The WinUI
templates force-added theirs in #6407 for the same reason.

Without the profiles the csproj's
`<PublishProfile Condition="Exists(...)">` never resolves, so SelfContained
is never set to true. Combined with PublishTrimmed=true for non-Debug
configurations that fails a Release build outright:

  error NETSDK1102: Optimizing assemblies for size is not supported for the
  selected publish configuration. Please ensure that you are publishing a
  self-contained app.

Force-add all 12 files so Release builds and publish work from a fresh
clone, matching the WinUI templates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Stop .gitignore from swallowing template publish profiles

The blanket `*.pubxml` rule silently ignored the Reactor templates' publish
profiles, so they were never committed and Release builds failed from a
clean clone (fixed in 8ea4586 by force-adding them).

`git add -f` fixed those 12 files but not the mechanism: the next template
added, or a new RID added to an existing one, hits the same trap and it is
again invisible to anyone whose working tree still has the files on disk.

Add a `!dev/Templates/**/*.pubxml` negation alongside the existing one for
dev/vsix, so template publish profiles are committable by default. Publish
profiles elsewhere in the repo stay ignored.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Match the XAML templates' icon font and size

The Reactor templates hardcoded `Segoe Fluent Icons` on their FontIcons and
left the size at WinUI's default. The XAML templates do neither: they use
`<FontIcon Glyph="..." />` with no FontFamily, inheriting SymbolThemeFontFamily,
which resolves the right icon font for the OS — worth keeping given the
templates support Windows 10 1809 and Segoe Fluent Icons is Windows 11 era.

The MVVM template also sets FontSize="14" on its counter icons, which ours
missed, so the buttons rendered larger than their XAML counterpart:

  XAML MVVM      58x41
  Reactor MVU    67x51  ->  58x42

Verified against Microsoft.UI.Reactor 0.1.0-preview.12: both templates build
warning-free and the glyphs render correctly (Icon(FontIcon(...)) resolves
through IconResolver, not the Button(string) content path).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Update Reactor dotnet new templates for 0.1.0-preview.13

Reactor preview.13 adds declarative APIs that let the Navigation and
TabView templates drop their imperative escape hatches:

- NavigationView: use IsBackButtonVisible / IsPaneToggleButtonVisible and
  .IsPaneOpen(value, handler) instead of UseRef + OnMount downcast, and
  select the built-in Settings item via NavigationViewElement.SettingsTag.
  OnSelectedTagChanged still reports null for Settings by design, so
  TagToRoute keeps handling both SettingsTag and null.
- TitleBar: use .Tall() instead of the UseEffect + DispatcherQueue hop and
  the redundant .Height(48).
- TabView: set FillContentArea, removing the MinHeight workaround.

Also bump the reactorVersion default to 0.1.0-preview.13 in all four
Reactor template.json files.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38f0823a-2ee4-4c65-8f3f-7dde6a049509

* Let the OS size the window, like the XAML templates

Drop the hardcoded 1000x700 from all four Reactor templates. Reactor
PR #924 makes ReactorApp.Run's width/height optional, so omitting them
lets the OS pick the size, matching the XAML templates which set no
size at all. Verified identical to a freshly scaffolded XAML app.

This requires 0.1.0-preview.13; before #924, omitting width/height
meant a hardcoded 1024x768 rather than an OS-chosen size.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38f0823a-2ee4-4c65-8f3f-7dde6a049509

* Add the MsixPackage launch profile to the Reactor templates

The Reactor templates were originally unpackaged and their launchSettings.json
only declared `commandName: Project` profiles. Making them single-project MSIX
updated the csproj and added Package.appxmanifest but left launchSettings
behind, so F5 from Visual Studio failed:

  ...launchSettings.json does not contain a profile with commandName
  'MsixPackage'. To debug a packaged single-project MSIX solution, a profile
  with command name MsixPackage in launchSettings.json is required.

`dotnet run` goes through Microsoft.Windows.SDK.BuildTools.WinApp instead, so
it worked throughout and the gap went unnoticed.

Declare the same Package / Unpackaged pair the WinUI XAML templates ship, with
Package first so it is the F5 default, and keep the Reactor devtools profile
alongside them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Float the Windows App SDK version in the Reactor templates

The Reactor templates pinned Microsoft.WindowsAppSDK to 2.1.3 while the WinUI
XAML templates default to `*`. That pinned new projects to an older SDK than
the one Visual Studio offers everywhere else — 2.3.1 is current, so scaffolded
Reactor apps were two releases behind for no reason.

2.1.3 was the version Reactor happened to be built against, not a hard floor:
Microsoft.UI.Reactor 0.1.0-preview.13 depends on Microsoft.WindowsAppSDK.WinUI
>= 2.1.0. Keep the requirement in the parameter description rather than
encoding it as the pin, matching the WinUI templates.

Verified with the floated default: all four templates resolve
Microsoft.WindowsAppSDK 2.3.1, build warning-free, and launch with package
identity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Accept MSB4181 for the invalid-version restore test on .NET SDK 10

The dotnet-new template test stage previously installed only the .NET 8 SDK.
Adding the .NET 10 SDK (needed because the Reactor templates target net10.0)
means the muxer now selects 10.0.400 for the pre-existing winui negative
tests as well, which changes the diagnostic NuGet emits for an unparseable
package version:

  SDK 8.0.424 / 9.0.317 : no error code; "'not-a-version' is not a valid
                          version string."
  SDK 10.0.400          : MSB4181 - RestoreTask returns false without
                          logging the descriptive error, so no NU code
                          surfaces at all.

The old assertion short-circuited on any error code being present and
demanded NU1105, so MSB4181 failed the run. (NU1105 never actually
surfaced on any tested SDK; the test passed via the descriptive-message
fallback.) Accept NU1105/MSB4181 or the descriptive message, and stop a
code's presence from bypassing the fallback.

Verified on 8.0.424 / 9.0.317 / 10.0.400. Unrelated failures (NU1101,
NU1301) still fail the assertion, so it is not weakened to "any failure".
Scenario 5's build check (NETSDK1004), scenario 6 (NU1102) and scenario 7
(NU1301) were confirmed unchanged on SDK 10.

Also corrects an adjacent comment that said NETSDK1005 where the check and
the observed behaviour are both NETSDK1004.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Pin the Reactor test-stage .NET SDK instead of floating 10.0.x

Every other UseDotNet@2 task in this repo pins an exact SDK (6.0.414,
6.0.427, 8.0.100, 9.0.200, 10.0.111); #6624 added the BuildVSIX pin so
Component Governance scans a patched toolchain, and #6699 bumped it
deliberately for a security release. reactorDotnetSdkVersion was the only
new floating pin.

Floating is what broke CI: '10.0.x' resolved to 10.0.302 when the task was
added on 2026-07-23, then silently jumped a whole feature band when 10.0.400
shipped on 2026-08-11. 10.0.400 changed the NuGet diagnostic for an
unparseable package version, so the pre-existing winui invalid-version smoke
test started failing with no corresponding source change.

Pinned to 10.0.400 rather than the 10.0.111 used by BuildVSIX. The Reactor
templates cannot use the 1xx servicing band: Microsoft.UI.Reactor's analyzers
and source generators (Reactor.Analyzers, Reactor.Wrappers.Generator,
Reactor.Localization.Generator) reference Roslyn 5.6.0.0, and 10.0.111 ships
Roslyn 5.0.0.0, so all three are silently disabled with CS9057 while the
build still reports success. Verified by building the same scaffolded project
on both SDKs: 10.0.111 -> 3x CS9057, 10.0.400 (Roslyn 5.9.0.0) -> 0 warnings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Accept NETSDK1005 for the invalid-version build test on .NET SDK 10

Follow-up to 5ff625e, which fixed the restore assertion in the same
scenario. The build assertion immediately after it failed for the same
underlying reason.

On .NET SDK 10 NuGet's RestoreTask fails (MSB4181) but still writes a
partial obj/project.assets.json. The subsequent --no-restore build therefore
reports NETSDK1005 (assets file has no target for the project's TFM) rather
than NETSDK1004 (assets file missing). Accept either, since both mean restore
did not produce usable assets. Scenario 7's list gains NETSDK1005 for the
same reason; it currently resolves to NU1301, but NETSDK1004 is in that list
for the 'restore never succeeded' case whose SDK 10 equivalent is 1005.

This also reverts the NETSDK1005 -> NETSDK1004 comment change from 5ff625e.
That comment was correct as written; I changed it based on a repro that used
a bare net8.0 project with no obj directory, which produces NETSDK1004 and
does not reproduce the real template's behaviour. Re-verified with a faithful
repro (net10.0-windows10.0.26100.0, WinUI props, same build flags), which
reproduces CI exactly: assets file present after the failed restore, build
fails with NETSDK1005.

All four error-code assertions in this script are now backed by faithful
repros on the pinned SDK 10.0.400: restore MSB4181, build NETSDK1005,
scenario 6 NU1102, scenario 7 NU1301. Unrelated failures still throw.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1
Copilot-Session: 38f0823a-2ee4-4c65-8f3f-7dde6a049509

* dotnet new WinUI3 templates 0.0.7-alpha (#6729)

* Propagate the PackageReference version into the C# wapproj template's BlankApp project file (#6705)

* Fix AppInstance process handle validation (#6733)

* Fix AppInstance process handle validation

Open non-current processes with SYNCHRONIZE once and transfer the
validated handle into AppInstance before registering the termination wait.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Set ApplicationIcon in the C# app templates (#6728)

* Set ApplicationIcon in the C# app templates

The eight C# app templates ship Assets\AppIcon.ico and reference it from the
window (AppWindow.SetIcon in the XAML templates, TitleBar.Icon in the Reactor
ones), but none of them set <ApplicationIcon>, so the icon was never embedded
into the built executable as a Win32 icon resource. Explorer, shortcuts, and
the taskbar for an unpackaged build therefore showed the default .NET icon.

Guarded with Condition=Exists so the property is simply skipped if a project
does not have the asset, matching the existing PublishProfile pattern in these
same templates.

Applied to all eight app templates that ship the asset -- the four WinUI XAML
ones and the four Reactor ones -- rather than only the Reactor set, so the
templates stay consistent with each other. ClassLibrary, PackagedApp, and
UnitTestApp do not ship an AppIcon.ico and are untouched.

Only ProjectTemplate.csproj is modified: that is the file scaffolded for the
user by both dotnet new and the VSIX. The WinUI.Desktop.Cs.*.csproj files are
VSSDK packaging projects for the VSIX itself, not scaffolded output.

Validated by scaffolding and building all eight templates (Debug, x64): all
build clean and the icon is embedded in the produced exe, confirmed by
ExtractAssociatedIcon returning a 32x32 icon for each. The two warnings from
winui-mvvm are pre-existing MVVMTK0045 diagnostics from the MVVM Toolkit and
are unrelated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Bump Reactor to 0.1.0-preview.14 and drop the explicit title bar icon

Reactor 0.1.0-preview.14 makes TitleBar(...) inherit the window's icon
(microsoft/microsoft-ui-reactor#1153), so the explicit
.Icon("ms-appx:///Assets/AppIcon.ico") in the templates is now redundant.
Removing it keeps the scaffolded App.cs to the shape a starter template
should have, and the title bar still renders the app mark.

Applies to the three templates that use a TitleBar element: ReactorBlankApp,
ReactorMvuApp and ReactorNavigationApp. ReactorTabViewApp has no TitleBar --
it extends content into the title bar with a custom drag region and renders
its icon through TabStripHeader = Image(...), which is a different surface
that the inherit behaviour does not cover -- so it keeps its explicit
reference and is intentionally untouched.

Validated against the real 0.1.0-preview.14 package, four scaffolded apps,
with the icon line present and absent:

  control, .Icon present, preview.14    title bar mark shown
  line removed, preview.14              title bar mark shown  <- the change
  line removed + icon: arg, preview.14  title bar mark shown
  line removed, preview.13              NO mark

The last row is the negative control: identical source and capture method,
only the package version differs, so the mark on preview.14 is caused by the
inherit behaviour rather than by something incidental.

All four templates were then scaffolded from the built pack and built clean
on x64: Debug 0 warnings, Release 2 warnings. The Release warnings are
pre-existing IL2104 trim warnings from Microsoft.Windows.SDK.NET and
WinRT.Runtime, unrelated to this change and present without it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1

* Fix errors from missing resource dll with version info (#6725)

* [57514396] Use central TSA config for Foundation source analysis (#6738)

* Normalize line endings in AppInstance.cpp (#6752)

* AppNotificationManager::Show and AppInstance::GetInstances: refactor to noexcept workers (Bug 61688595) (#6714)

Refactor two hot-path WinRT projection entry points so a failed HRESULT does not trigger the deep C++/WinRT projection rethrow path that exhausted the stack via WIL's FormatMessage-based exception logging chain inside ResultFromCaughtException_CppWinRt::catch$8 (the Watson failure signature for this crash bucket).

AppNotificationManager::Show: move the throwing body into a private noexcept HRESULT worker (ShowImpl) using RETURN_HR_IF / RETURN_IF_FAILED / CATCH_RETURN. The public Show keeps the IsSupported() early-return and rethrows any failure HRESULT via THROW_IF_FAILED(ShowImpl(...)).

AppLifecycle::AppInstance::GetInstances: same pattern. The body becomes GetInstancesImpl(IVector<AppInstance>& out) noexcept; the public GetInstances() is a thin THROW_IF_FAILED(GetInstancesImpl(...)) wrapper. Internal callers (RedirectActivationToAsync at line 636) are unaffected because the public signature is unchanged.

These are the two entry points observed in the Watson cabs attached to this bucket: WinUI3 Controls Gallery cabs originate in Show, and the auto-filer cab originates in Photos -> AppInstance::GetInstances (frames 16-22 in the cab call stack). The catch handler one frame deeper is mis-attributed by Watson's PDB walker to SecurityDescriptorHelpers::NonDelegatingGetTrustLevel::catch$0 (lexically-nearest catch symbol).

AB#61688595

Co-authored-by: James Pike <jamespik@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Retire the standalone StoragePickersTestApp (#6779)

Remove the specialized UI harness, its assets, and solution mappings to simplify ongoing build maintenance. Keep the Storage Pickers implementation and automated tests unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Change WindowsAppSDK-DotnetNewTemplates template from Microsoft.NonOfficial to Microsoft.Official template (#6783)

* Add OneBranch.Official.CrossPlat.yml template to WindowsAppSDK-DotnetNewTemplates.yml

* Use Microsoft Official template for dotnet templates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 30bef3b6-3b91-4f20-96cd-7c242a8a370f

---------

Copilot-Session: 30bef3b6-3b91-4f20-96cd-7c242a8a370f

* Add network isolation to WindowsAppSDK-DotnetNewTemplates.yml (#6787)

* Use path filter for template PR validation (#6782)

* Skip OneBranch tool download when running template change validation on PRs from forks

* Use ADO path filter for template PR validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6baeec26-f59b-466a-8eab-cd3b09b19380

---------

Copilot-Session: 6baeec26-f59b-466a-8eab-cd3b09b19380

* Reactor templates: bump to 0.1.0-preview.16 and raise WindowsAppSDK floor to 2.2.0 (#6786)

Updates the four Reactor dotnet-new templates for the 0.1.0-preview.16 release:

  reactorVersion       0.1.0-preview.14 -> 0.1.0-preview.16
  windowsAppSdkVersion documented floor 2.1.3 -> 2.2.0

microsoft/microsoft-ui-reactor#1259 adopts ApplicationData.GetForUnpackaged(),
a Windows App SDK 2.2.0 API, and raises Microsoft.UI.Reactor's dependency on
Microsoft.WindowsAppSDK.WinUI to 2.2.1. Verified that commit is contained in
the v0.1.0-preview.16 tag, and that Directory.Build.props at that tag declares
WindowsAppSDKVersion 2.2.0 / WindowsAppSDKWinUIVersion 2.2.1.

These templates reference the full Microsoft.WindowsAppSDK metapackage (not the
lean WinUI sub-package) and scaffold packaged single-project MSIX apps, so the
correct consumer floor is metapackage 2.2.0 - the first version whose WinUI
dependency is 2.2.1 (2.1.3 -> WinUI 2.1.0; 2.2.0 -> WinUI 2.2.1).

Both edits ship together because the mismatch they prevent is silent, not a
restore error. Measured with a stub package carrying the post-#1259 dependency
shape: pinning --wasdk-version 2.1.3 restores with exit code 0 and zero
warnings, resolving Microsoft.WindowsAppSDK.WinUI 2.2.1 while the metapackage
holds Microsoft.WindowsAppSDK.Runtime at exactly [2.1.3]. WinUI is only ever a
transitive reference, so NuGet takes the highest floor and never reports
NU1605; the result is 2.2.1 reference assemblies over a 2.1.3 runtime, which
builds clean and fails at runtime. The same probe at 2.2.0 resolves Runtime
2.2.0. Since the toolchain raises no error, the description text is the only
guardrail a user pinning explicitly will ever see.

Validated by scaffolding all four templates from a locally packed template
pack: each emits Microsoft.UI.Reactor and Microsoft.UI.Reactor.Devtools at
0.1.0-preview.16, Microsoft.WindowsAppSDK at the default '*', and a
Package.appxmanifest. Also verified the explicit pin path
(--wasdk-version 2.2.0 --reactor-version 0.1.0-preview.16).

Restore/build validation is deferred to CI: 0.1.0-preview.16 is on nuget.org
but has not yet mirrored to the internal package proxy reachable from this
machine.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Pin GitHub Actions to full-length commit SHAs (#6791)

Co-authored-by: Dan Fiedler <danfiedler@microsoft.com>

* Retry transient bootstrap initialization registration failures in tests (#6816)

* Retry transient bootstrap initialization failure

Retry MddBootstrapInitialize only when DDLM registration is temporarily unavailable, using a bounded exponential backoff.

AB#62489699

* Migrate TouchDownBuild-WinAppSDK  (#6814)

* Fix TouchDown variable group

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e6b7e13d-59ce-4751-91f4-e8e589787837

* Fix TouchDown service connection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e6b7e13d-59ce-4751-91f4-e8e589787837

* Use TouchDown Azure resource connection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e6b7e13d-59ce-4751-91f4-e8e589787837

---------

Copilot-Session: e6b7e13d-59ce-4751-91f4-e8e589787837

---------

Co-authored-by: Roman Sivak (AKVELON INC) <v-romansivak@microsoft.com>
Co-authored-by: ssparach <128866445+ssparach@users.noreply.github.com>
Copilot-Session: e6b7e13d-59ce-4751-91f4-e8e589787837

---------

Co-authored-by: Lauren Ciha <laurenciha@microsoft.com>
Co-authored-by: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com>
Co-authored-by: Howard Kapustein <howardk@microsoft.com>
Co-authored-by: Vineeth Thomas Alex <vineeththomasalex@gmail.com>
Co-authored-by: Vineeth Thomas Alex <vithoma@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: v-goradojcic <v-goradojcic@microsoft.com>
Co-authored-by: Alexandre Zollinger Chohfi <alzollin@microsoft.com>
Co-authored-by: Dinah Xiaoman G <116714259+DinahK-2SO@users.noreply.github.com>
Co-authored-by: Scott Jones <sjones@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>
Co-authored-by: Dreynor87 <wall_c.s@outlook.com>
Co-authored-by: James Pike <jamespik@microsoft.com>
Co-authored-by: Dan Fiedler <danfiedler@microsoft.com>
Co-authored-by: romsi1983 <41230962+romsi1983@users.noreply.github.com>
Co-authored-by: Roman Sivak (AKVELON INC) <v-romansivak@microsoft.com>
Co-authored-by: ssparach <128866445+ssparach@users.noreply.github.com>
Copilot-Session: 2b34993b-0dcf-4789-94c5-97fd92cce84d
Copilot-Session: 5474160f-e555-4254-899b-783ad9211b71
Copilot-Session: 484c9277-ea15-4f85-a4a0-0429347ade48
Copilot-Session: 16d7d2fc-3d7c-41e8-9999-0c2084ba9ea1
Copilot-Session: 38f0823a-2ee4-4c65-8f3f-7dde6a049509
Copilot-Session: 30bef3b6-3b91-4f20-96cd-7c242a8a370f
Copilot-Session: 6baeec26-f59b-466a-8eab-cd3b09b19380
Copilot-Session: e6b7e13d-59ce-4751-91f4-e8e589787837
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.

2 participants