Skip to content

Make TaskbarItem the only taskbar surface - #1828

Open
Alexandre Zollinger Chohfi (azchohfi) wants to merge 4 commits into
mainfrom
azchohfi-taskbar-item-only-surface
Open

Alexandre Zollinger Chohfi (azchohfi) wants to merge 4 commits into
mainfrom
azchohfi-taskbar-item-only-surface

Conversation

@azchohfi

@azchohfi Alexandre Zollinger Chohfi (azchohfi) commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 5ef043d65b32a50ab8d991adc260a2f6aaf85b2f

Dimension Assessment Rationale
Change confidence 9.5/10 ↑ Moved code matches the removed ReactorWindow members line for line (lazy init, UI-thread and disposed checks, WM_COMMAND routing, dispose release).
↑ New selftest checks laziness, click routing via real WM_COMMAND, post-dispose behavior and the UI-thread guards. A mutation of the routing and release turned them red.
↑ CI green on this head (50 pass, 2 path-skipped), including the solution build and the VSIX projects.
↑ 16,951 unit tests and 481 Window* selftests pass locally. Copilot review recommends approval with no open issues.

Summary

TaskbarItem is now the only taskbar API. The ReactorWindow shortcuts Progress, Overlay, SetThumbnailToolbar and ClearThumbnailToolbar are removed, and their implementation lives in TaskbarItem instead of forwarding back to the window.

Migration is a straight rename. window.Progress becomes window.TaskbarItem.Progress, and the same for the others. From a component it's UseWindow()!.TaskbarItem, which is what the skills and doc apps already use.

Nothing else changes. Each feature is still allocated on first use, so a window that never touches the taskbar doesn't initialise the shell COM object. Thumbnail clicks still come in through the window's message pump and run OnClick on the UI thread. The toolbar's icons and handlers are still released when the window is disposed, SetThumbnailToolbar still throws ObjectDisposedException after that, and ClearThumbnailToolbar is still a no-op.

Linked issue / spec

Relates to #1819

Test plan

  • Rewrote the TaskbarItem_ProgressRegression selftest. It used to compare against the removed win.Progress/win.Overlay. It now checks that nothing is allocated until it's read, and that the instances stay stable.
  • Added TaskbarItem_ThumbnailToolbarLifetime. It sends WM_COMMAND to the window and checks the click reaches the right button, that unused slots, cleared toolbars and disposed windows don't dispatch, and that both toolbar methods throw off the UI thread. If the shell rejects the buttons it seeds the click map so routing is still checked, and reports the shell-only legs as skips. Breaking the routing or the dispose release in ReactorWindow turns 4 of these red.
  • dotnet run --project tests/Reactor.AppTests.Host -- --self-test --filter "TaskbarItem" (27 ok), --filter "Window" (481 ok)
  • dotnet restore Reactor.slnx then dotnet build Reactor.slnx --no-restore -c Release: no compiler errors locally. The VSIX projects couldn't restore behind the local proxy, and CI builds them green.
  • dotnet test tests/Reactor.Tests -c Release -p:Platform=x64: 16,951 passed, 18 skipped
  • Regenerated both reactor.api.txt copies, the reference docs (compile --reference-only) and the desktop-integration guide topic

Risk / breaking changes

Breaking for any app that calls the four removed ReactorWindow members. They become compile errors, and the CHANGELOG Removed entry gives the replacement for each one. Behavior through TaskbarItem is unchanged.

Move the progress, overlay and thumbnail-toolbar implementation from
ReactorWindow into TaskbarItem and remove the ReactorWindow.Progress,
Overlay, SetThumbnailToolbar and ClearThumbnailToolbar shortcuts.

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

Seed the click map when the shell rejects the toolbar so the WM_COMMAND
routing and dispose-release checks always run, and report the
shell-dependent legs as skips. Replace UnsafeAccessor field access with
internal accessors, and cover the moved UI-thread guards.

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

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.

🟢 Approval recommended

The TaskbarItem consolidation has no active review issues.

No open issues 🎉

What changed in this PR

Consolidates Reactor’s per-window taskbar API under TaskbarItem, removing compatibility shortcuts as part of #1819.

