Repository navigation
Add spec 022: packaging and distribution - #21
Merged
Chris Anderson (codemonkeychris) merged 1 commit intoApr 17, 2026
Merged
Conversation
Captures the plan to ship Reactor as a consumable artifact so app developers can take a PackageReference instead of enlisting in the source. Covers the NuGet layout, the mur CLI distribution, versioning via MinVer, per-PR builds, and the internal → NDA → public rollout phases with signing requirements. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chris Anderson (codemonkeychris)
deleted the
docs/022-packaging-distribution
branch
April 17, 2026 17:48
Chris Anderson (codemonkeychris)
added a commit
that referenced
this pull request
May 22, 2026
Resolves the 22 findings from the docking feature-branch review + two test failures that surfaced while running the full suite. Behavior fixes (Native docking host): - Tear-out / FloatOp: open the floating window BEFORE removing the pane from the docked tree. Layout mutation + OnContentFloated fire only when a real ReactorWindow was produced (review #1 — the previous broad catch around Open turned a failed transition into a success-shaped event). - Drop-overlay global Esc handler now detaches on reconciler unmount in addition to WinUI Unloaded (review #2). - Floating-window observer callbacks, BeforeInsertToolWindow strategy hook, drag-session SessionChanged broadcast, navigator commit callback, and theme/resource lookup catches all surface failures via Debug.WriteLine or narrow to the expected exception type instead of swallowing everything (reviews #3, #4, #5, #7, #8). - Splitter OnPointerCaptureLost now calls RestorePairToGrow() before the final ResizeDelta to converge with the normal release path (review #6). Persistence: - DockLayoutSerializer.Load now routes pre-current-schema documents through DockLayoutMigrationRegistry: parse to JsonNode, detect schema (absent $schema = v1 per §5.4.4), TryUpgrade, then deserialize. Adds a Load(json, registry) overload and emits a PII-safe schema-newer ETW category for forward-tolerant inputs (reviews #9 + #10). - PreviousContainerTracker.ClearAll now actually clears by swapping in a fresh ConditionalWeakTable under a lock (review #11). Surface honesty: - DockHostModel.Floating is populated by the host renderer from a per-manager floating-window tracker; doc comment makes the initial-bounds-only limitation explicit (review #12). - UseDockPanePersisted uses a canonical persisted-key encoder (pane:<typeName>|<keyText>:<userKey> with %/colon/pipe escaping) so two panes whose Key.ToString() collide get independent slots (review #13). - docking.dock detects ambiguous Key.ToString() matches and returns an explicit ambiguous-pane error (review #18). Test isolation: - New DockingGlobalsCollection ([Collection("DockingGlobals")] + DisableParallelization=true) covers DockingStringsTests, DockA11yTests, and DevtoolsDockingToolsTests — three classes that mutate process-global state (review #14). DockA11yTests now restores DockingStrings.Resolver in Dispose. - The known-failing UseEffect cleanup assertion is emitted as TAP "# SKIP" via a new Harness.Skip helper, with a back-flip to a real Check the moment the §2.25 product gap closes (review #15). - EffectCounterComponent moved off static counters; the fixture owns per-run counters and passes mount/cleanup callbacks via props (review #16). - EventListener category assertions in LayoutSerializerTests use a bounded retry helper to tolerate occasional async dispatch (review #17). Documentation: - docs/_pipeline/apps/docking/{api,overview}.md updated for the P2 reality (core Microsoft.UI.Reactor ship vehicle, DockingNativeInterop.Register, deleted vendored WinUI.Dock link) (reviews #19, #22). - DockingStrings.cs + dock-showcase sample comments updated to reflect that no .resw resource ships today; DefaultEnglish + the resolver are the localization surface (review #20). - Reactor.csproj stale "stays on disk for reference" comment about src/Reactor.Docking.Xaml/ replaced with current state (review #21). Tests / fluents: - Added 22 fluent extensions in ElementExtensions.Events.cs for DockManager event callbacks + TabViewElement.OnTabDragStarting / OnTabDragCompleted so PublicApiSurfaceGuardTests passes; the guard test itself is now scoped to public element records only (internal overlay/splitter elements aren't part of the public surface contract). - Two stale Phase-1-wrapper fixture names removed from SelfTestFixtureRegistry.AllFixtures (they had no factory case and surfaced as MSTest "fixture not found" failures). - NativeDocking_PerGroupDropTargetVisualDemo: observer-pause delays cut from 500ms/step to 50ms/step so the 20-step walk stays well inside the 15s fixture timeout under CI load; eliminates the cascading NRE in DragSessionConfirmMutatesLayout that was caused by the timed-out fixture leaving stale host state. - Mutations_OffOwnerThread_Throw uses an explicit new Thread() instead of Task.Run, so the assert can never observe a thread-id match by chance. - Load_MissingSchemaField_FallsBack renamed to Load_MissingSchemaField_TreatedAsV1AndMigrated and rewritten — empty {} now migrates as v1 (matches the integrated registry). Validation: - dotnet test tests/Reactor.Tests -p:Platform=x64 → 8720 passed, 46 skipped, 0 failed - dotnet test tests/Reactor.SelfTests -p:Platform=x64 → 813 passed, 0 failed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 of 7 tasks
Chris Anderson (codemonkeychris)
added a commit
that referenced
this pull request
May 22, 2026
Resolves the 22 findings from the docking feature-branch review + two test failures that surfaced while running the full suite. Behavior fixes (Native docking host): - Tear-out / FloatOp: open the floating window BEFORE removing the pane from the docked tree. Layout mutation + OnContentFloated fire only when a real ReactorWindow was produced (review #1 — the previous broad catch around Open turned a failed transition into a success-shaped event). - Drop-overlay global Esc handler now detaches on reconciler unmount in addition to WinUI Unloaded (review #2). - Floating-window observer callbacks, BeforeInsertToolWindow strategy hook, drag-session SessionChanged broadcast, navigator commit callback, and theme/resource lookup catches all surface failures via Debug.WriteLine or narrow to the expected exception type instead of swallowing everything (reviews #3, #4, #5, #7, #8). - Splitter OnPointerCaptureLost now calls RestorePairToGrow() before the final ResizeDelta to converge with the normal release path (review #6). Persistence: - DockLayoutSerializer.Load now routes pre-current-schema documents through DockLayoutMigrationRegistry: parse to JsonNode, detect schema (absent $schema = v1 per §5.4.4), TryUpgrade, then deserialize. Adds a Load(json, registry) overload and emits a PII-safe schema-newer ETW category for forward-tolerant inputs (reviews #9 + #10). - PreviousContainerTracker.ClearAll now actually clears by swapping in a fresh ConditionalWeakTable under a lock (review #11). Surface honesty: - DockHostModel.Floating is populated by the host renderer from a per-manager floating-window tracker; doc comment makes the initial-bounds-only limitation explicit (review #12). - UseDockPanePersisted uses a canonical persisted-key encoder (pane:<typeName>|<keyText>:<userKey> with %/colon/pipe escaping) so two panes whose Key.ToString() collide get independent slots (review #13). - docking.dock detects ambiguous Key.ToString() matches and returns an explicit ambiguous-pane error (review #18). Test isolation: - New DockingGlobalsCollection ([Collection("DockingGlobals")] + DisableParallelization=true) covers DockingStringsTests, DockA11yTests, and DevtoolsDockingToolsTests — three classes that mutate process-global state (review #14). DockA11yTests now restores DockingStrings.Resolver in Dispose. - The known-failing UseEffect cleanup assertion is emitted as TAP "# SKIP" via a new Harness.Skip helper, with a back-flip to a real Check the moment the §2.25 product gap closes (review #15). - EffectCounterComponent moved off static counters; the fixture owns per-run counters and passes mount/cleanup callbacks via props (review #16). - EventListener category assertions in LayoutSerializerTests use a bounded retry helper to tolerate occasional async dispatch (review #17). Documentation: - docs/_pipeline/apps/docking/{api,overview}.md updated for the P2 reality (core Microsoft.UI.Reactor ship vehicle, DockingNativeInterop.Register, deleted vendored WinUI.Dock link) (reviews #19, #22). - DockingStrings.cs + dock-showcase sample comments updated to reflect that no .resw resource ships today; DefaultEnglish + the resolver are the localization surface (review #20). - Reactor.csproj stale "stays on disk for reference" comment about src/Reactor.Docking.Xaml/ replaced with current state (review #21). Tests / fluents: - Added 22 fluent extensions in ElementExtensions.Events.cs for DockManager event callbacks + TabViewElement.OnTabDragStarting / OnTabDragCompleted so PublicApiSurfaceGuardTests passes; the guard test itself is now scoped to public element records only (internal overlay/splitter elements aren't part of the public surface contract). - Two stale Phase-1-wrapper fixture names removed from SelfTestFixtureRegistry.AllFixtures (they had no factory case and surfaced as MSTest "fixture not found" failures). - NativeDocking_PerGroupDropTargetVisualDemo: observer-pause delays cut from 500ms/step to 50ms/step so the 20-step walk stays well inside the 15s fixture timeout under CI load; eliminates the cascading NRE in DragSessionConfirmMutatesLayout that was caused by the timed-out fixture leaving stale host state. - Mutations_OffOwnerThread_Throw uses an explicit new Thread() instead of Task.Run, so the assert can never observe a thread-id match by chance. - Load_MissingSchemaField_FallsBack renamed to Load_MissingSchemaField_TreatedAsV1AndMigrated and rewritten — empty {} now migrates as v1 (matches the integrated registry). Validation: - dotnet test tests/Reactor.Tests -p:Platform=x64 → 8720 passed, 46 skipped, 0 failed - dotnet test tests/Reactor.SelfTests -p:Platform=x64 → 813 passed, 0 failed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chris Anderson (codemonkeychris)
added a commit
that referenced
this pull request
May 23, 2026
Resolves the 22 findings from the docking feature-branch review + two test failures that surfaced while running the full suite. Behavior fixes (Native docking host): - Tear-out / FloatOp: open the floating window BEFORE removing the pane from the docked tree. Layout mutation + OnContentFloated fire only when a real ReactorWindow was produced (review #1 — the previous broad catch around Open turned a failed transition into a success-shaped event). - Drop-overlay global Esc handler now detaches on reconciler unmount in addition to WinUI Unloaded (review #2). - Floating-window observer callbacks, BeforeInsertToolWindow strategy hook, drag-session SessionChanged broadcast, navigator commit callback, and theme/resource lookup catches all surface failures via Debug.WriteLine or narrow to the expected exception type instead of swallowing everything (reviews #3, #4, #5, #7, #8). - Splitter OnPointerCaptureLost now calls RestorePairToGrow() before the final ResizeDelta to converge with the normal release path (review #6). Persistence: - DockLayoutSerializer.Load now routes pre-current-schema documents through DockLayoutMigrationRegistry: parse to JsonNode, detect schema (absent $schema = v1 per §5.4.4), TryUpgrade, then deserialize. Adds a Load(json, registry) overload and emits a PII-safe schema-newer ETW category for forward-tolerant inputs (reviews #9 + #10). - PreviousContainerTracker.ClearAll now actually clears by swapping in a fresh ConditionalWeakTable under a lock (review #11). Surface honesty: - DockHostModel.Floating is populated by the host renderer from a per-manager floating-window tracker; doc comment makes the initial-bounds-only limitation explicit (review #12). - UseDockPanePersisted uses a canonical persisted-key encoder (pane:<typeName>|<keyText>:<userKey> with %/colon/pipe escaping) so two panes whose Key.ToString() collide get independent slots (review #13). - docking.dock detects ambiguous Key.ToString() matches and returns an explicit ambiguous-pane error (review #18). Test isolation: - New DockingGlobalsCollection ([Collection("DockingGlobals")] + DisableParallelization=true) covers DockingStringsTests, DockA11yTests, and DevtoolsDockingToolsTests — three classes that mutate process-global state (review #14). DockA11yTests now restores DockingStrings.Resolver in Dispose. - The known-failing UseEffect cleanup assertion is emitted as TAP "# SKIP" via a new Harness.Skip helper, with a back-flip to a real Check the moment the §2.25 product gap closes (review #15). - EffectCounterComponent moved off static counters; the fixture owns per-run counters and passes mount/cleanup callbacks via props (review #16). - EventListener category assertions in LayoutSerializerTests use a bounded retry helper to tolerate occasional async dispatch (review #17). Documentation: - docs/_pipeline/apps/docking/{api,overview}.md updated for the P2 reality (core Microsoft.UI.Reactor ship vehicle, DockingNativeInterop.Register, deleted vendored WinUI.Dock link) (reviews #19, #22). - DockingStrings.cs + dock-showcase sample comments updated to reflect that no .resw resource ships today; DefaultEnglish + the resolver are the localization surface (review #20). - Reactor.csproj stale "stays on disk for reference" comment about src/Reactor.Docking.Xaml/ replaced with current state (review #21). Tests / fluents: - Added 22 fluent extensions in ElementExtensions.Events.cs for DockManager event callbacks + TabViewElement.OnTabDragStarting / OnTabDragCompleted so PublicApiSurfaceGuardTests passes; the guard test itself is now scoped to public element records only (internal overlay/splitter elements aren't part of the public surface contract). - Two stale Phase-1-wrapper fixture names removed from SelfTestFixtureRegistry.AllFixtures (they had no factory case and surfaced as MSTest "fixture not found" failures). - NativeDocking_PerGroupDropTargetVisualDemo: observer-pause delays cut from 500ms/step to 50ms/step so the 20-step walk stays well inside the 15s fixture timeout under CI load; eliminates the cascading NRE in DragSessionConfirmMutatesLayout that was caused by the timed-out fixture leaving stale host state. - Mutations_OffOwnerThread_Throw uses an explicit new Thread() instead of Task.Run, so the assert can never observe a thread-id match by chance. - Load_MissingSchemaField_FallsBack renamed to Load_MissingSchemaField_TreatedAsV1AndMigrated and rewritten — empty {} now migrates as v1 (matches the integrated registry). Validation: - dotnet test tests/Reactor.Tests -p:Platform=x64 → 8720 passed, 46 skipped, 0 failed - dotnet test tests/Reactor.SelfTests -p:Platform=x64 → 813 passed, 0 failed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Jun 25, 2026
Alexandre Zollinger Chohfi (azchohfi)
added a commit
that referenced
this pull request
Jun 26, 2026
Reduces redundant WinRT/COM-RCW boundary crossings and per-element allocations on the diff/reconcile/patch hot path (data-grid stress workload, StocksGrid). Targets the dominant Reconcile gap. Reconciler.cs / Update.cs / Mount.cs: - #16 UnmountRecursive: read ReactorAttached.State once (was 5x GetValue). - #17 UnmountAndCollect: read element tag once (was 5x GetElementTag). - #14 Update: coalesce repeated `is FrameworkElement` RCW type-tests to one. - #15 Cache the component rerender delegate on ComponentNode; recreate only when the requestRerender identity changes. - #18 UpdateDefaultAutomationName: ref/ordinal short-circuit before the AutomationProperties.GetName COM read. - #19 ApplyModifiers accepts null = clear-all (no fresh ElementModifiers). - #20 PopulateDirtyAncestorPath iterates a tracked self-triggered set instead of the whole _componentNodes dict. - #21 UnmountAndPool reuses a borrowed scratch list (reentrant calls fall back to a fresh list). - #22 RefreshRealizedContainers reuses a cleared field list. - #23 ApplyStyleToElement ref-equal + ActualTheme guard; ApplyThemeBindings gated on the ShallowEquals fast path. - #24 BuildCacheKey: thread-static StringBuilder + pair buffer, single pass. - #25 HasConsumedContextChanged compares via Context<T>/EqualityComparer<T> (no boxing of value-type context). - #26 ApplyResourceOverrides: no ToHashSet/ToArray, ref-equal fast path. - #27 WireReferenceListEdge: static loop, no per-edge List/closures. - #28 ApplyStaggerDelays: hoisted static animation-key array. - #29 PushContextDisposable: single-pair push overload, pooled PopOnDispose. Reconciler.KeyedItemsBinding.cs: - #39 ref-equality cache; only realloc + SetItemViewSource on change. Reconciler.Mount.cs: - #40 LayoutFootgunDetector gated by GridElement pre-filter. AccessibilityScanner.cs (debug-only scan path): - #62 compute GetChildren once in Walk, pass into Push. - #63 cache sibling-text array in ScanContext, invalidate on Push. - #64 BuildContext single-pass with pooled scratch (no LINQ chains). - #65 IsLikelyEmoji explicit span loop (no LINQ). - #66 CheckTabIndexGaps sorts a rented buffer (no OrderBy/ToList). Behavior preserved exactly: coalesced COM reads observe the same values at the same times; unmount/cleanup ordering unchanged; scanner emits identical findings. AOT/trim clean (no new reflection). Adds tests/Reactor.Tests/ReconcilerInteropPerfTests.cs (11 tests: rerender-delegate caching, context-change compare, cache-key reuse, single-pair context push, scanner output parity). Closes #654 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/spec/022-packaging-and-distribution.md— a plan for shipping Reactor as an installable artifact so app developers can consume it via<PackageReference>without enlisting in the source.Microsoft.UI.ReactorNuGet, bundlingReactor.AnalyzersandReactor.Localization.Generatorinside the same.nupkgunderanalyzers/dotnet/cs/.murCLI ships as per-RID self-contained zips on GitHub Releases (not adotnet tool— WinUI TFM + platform pins make that path brittle), with aninstall-mur.ps1helper.0.1.0-pr.<num>.<sha>), uploaded as workflow artifacts so reviewers can install the PR's build into a throwaway consumer repo.Open questions (need answers before P1 ships)
microsoft/org. Public distribution (P3) needs this resolved — almost certainly move to MIT.Microsoft.UI.Reactorassumes we stay in theMicrosoft.UI.*namespace (see spec 018). If that decision changes, the package ID follows.Microsoft.UI.Reactor.Monacoif it becomes a complaint.Microsoft.WindowsAppSDK2.0.0-experimental6. Consumers wanting a different WinUI version will conflict. Decide: float transitively, or lock and force consumers to match.murinstall-script trust boundary.iwr | iexfrom GitHub Releases works for P1 but will concern P3 users. Document a signed-binary fallback before public launch.Test plan
0.1.0-pr.<num>.<sha>) is acceptable🤖 Generated with Claude Code