Changes:

  • Moves taskbar implementation into TaskbarItem, preserving lazy initialization, click routing, and disposal cleanup.
  • Migrates selftests and adds toolbar lifetime and thread-guard coverage.
  • Updates documentation, API indexes, and breaking-change migration guidance.
File Description
tests/​Reactor.Tests/​TaskbarProgressTests.cs Updates an accessor comment.
tests/​Reactor.AppTests.Host/​SelfTest/​SelfTestFixtureRegistry.cs Registers the toolbar lifetime fixture.
tests/​Reactor.AppTests.Host/​SelfTest/​Fixtures/​WindowModelFixtures.cs Migrates tests to TaskbarItem.
tests/​Reactor.AppTests.Host/​SelfTest/​Fixtures/​Phase6WindowingFixtures.cs Tests lazy allocation, routing, guards, and disposal.
src/​Reactor/​Hosting/​Shell/​ThumbnailToolbarButton.cs Updates the XML documentation reference.
src/​Reactor/​Hosting/​Shell/​ThumbnailToolbar.cs Extracts slot adoption and adds test helpers.
src/​Reactor/​Hosting/​Shell/​TaskbarProgress.cs Updates the XML documentation reference.
src/​Reactor/​Hosting/​Shell/​TaskbarOverlay.cs Updates the XML documentation reference.
src/​Reactor/​Hosting/​Shell/​TaskbarItem.cs Owns lazy taskbar features and toolbar operations.
src/​Reactor/​Hosting/​ReactorWindow.cs Removes shortcuts and delegates routing and cleanup.
src/​Reactor.Analyzers/​WindowIconSurfaceAnalyzer.cs Updates an example comment only.
skills/​reactor.api.txt Removes obsolete window members from the API index.
plugins/​reactor/​skills/​reactor-dsl/​references/​reactor.api.txt Synchronizes the mirrored API index.
docs/​guide/​reference/​hosting/​taskbar.md Refreshes generated taskbar API documentation.
docs/​guide/​reference/​hosting/​ReactorWindow.md Removes documentation for deleted shortcuts.
docs/​guide/​desktop-integration.md Updates the generated taskbar guide.
docs/​_pipeline/​templates/​desktop-integration.md.dt Updates the taskbar guide source.
CHANGELOG.md Documents the breaking change and replacements.

Review effort: Balanced

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build metrics

Artifact sizes for 5ef043d vs the base branch (7020f0c).

Packages (compressed .nupkg)

Artifact base PR Δ
Microsoft.UI.Reactor.nupkg 2.19 MB 2.19 MB +478 B (+0.02%) ≈
Microsoft.UI.Reactor.Advanced.nupkg 531.4 KB 531.4 KB -5 B (0.00%) ≈
Microsoft.UI.Reactor.Devtools.nupkg 290.6 KB 290.6 KB -8 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor

Artifact base PR Δ
Microsoft.UI.Reactor.dll 2.93 MB 2.93 MB +512 B (+0.02%) ≈
Reactor.Analyzers.dll 469.5 KB 469.5 KB +0 B (0.00%) ≈
Reactor.Localization.Generator.dll 16.0 KB 16.0 KB +0 B (0.00%) ≈
Reactor.Wrappers.Abstractions.dll 12.0 KB 12.0 KB +0 B (0.00%) ≈
Reactor.Wrappers.Generator.dll 229.5 KB 229.5 KB +0 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor.Advanced

Artifact base PR Δ
Microsoft.UI.Reactor.Advanced.dll 1.08 MB 1.08 MB +0 B (0.00%) ≈

Assemblies in Microsoft.UI.Reactor.Devtools

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

No size change beyond the noise floor. ✅

✅ 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 Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🧪 Merged coverage

Coverage for 5ef043d vs the base branch (7020f0c) — unit + selftest merged.

Metric base PR Δ
Line 89.22% 89.24% +0.02 pp ≈
Branch 43.99% (18780/42687) 43.99% (18781/42691) 0.00 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.

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

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.

🟢 Approval recommended

No active review issues were identified for the TaskbarItem API consolidation.

No open issues 🎉

Review effort: Balanced

@azchohfi Alexandre Zollinger Chohfi (azchohfi) added ready-for-review Agent work and technical checks complete; awaiting review, not approval or merge and removed agent-preparing Agent is addressing feedback or completing required validation and CI labels Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Agent work and technical checks complete; awaiting review, not approval or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants