Skip to content

Move source projects under src/ directory - #8

Merged
Chris Anderson (codemonkeychris) merged 1 commit into
mainfrom
refactor/move-src-to-src-dir
Apr 17, 2026
Merged

Chris Anderson (codemonkeychris) merged 1 commit into
mainfrom
refactor/move-src-to-src-dir

Conversation

@codemonkeychris

Copy link
Copy Markdown
Collaborator

Summary

  • Moves Reactor, Reactor.Analyzers, Reactor.Cli, Reactor.Interop.WinForms, Reactor.Localization.Generator, and vscode-reactor under a top-level src/ directory
  • Standard project convention — source separated from tests/, samples/, and docs/
  • Updates 61 consuming .csproj files (tests, samples, docs/apps), Reactor.sln, .gitignore, and Reactor.Cli.csproj internal paths (SelfHostDir, SKILL.md resource)
  • Refreshes path references in README.md, CONTRIBUTING.md, samples/WinFormsInterop/README.md
  • Replaces stale duct CLI command refs with the actual mur binary name in user-facing docs

Test plan

  • Local: dotnet test tests/Reactor.Tests — 3518 passed, 0 failed, 46 skipped
  • CI workflow (added in Add GitHub Actions CI for unit tests #7) passes on this PR
  • Visual Studio: Reactor.sln opens and builds without broken project references
  • dotnet run --project tests/Reactor.AppTests.Host -- --self-test still green (not re-run locally after moves, but nothing in the selfhost path depends on top-level project locations)

Notes

  • Left alone: docs/tasks/*.md historical implementation tracking docs and docs/winui3-integration-proposals.md (~25 Reactor/... line refs) — these are frozen records of past work; updating them is low-value churn
  • Git correctly detected all file movements as renames (100% similarity), so blame/history is preserved

🤖 Generated with Claude Code

Relocates Reactor, Reactor.Analyzers, Reactor.Cli, Reactor.Interop.WinForms,
Reactor.Localization.Generator, and vscode-reactor under a top-level src/
directory, following standard project convention and separating source
from tests/, samples/, and docs/.

Updated:
- Reactor.sln project paths
- ProjectReference paths in 61 consuming .csproj files (tests, samples,
  docs/apps)
- Reactor.Cli.csproj SelfHostDir and SKILL.md resource paths to account
  for the new depth
- .gitignore Rust differ path
- README.md, CONTRIBUTING.md, samples/WinFormsInterop/README.md paths
- Doc references from `duct` CLI command to actual `mur` binary name
  in CONTRIBUTING.md, docs/templates/ai-author-skill.md,
  docs/reference/localization-ci.md, docs/spec/013-doc-system-design.md

Verified: dotnet test tests/Reactor.Tests -> 3518 passed, 0 failed, 46 skipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@codemonkeychris
Chris Anderson (codemonkeychris) merged commit 9b558ba into main Apr 17, 2026
2 checks passed
Chris Anderson (codemonkeychris) added a commit that referenced this pull request Apr 18, 2026
…ames

Addresses the second-round AI-agent field feedback. Build still compiles
and 3708 unit tests pass.

- #2 Stable window id: WindowIdAllocator.Reserve pins the primary
  devtools window to "main" so the handle survives switchComponent
  changing the window title. Windows payload surfaces `currentComponent`.
- #4 Scroll units + readback: description explicitly calls out
  percentage-delta semantics; response now carries `scrollOffsetPx` and
  `scrollableSizePx` dug out of the underlying ScrollViewer, and the
  -1 sentinel is replaced with null when an axis isn't scrollable.
- #5 Accessible names at mount: the reconciler now mirrors visible
  captions into AutomationProperties.Name for Button, HyperlinkButton,
  RepeatButton, ToggleButton, DropDownButton, SplitButton,
  ToggleSplitButton, CheckBox, RadioButton, ToggleSwitch, TextField, and
  TextBlock. Author-supplied .AutomationName(...) still wins; the
  Update path handles label changes via a provenance-aware compare so
  author overrides are preserved.
- #6 includeReactorSource rejection: tree tool returns structured
  not-implemented instead of silently no-opping.
- #7 ComboBox expand/collapse: new `expand` / `collapse` MCP verbs
  wrap IExpandCollapseProvider; `select` auto-expands a closed
  container so the popup items resolve.
- #9 Fire lambda confusion: unknown-event payload lists
  reachableMethods and explains inline lambdas aren't reflectable;
  tool description warns upfront.
- Usability: GET /mcp self-describes (schema, protocolVersion, tools,
  selectorGrammar, events); tools/list adds _selectorGrammar +
  _treeSchemaVersion extensions so POST-based agents get the grammar
  without a second hop; components tool returns ComponentInfo[] with
  isNested/isPublic/namespace; AnnounceReady emits a
  {"event":"devtools-ready", ...} JSON sentinel alongside the human
  banner; full-view tree nodes carry supportedPatterns[] probed from
  the UIA peer.

#8 (state selector scoping) deferred — requires reconciler component
registry. The resolution table previously in the feedback doc is
superseded; the doc itself has been removed from the working tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request Apr 18, 2026
…ames

Addresses the second-round AI-agent field feedback. Build still compiles
and 3708 unit tests pass.

- #2 Stable window id: WindowIdAllocator.Reserve pins the primary
  devtools window to "main" so the handle survives switchComponent
  changing the window title. Windows payload surfaces `currentComponent`.
- #4 Scroll units + readback: description explicitly calls out
  percentage-delta semantics; response now carries `scrollOffsetPx` and
  `scrollableSizePx` dug out of the underlying ScrollViewer, and the
  -1 sentinel is replaced with null when an axis isn't scrollable.
- #5 Accessible names at mount: the reconciler now mirrors visible
  captions into AutomationProperties.Name for Button, HyperlinkButton,
  RepeatButton, ToggleButton, DropDownButton, SplitButton,
  ToggleSplitButton, CheckBox, RadioButton, ToggleSwitch, TextField, and
  TextBlock. Author-supplied .AutomationName(...) still wins; the
  Update path handles label changes via a provenance-aware compare so
  author overrides are preserved.
- #6 includeReactorSource rejection: tree tool returns structured
  not-implemented instead of silently no-opping.
- #7 ComboBox expand/collapse: new `expand` / `collapse` MCP verbs
  wrap IExpandCollapseProvider; `select` auto-expands a closed
  container so the popup items resolve.
- #9 Fire lambda confusion: unknown-event payload lists
  reachableMethods and explains inline lambdas aren't reflectable;
  tool description warns upfront.
- Usability: GET /mcp self-describes (schema, protocolVersion, tools,
  selectorGrammar, events); tools/list adds _selectorGrammar +
  _treeSchemaVersion extensions so POST-based agents get the grammar
  without a second hop; components tool returns ComponentInfo[] with
  isNested/isPublic/namespace; AnnounceReady emits a
  {"event":"devtools-ready", ...} JSON sentinel alongside the human
  banner; full-view tree nodes carry supportedPatterns[] probed from
  the UIA peer.

#8 (state selector scoping) deferred — requires reconciler component
registry. The resolution table previously in the feedback doc is
superseded; the doc itself has been removed from the working tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
…ation

Two related changes:

1. Diagnostic-count gate (spec §11 risk row, §14 #8) — resolves the EC1
   calc-vs-kanban split where ~150-LoC calc regressed +21% cost while
   kanban won −24%. `CheckCommand.ShouldEmitSuggestions` skips Tier-2
   when an invocation surfaces fewer than `--suggest-threshold` unique
   CS-prefixed diagnostics; default 3, 0 disables. Counts the same
   dedup key `EmitDiagnostics` uses.

2. Data Checkpoint C — 525-pair mining corpus from spec 037's harness
   mirrored at `docs/specs/tasks/038-tuning-reports/2026-05-11-525run-source/`
   (1,027 fixes / 1,233 ranker rows / 104 clusters; `gpt-5.5` only).
   Tuning report at `2026-05-11-525run.md`.

The empirical CS-diagnostics-per-build distribution from the corpus
(43% of builds have 1 diagnostic, 28% have 2, 28.7% have ≥ 3) confirms
T=3 is the right initial cut-line. The 525-run corpus also surfaces
that JaroWinkler fuzzy match has near-0% empirical precision on
CS1061/CS0117 against Reactor types — the agent's typical mistake is
reaching for a WinUI-style name (`.VerticalAlignment`,
`Theme.AppBackground`) whose Reactor replacement is too far in
edit-distance to find, so we pick a wrong sibling. All per-code
thresholds held; systematic fix is Phase-3 rule authoring. Top three
rule targets identified in the report.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
5×N re-run on `feat/038-mur-check` @ aaa4cce (gate enabled, default
--suggest-threshold 3), same matrix as the prior EC1 batch.

  reactor-calc-mur-check  : cost -4%  (was +21%) — PASS
  reactor-kanban-mur-check: cost -33% (was -24%) — PASS, grew the win
  First-build OK 5/5 both variant arms.

Calc neutralized; kanban win preserved and grew. Phase 1 acceptance bar
met. Spec §11 risk row + §14 #8 updated to mark the mitigation validated.

Watch-item carried into Phase 2: kanban CV widened (24% prior -> 54%
this batch) because one of five runs hit 0 firings and tracked the
long-tail base path. Gate is path-dependent on agent's exploration
order, not just the project's static shape. Below Phase-1 blocker
threshold; Phase 2 telemetry should track per-run firing counts.

No code change in this commit — eval results + spec doc updates only.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
…; resolve symbol-binding

Doc-only updates across spec, task list, and reference doc to reflect the
decision that `mur check`'s did-you-mean engine is load-bearing
infrastructure for the next 1-3 years, not a token-saving stopgap base-
model improvements will erode.

Why now: Reactor will keep churning faster than models retrain, and WinUI
3 is structurally weak / cross-confused with WPF/Silverlight/WinUI 1/2 in
training data. The 525-run corpus directly evidences the confusion shape
(`.VerticalAlignment` on Reactor `*Element` types, `Theme.AppBackground`,
`.Style(...)`). Tier-2 fuzzy match cannot bridge those by edit distance;
only deterministic vocabulary-translation rules can.

Spec changes (038-mur-check-did-you-mean-design.md):
- §1: new "Why this is load-bearing" subsection with the two-condition
  argument and explicit sunset criterion (≥12mo API stability +
  ≥90% first-build-OK on ≥2 vendor-distinct models).
- §6: rename "induced pattern rules" → "induced and authored pattern
  rules"; split into Class A (induced, frequency-justified) and Class B
  (vocabulary-translation, structurally justified, frequency bar waived).
  Add the resolved symbol-binding decision: rules bind to Roslyn ISymbol
  references via RuleSymbolResolver, not name strings, with a CI gate
  that fails the build on unresolved rule targets.
- §11: two new risks — Reactor API churn invalidating rules/corpus, and
  data-pipeline SLA/owner — both with mitigations.
- §13 Phase 5: reframe from "only if needed" to "scheduled, deferred"
  pending Data Checkpoint D. Add explicit sunset criterion subsection.
- §14: resolve question #8 (symbol-binding decision recorded with
  rationale); add question #9 on vocab-table provenance; renumber
  project-size gate to #10.

Task list (tasks/038-mur-check-did-you-mean-implementation.md):
- Top: new "Framing (read this first)" section with the load-bearing
  argument and sunset criterion link.
- Phase 3: split rule template into Class A / Class B variants. Add §3.0
  pre-phase prerequisites (corpus-pipeline owner; minor-release refresh
  cadence; in-repo `038-vocab-table.csv`). Add §3.1a symbol-binding
  contract with CI gate. Update quantity gates + exit criterion for the
  two-class split.
- Phase 4: status change from "optional" to "scheduled, deferred until
  Data Checkpoint D"; escape hatch remains as the unexpected outcome.
- New "Maintenance (load-bearing operation)" section under cross-cutting
  concerns: API-churn protocol per Reactor minor; corpus freshness rule;
  per-rule accept-rate monitoring; annual sunset-readiness check.

Reference doc (docs/reference/mur-check-did-you-mean.md):
- §1: new "Why this is load-bearing" subsection mirrored from the spec.
- §9 Future improvements: new "The recurring failure mode: WinUI/WPF
  vocabulary confusion" subsection that names the structural failure
  shape, then reframes Phase 3 as Class A / Class B and Phase 4 as
  scheduled-not-optional. Symbol-binding decision called out.
- Out-of-scope (small LLM generator): reasoning now explicitly linked to
  the load-bearing argument (weak training data is why we need the
  system AND why a smaller model trained on it won't fix the gap).
- Glossary: new entries for Class A / Class B rule, Load-bearing,
  Sunset criterion. Validation Gate entry updated for the Class-B
  frequency-bar waiver.
- Closing: pointer to the new task-doc Maintenance section.

No code changes in this commit; all infrastructure decisions documented
here will land in Phase-3 rule PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
Quality and self-consistency pass on the Phase-1 branch. All changes are
contained to Phase-1 surface; broader CR concerns about CS1061/CS0117 fuzzy
behavior, MSBuild-accurate loading, and per-code precision gating remain
scoped to Phase 2/3 per the spec's existing plan.

- CR #10: drop CS8602 warning in CompilationLoader by routing EmptyCompilation
  through a named factory method with explicit Array.Empty<> coalescing.
- CR #11: diagnostic regex now uses a reluctant file capture anchored on the
  (line,col): suffix so MSBuild lines with parenthesized path segments parse
  correctly. Added pipeline test.
- CR #8: TraceWriter.SanitizePath normalizes in-root absolute paths to
  project-relative (forward-slash) form so traces no longer carry
  `C:\Users\<name>\...` prefixes. Tests strengthened to assert no row is
  ever an absolute path.
- CR #13: replace misleading CS7036 tiebreak comment with accurate
  description; full Hamming-vector ranker stays a deferred follow-up per
  spec §1.5.
- CR #14: 525-run report reworded — "500-pair volume bar met, cross-agent
  bar NOT met"; Theme.get_Background note marked "fixed in this branch"
  with code reference.
- CR #2 (narrowed): tighten CS1061 factory-argument receiver check to
  require receiver IS-A factory return type only (dropped reverse
  IsAssignableFrom direction). Full AST-anchored receiver verification
  deferred to Phase-3 RuleSymbolResolver per §3.1a.
- Implementation doc deferred-follow-ups list updated to include
  receiver-anchoring (e) and Phase-2 loader/precision-gate work (f).

Verification: 98 CheckCommand unit tests pass (was 97 + new parens-path
test); MurCheck integration test passes; CS8602 warning eliminated.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
…c-count gate) (#243)

* docs(specs/038): add MSBuild passthrough via `--` to mur check CLI

Today's CheckCommand accepts only <path> and hardcodes --nologo,
-v:m, and -p:Platform={host arch}. Without an escape hatch the only
fallback for an agent that needs to override Platform, pick a
Configuration, skip restore, or pass arbitrary -p: properties is to
drop mur check and run dotnet build directly - which discards every
benefit the spec adds.

Adds a "CLI shape and MSBuild passthrough" subsection in §8
covering: the `mur check [path] [mur-flags] [-- <msbuild args>]`
shape, default-merging rules (auto-inject only if user did not
specify), boundary semantics (bare `--` is the unambiguous
separator; unknown mur-flags error), ranker-unchanged invariant
(passthrough alters the build, not diagnostic scoring), and trace
faithfulness (record effective command line). Adds an
implementation bullet to Phase 4.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(specs/038): add detailed implementation task list

Mirrors the convention from docs/specs/tasks/036-window-design-
implementation.md: phased checkboxes, "task is done only when"
gate, conventions header. Adapted for spec 038's external
dependency on spec 037's data corpus.

Adds three concepts not in earlier task lists because no other
spec needed them:

- Human Validation Gate: six-bar checklist every Tier 3 rule
  must clear before merge (frequency >=5%, count >=10, cross-
  agent reproducibility, >=3 positive fixtures, >=2 negative,
  independent reviewer signoff). Plus auto-suppression policy
  for rules whose telemetry accept-rate drops below 50%.

- Data Checkpoints A/B/C/D: staged hand-offs from spec 037's
  harness with explicit blocking relationships. A is the
  current 3-pair smoke (already landed); B/C/D gate Phase 1
  threshold tuning, Phase 3 rule authoring, and Phase 4 ranker
  training respectively.

- Eval Checkpoints EC1-EC4: 5xN batches on gpt-5.5 vs reactor-
  calc/kanban with predicted lift bands and pass criteria.
  EC1 after Tier 2 only; EC2 after deterministic ranker + 5
  rules; EC3 at V1 ship (10-15 rules); EC4 if learned ranker
  is pursued.

Quantity bars (per the user's question): 5 rules before EC2,
10-15 rules covering >=80% of fix events for V1 ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(spec-038): land Phase 0 + Phase 1 of `mur check` did-you-mean engine

Phase 0 (instrumentation, no behavior change):
- `mur check --trace <path>` writes one JSONL row per parsed diagnostic to
  <path> in addition to stdout. Schema: {ts, code, severity, file, line, col,
  msg, receiver_type?, member?, mode}. Source code text is never written;
  absolute paths outside the project root are redacted to "<external>"; rows
  are bounded to 2 KB.
- New folders src/Reactor.Cli/Check/{Suggesters,Rules}/ with README pointers
  to spec 038 §5/§6 and the Validation Gate.

Phase 1 (Tier-2 Roslyn semantic suggester):
- ISuggester contract + SymbolSuggester covering CS1061, CS0103, CS0117,
  CS1503, CS7036 against Microsoft.UI.Reactor.* symbols.
- CompilationLoader: csproj/source resolution, project.assets.json reference
  resolution, (csproj-path, file-mtime-hash) cache, symlink containment, perf
  budget cold ≤ 500 ms / warm ≤ 50 ms.
- FactoryIndex: pre-filter over Microsoft.UI.Reactor.Factories.* static
  methods with cached parameter-name arrays for named-argument suggestions.
- StringSimilarity (Jaro–Winkler) for fuzzy member-name matching.
- SuggesterOrchestrator wires the suggester into CheckCommand.Run; Tier-1
  HintFor still wins ties at the format layer (spec §9).
- MUR_TELEMETRY=1 opt-in: appends (code, suggester, confidence,
  evidence_short) to ~/.mur/telemetry/<yyyy-mm-dd>.jsonl. Fields bounded to
  256 bytes; no source text, file paths, or machine identifiers.
- Args parser recognises `--trace` and `--help`; rejects unknown flags
  rather than silently forwarding (full passthrough lands in Phase 2).

Tests:
- 66 unit tests under tests/Reactor.Tests/CheckCommandTests/ covering args
  parsing, trace schema/redaction/length cap, compilation loader, factory
  index, JaroWinkler, every suggester code path (positive + negative),
  orchestrator filtering (Reactor-touching gate), Tier-1-wins-ties, and
  telemetry opt-in/byte-bound.
- Integration smoke test exercising mur.exe end-to-end against a deliberately
  broken fixture under tests/Reactor.IntegrationTests/MurCheck/Fixtures/
  SmokeFixture/. Reactor-touching CS1061 fixture is scoped as a follow-up
  because it requires WindowsAppSDK restore.

Pause point per spec 038 task list:
- Phase 1.8 exit needs Data Checkpoint B (≥50 unique pairs from spec 037's
  harness) for per-code threshold tuning before merging to main.
- Phase 2 + 3 are blocked by Phase 1 merge / Data Checkpoint C respectively.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(specs/038): mark Phase 0 + Phase 1 complete; record harness Gap #3 blocker

- Status snapshot at the top of the task list — Phase 0/1 code-complete on
  feat/038-mur-check, not merged to main, blocked on threshold tuning.
- Phase 0 (0.1–0.5) and Phase 1 (1.1–1.7) checkboxes ticked, with one-line
  notes on the four items deferred as follow-ups (Reactor-touching
  integration fixture, perf-trait wall-time test, full Hamming-vector
  overload ranking, CS0103 return-type filter).
- Data Checkpoint A re-audit (2026-05-10): Gap #1 (receiver_type), #2
  (dedup), #4 (cosmetic) all FIXED in the new harness output. Gap #3
  (ranker negative class) still NOT fixed — all 3 ranker-labels rows are
  positive class; for 3 runs the spec expects ~30–80 rows.
- Plus a fix_kind classifier nit: ButtonElement HorizontalAlignment →
  HAlign should be renamed_member, not other (receiver type unchanged,
  member name swapped).
- Recommendation against kicking off the 50-run sweep until Gap #3 lands;
  records that Data Checkpoint B is therefore still blocked.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(specs/038): unblock Data Checkpoint B; record still_present_at_run_end as Phase-4 prereq

Audit pass 2 of the 6-row ranker-labels output (2026-05-10):

- Gap #3 (ranker negative class) is now FIXED. 4 positive / 2 negative on
  addressed_by_next_fix; harness emits per-build per-diagnostic rows; three
  CS8012 emissions in run 5d5fef… recorded as three independent training
  rows, exactly per spec 037 §3 "don't dedupe across builds".
- fix_kind classifier nit partially fixed — both pairs now classify as
  renamed_member; debatable for pair 2's structural rewrite but acceptable.
- New known limitation: still_present_at_run_end is uniformly false even
  when the diagnostic IS in the final build (CS8012 timing-tail
  fingerprint quirk). Primary ranker label addressed_by_next_fix is
  unaffected; auxiliary agent_ignored is corrupted, which breaks the
  spec 038 §11 auto-suppression-telemetry hook. Tracked as a Phase-4
  prerequisite — file with harness owner before Data Checkpoint D.

Status updates:

- Status snapshot at top: 50-run sweep cleared to start.
- Data Checkpoint B: status flipped from blocked to unblocked. Added a
  step-by-step "pickup procedure for the next session" so the next agent
  can run cold once the corpus lands (audit, threshold tuning, EC1, merge).
- Data Checkpoint D: documents still_present_at_run_end as the remaining
  prerequisite before training the learned ranker.
- Phase 1.8 exit criterion points at the pickup procedure instead of the
  stale "blocked" note.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(spec-038): tune Tier-2 SymbolSuggester thresholds against 50-run corpus

Phase 1 ship-gate calibration (Data Checkpoint B). Adds per-code emit
thresholds in src/Reactor.Cli/Check/Suggesters/Thresholds.cs, refactors
SymbolSuggester so the threshold gate has a single source of truth
(SuggestRaw exposes raw confidence; Suggest gates via Thresholds.For),
and removes the now-redundant duplicate cut from SuggesterOrchestrator.

Per-code values informed by tests/Reactor.Tests/CheckCommandTests/Tuning/
which runs the suggester against fixes.jsonl. Snapshot of the first run
is in docs/specs/tasks/038-tuning-reports/2026-05-10-50run.md:
  - CS1061 → 0.80 (only firing in corpus was at conf 0.43; raised
    threshold blocks structural-rewrite false positives)
  - CS0103 → 0.75 default (2/2 firings at conf 1.00 matched)
  - CS0117 / CS1503 / CS7036 → 0.75 default (insufficient signal in
    50-pair corpus; revisit at Data Checkpoint C, 500+ pairs)

Tuning harness is gated on env var MUR_TUNING_CORPUS so it skips
cleanly when the (sibling-repo) corpus isn't available.

Phase-1 next gate: Eval Checkpoint EC1 vs. main.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(specs/038): record EC1 5×N results; surface amortization-floor finding

EC1 5×N (n=5 paired rounds on gpt-5.5, round-3 prompt with reflection
ban + trust-the-suggestion + mur-check-is-the-build rules):

  kanban-variant — cost mean −24% / median −33% / CV 24% vs base 81%
                   wins 4 of 5 paired rounds; the suggestion mechanism
                   is itself a variance stabilizer.

  calc-variant   — cost mean +21% / wall mean +23%
                   real and consistent across the batch.

Diagnosis: ~5–8s per-invocation mur-check overhead does not amortize on
~150-LoC projects with no API exploration surface to skip. Validated
empirically — the prompt iterations that helped (round-2 reflection
ban, round-3 trust-mur-as-build) closed every explore-around-the-
suggestion loophole, but the floor remains.

Strict EC1 pass criterion ("tokens not regressed") fails on calc,
passes cleanly on kanban. Captured as:

  - spec 038 §11 risk row + §14 open question on a project-size /
    per-invocation-diagnostic-count gate
  - task doc EC1 results section with per-arm means/sd, paired comparisons
  - status snapshot updated; Phase 1 merge decision noted as pending

Decision options on the merge: (a) ship Phase 1 as-is and accept the
calc tax; (b) land the gate before merging. Either is product-side; this
commit only records the data and the design surface.

No code changes. SKILL.md intentionally left untouched — larger
mining sweep is running under the current SKILL.md to compare aided vs
un-aided baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(spec-038): scope Thresholds override to AsyncLocal to fix parallel-test race

ThresholdsTests.Each_handled_code_has_a_threshold_in_valid_range was flaking
because the tuner test (ThresholdTuningTests.Run_against_inline_one_row_corpus_produces_report)
temporarily writes Thresholds.PerCode to an all-zero map for its duration,
and xUnit's default cross-class parallelism let the validation tests observe
the zeroed state mid-tuner-run.

Switching the override channel to AsyncLocal isolates the tuner's scoped
change to its own logical thread; concurrent readers in other tests see
the immutable production defaults. Production code paths still go through
the same Thresholds.For(code) entry point — behaviour for the CLI is
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(spec-038): land diagnostic-count gate + Data Checkpoint C calibration

Two related changes:

1. Diagnostic-count gate (spec §11 risk row, §14 #8) — resolves the EC1
   calc-vs-kanban split where ~150-LoC calc regressed +21% cost while
   kanban won −24%. `CheckCommand.ShouldEmitSuggestions` skips Tier-2
   when an invocation surfaces fewer than `--suggest-threshold` unique
   CS-prefixed diagnostics; default 3, 0 disables. Counts the same
   dedup key `EmitDiagnostics` uses.

2. Data Checkpoint C — 525-pair mining corpus from spec 037's harness
   mirrored at `docs/specs/tasks/038-tuning-reports/2026-05-11-525run-source/`
   (1,027 fixes / 1,233 ranker rows / 104 clusters; `gpt-5.5` only).
   Tuning report at `2026-05-11-525run.md`.

The empirical CS-diagnostics-per-build distribution from the corpus
(43% of builds have 1 diagnostic, 28% have 2, 28.7% have ≥ 3) confirms
T=3 is the right initial cut-line. The 525-run corpus also surfaces
that JaroWinkler fuzzy match has near-0% empirical precision on
CS1061/CS0117 against Reactor types — the agent's typical mistake is
reaching for a WinUI-style name (`.VerticalAlignment`,
`Theme.AppBackground`) whose Reactor replacement is too far in
edit-distance to find, so we pick a wrong sibling. All per-code
thresholds held; systematic fix is Phase-3 rule authoring. Top three
rule targets identified in the report.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(spec-038): record EC1 re-run results; Phase 1 cleared to merge

5×N re-run on `feat/038-mur-check` @ aaa4cce (gate enabled, default
--suggest-threshold 3), same matrix as the prior EC1 batch.

  reactor-calc-mur-check  : cost -4%  (was +21%) — PASS
  reactor-kanban-mur-check: cost -33% (was -24%) — PASS, grew the win
  First-build OK 5/5 both variant arms.

Calc neutralized; kanban win preserved and grew. Phase 1 acceptance bar
met. Spec §11 risk row + §14 #8 updated to mark the mitigation validated.

Watch-item carried into Phase 2: kanban CV widened (24% prior -> 54%
this batch) because one of five runs hit 0 firings and tracked the
long-tail base path. Gate is path-dependent on agent's exploration
order, not just the project's static shape. Below Phase-1 blocker
threshold; Phase 2 telemetry should track per-run firing counts.

No code change in this commit — eval results + spec doc updates only.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(spec-038): add reference doc for `mur check` did-you-mean engine

Layered walkthrough of the system as shipped in this PR (Phase 0 + Phase 1
+ diagnostic-count gate): plain-language intro, four-tier architecture,
mining pipeline, threshold tuning, end-to-end recommendation flow, the
small-project gate, and a future-improvements section sketching Phases
2–4. Lives at docs/reference/ alongside the other developer-facing
references; points back to docs/specs/038… for decision history.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(spec-038): address CR feedback on PR #243

Addresses six review comments from Copilot reviewer on the Phase-1 PR:

1. Hoist CompilationLoader.Load to once per `mur check` invocation
   instead of once per emitted diagnostic. Even with the internal cache,
   Load() re-enumerates `.cs` files and recomputes the file-set hash on
   every call, so the prior wiring was O(diagnostics × files). Now O(1)
   per invocation via SuggesterOrchestrator.SuggestAgainst.

2. FindTreeFor suffix match required a path-separator boundary so a
   diagnostic on bare "Program.cs" no longer mis-binds to a sibling tree
   like "MyProgram.cs". Cross-platform: matches against both '/' and '\'
   prefixes since CSharpCompilation trees can carry either separator
   depending on the project's source-list. Added regression test.

3. Filter synthesized property/event accessors (get_X / set_X / add_X /
   remove_X) out of CollectStaticMembers + CollectInstanceMembers. The
   525-run calibration report flagged conf=0.88 emissions of
   `Theme.get_Background` — same hazard would surface on CS1061 against
   instance-member walks. Fixed at the source.

4. Telemetry.Truncate now enforces a true UTF-8 byte limit, not a char
   limit. Pure-ASCII content still hits the cheap fast path. New test
   covers a 200-glyph CJK string (600 bytes pre-truncation).

5. StringSimilarity header comment no longer claims "allocation-free on
   the hot path" — Jaro() allocates two bool[]s per call. Comment now
   reflects reality with a pointer to revisit via stackalloc if perf-
   trait tests show it on the hot path.

6. Drop the "`<path>` accepts a .cs file" claim from CheckArgs.HelpText
   and the CheckCommand.cs header. `dotnet build <single.cs>` doesn't
   work end-to-end so the help text was misleading. CompilationLoader
   still walks up to the nearest .csproj when seeded from a .cs file
   (tooling/test seam only).

Skipped: #6 (MurCheckSmokeTest.cs build-on-demand for mur.exe) — changes
the integration-tests CI contract and is cleanly scoped as a separate
follow-up.

Full suite: 7051/7097 pass (46 skipped — perf-trait + opt-in, unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(spec-038): adopt load-bearing framing; split Tier-3 rule classes; resolve symbol-binding

Doc-only updates across spec, task list, and reference doc to reflect the
decision that `mur check`'s did-you-mean engine is load-bearing
infrastructure for the next 1-3 years, not a token-saving stopgap base-
model improvements will erode.

Why now: Reactor will keep churning faster than models retrain, and WinUI
3 is structurally weak / cross-confused with WPF/Silverlight/WinUI 1/2 in
training data. The 525-run corpus directly evidences the confusion shape
(`.VerticalAlignment` on Reactor `*Element` types, `Theme.AppBackground`,
`.Style(...)`). Tier-2 fuzzy match cannot bridge those by edit distance;
only deterministic vocabulary-translation rules can.

Spec changes (038-mur-check-did-you-mean-design.md):
- §1: new "Why this is load-bearing" subsection with the two-condition
  argument and explicit sunset criterion (≥12mo API stability +
  ≥90% first-build-OK on ≥2 vendor-distinct models).
- §6: rename "induced pattern rules" → "induced and authored pattern
  rules"; split into Class A (induced, frequency-justified) and Class B
  (vocabulary-translation, structurally justified, frequency bar waived).
  Add the resolved symbol-binding decision: rules bind to Roslyn ISymbol
  references via RuleSymbolResolver, not name strings, with a CI gate
  that fails the build on unresolved rule targets.
- §11: two new risks — Reactor API churn invalidating rules/corpus, and
  data-pipeline SLA/owner — both with mitigations.
- §13 Phase 5: reframe from "only if needed" to "scheduled, deferred"
  pending Data Checkpoint D. Add explicit sunset criterion subsection.
- §14: resolve question #8 (symbol-binding decision recorded with
  rationale); add question #9 on vocab-table provenance; renumber
  project-size gate to #10.

Task list (tasks/038-mur-check-did-you-mean-implementation.md):
- Top: new "Framing (read this first)" section with the load-bearing
  argument and sunset criterion link.
- Phase 3: split rule template into Class A / Class B variants. Add §3.0
  pre-phase prerequisites (corpus-pipeline owner; minor-release refresh
  cadence; in-repo `038-vocab-table.csv`). Add §3.1a symbol-binding
  contract with CI gate. Update quantity gates + exit criterion for the
  two-class split.
- Phase 4: status change from "optional" to "scheduled, deferred until
  Data Checkpoint D"; escape hatch remains as the unexpected outcome.
- New "Maintenance (load-bearing operation)" section under cross-cutting
  concerns: API-churn protocol per Reactor minor; corpus freshness rule;
  per-rule accept-rate monitoring; annual sunset-readiness check.

Reference doc (docs/reference/mur-check-did-you-mean.md):
- §1: new "Why this is load-bearing" subsection mirrored from the spec.
- §9 Future improvements: new "The recurring failure mode: WinUI/WPF
  vocabulary confusion" subsection that names the structural failure
  shape, then reframes Phase 3 as Class A / Class B and Phase 4 as
  scheduled-not-optional. Symbol-binding decision called out.
- Out-of-scope (small LLM generator): reasoning now explicitly linked to
  the load-bearing argument (weak training data is why we need the
  system AND why a smaller model trained on it won't fix the gap).
- Glossary: new entries for Class A / Class B rule, Load-bearing,
  Sunset criterion. Validation Gate entry updated for the Class-B
  frequency-bar waiver.
- Closing: pointer to the new task-doc Maintenance section.

No code changes in this commit; all infrastructure decisions documented
here will land in Phase-3 rule PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(spec-038): address CR feedback round 2 on PR #243

Quality and self-consistency pass on the Phase-1 branch. All changes are
contained to Phase-1 surface; broader CR concerns about CS1061/CS0117 fuzzy
behavior, MSBuild-accurate loading, and per-code precision gating remain
scoped to Phase 2/3 per the spec's existing plan.

- CR #10: drop CS8602 warning in CompilationLoader by routing EmptyCompilation
  through a named factory method with explicit Array.Empty<> coalescing.
- CR #11: diagnostic regex now uses a reluctant file capture anchored on the
  (line,col): suffix so MSBuild lines with parenthesized path segments parse
  correctly. Added pipeline test.
- CR #8: TraceWriter.SanitizePath normalizes in-root absolute paths to
  project-relative (forward-slash) form so traces no longer carry
  `C:\Users\<name>\...` prefixes. Tests strengthened to assert no row is
  ever an absolute path.
- CR #13: replace misleading CS7036 tiebreak comment with accurate
  description; full Hamming-vector ranker stays a deferred follow-up per
  spec §1.5.
- CR #14: 525-run report reworded — "500-pair volume bar met, cross-agent
  bar NOT met"; Theme.get_Background note marked "fixed in this branch"
  with code reference.
- CR #2 (narrowed): tighten CS1061 factory-argument receiver check to
  require receiver IS-A factory return type only (dropped reverse
  IsAssignableFrom direction). Full AST-anchored receiver verification
  deferred to Phase-3 RuleSymbolResolver per §3.1a.
- Implementation doc deferred-follow-ups list updated to include
  receiver-anchoring (e) and Phase-2 loader/precision-gate work (f).

Verification: 98 CheckCommand unit tests pass (was 97 + new parens-path
test); MurCheck integration test passes; CS8602 warning eliminated.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 16, 2026
The record was already named `RichTextBlockElement`; this aligns the
factory name with the record and with WinUI's
`Microsoft.UI.Xaml.Controls.RichTextBlock`. Both `RichText(string)` and
`RichText(RichTextParagraph[])` overloads are preserved as `[Obsolete]`
forwarding aliases for one release per spec §16.4 (B). Ten sample / doc
/ test call sites migrated to the new name.

New `### Breaking changes (deferred)` section in `CHANGELOG.md` under
`## [Unreleased]` to catalog naming-alignment renames whose
`[Obsolete]` aliases come out in the next minor.

(spec 039 §1.3 / §14 #8)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 16, 2026
… props, named styles (#314)

* feat(039): land Phase 0-2 — scaffolding, event fluents, named-style helpers (#039)

Implements the foundational layers of the property & event API scrub
(spec 039). Phases 0-2 (Phase 3+ to follow in subsequent commits).

Phase 0: Scaffolding
- Added empty partial classes ElementExtensions.Events,
  ElementExtensions.NamedStyles, Factories.NamedStyles.
- Generated event-fluent inventory CSV (68 rows) under
  tests/Reactor.SelfTests/Fixtures/event-fluent-inventory.csv via
  tools/api-scrub/Build-EventFluentInventory.ps1.

Phase 1: Universal event fluents
- Hand-written extensions covering every Action/Action<T> callback on
  every element record across §1–§9, §12 (~63 fluents). Names drop the
  leading "On" to avoid the C# property-vs-extension delegate-invocation
  clash; property names unchanged.
- 63 null-clear unit tests confirm passing null clears handler.

Phase 2: Named-style helpers + Card + type-ramp factories
- .AccentButton(), .SubtleButton() on ButtonElement and its subtypes.
- .TextLink() on Hyperlink/Button.
- InputScope fluents on TextField (Numeric/Email/Url/Phone/Search) +
  generic .InputScope() escape hatch.
- InfoBar severity fluents (Informational/Success/Warning/Error).
- Card(child) factory: corner radius 8, padding 16, theme-aware
  background + stroke via ThemeRef plumbing.
- Type-ramp factories Title/Subtitle/Body/BodyStrong/BodyLarge in
  Factories.NamedStyles.cs (no matching fluents — §17.6 two-ways trap).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 3.1 — CalendarView SelectedDates + SelectedDatesChanged

Models the missing multi-select event on CalendarView (spec 039 §3 +
Q4). Adds:

- CalendarViewElement.SelectedDates: declarative initial selection
  as IReadOnlyList<DateTimeOffset>?.
- CalendarViewElement.OnSelectedDatesChanged: user-event callback
  receiving a snapshot of the full selection (not added/removed delta —
  easier to bind into component state without diffing).
- Fluents .SelectedDates(...) / .SelectedDatesChanged(handler).

Reconciler wiring:

- Initial selection applied at mount BEFORE subscribing, so the
  declarative seed doesn't fire the user event.
- Subscription is unconditional; the handler reads the latest element
  via the element tag so a later record-with that attaches a handler
  picks up without re-wiring.
- Updates diff current vs desired selection and apply add/remove via
  ChangeEchoSuppressor.BeginSuppress so subsequent declarative writes
  don't echo back as user events.

Tests: null-clear unit test added. Reconciler-level "no-event-on-mount /
event-fires-once-per-user-change" deferred to Phase 11.7 (AppTests
harness — requires a WinUI runtime).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 3.2 — Frame navigation events

Adds the three commonly-needed Frame events to FrameElement (spec 039
§3.2). Modelled as Reactor-shaped substitutes — Action<Type> /
Action<Type,Exception> — matching the rest of the codebase, which
doesn't surface raw WinUI EventArgs in user-facing callbacks. Users
who need NavigationMode, NavigationParameter, or cancellation can wire
the raw event via .Set(...).

- OnNavigated: Action<Type>? — receives the new SourcePageType.
- OnNavigating: Action<Type>? — receives the target SourcePageType
  (cancellation not surfaced; spec accepts this trade for ergonomics).
- OnNavigationFailed: Action<Type, Exception>? — target + failure.

Fluents .Navigated / .Navigating / .NavigationFailed land per Phase 1
conventions. Reconciler subscribes unconditionally; the trampoline reads
the latest element via the element tag so a later record-with picks up
without re-wiring.

Sample (spec §3.2 last bullet, §8.3) deferred — requires XAML
Page-derived types, better authored alongside the rest of the Phase 8
sample sweep.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 3.3 — ScrollView.ViewChanged

Adds OnViewChanged to ScrollViewElement (spec 039 §3.3). Callback is
Action<ScrollViewerViewChangedEventArgs>? — args carry IsIntermediate
for callers who want to debounce until the scroll settles.

ScrollViewer is pooled, so subscription uses the established
PoolableWireFlags.ScrollViewerViewChanged once-per-instance gate; the
trampoline reads the live element via GetElementTag so a later
record-with that attaches the handler doesn't require re-subscription.

Fluent .ViewChanged(handler) + null-clear test. Reconciler-level
"scroll triggers callback" deferred to AppTests harness (Phase 11.7).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 3.4 — Popup.Opened

Adds OnOpened to PopupElement (spec 039 §3.4). PopupElement already
exposed OnClosed; this rounds out the lifecycle. Trampoline mirrors
the existing OnClosed wiring — both resolve the live element via the
wrapper StackPanel's element tag so updates pick up fresh closures.

Fluent .Opened(handler) + null-clear test.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 3.5 — WebView2 message + init events

Adds two commonly-needed WebView2 events (spec 039 §3.5):

- OnWebMessageReceived(Action<string>?) — fired on the UI thread when
  the hosted page posts a message via window.chrome.webview.postMessage.
  Handler falls back from TryGetWebMessageAsString() to WebMessageAsJson
  so callers always receive a string payload even when the page sends
  a structured message.
- OnCoreWebView2Initialized(Action?) — fires once on the UI thread when
  the underlying CoreWebView2 is available, the earliest point at which
  features like AddScriptToExecuteOnDocumentCreatedAsync become usable.

Both subscribed unconditionally in MountWebView2 — the trampolines read
the live element via the element tag so later record-with that attaches
a handler picks up without re-subscription. Threading contract
documented in XML doc comments. Fluents and null-clear tests land.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 3.6 — MediaPlayerElement events

Adds MediaOpened, MediaEnded, and MediaFailed callbacks to
MediaPlayerElementElement (spec 039 §3.6). MediaPlayer raises these on
a worker thread, so a new DispatchToElement<TElement> helper marshals
through the element's DispatcherQueue and resolves the live element via
GetElementTag — handler is a no-op if the element has unmounted between
the event firing and the dispatched continuation.

- OnMediaOpened: Action?
- OnMediaEnded: Action?
- OnMediaFailed: Action<string>? — receives args.ErrorMessage ??
  args.Error.ToString() to keep the callback signature simple while
  preserving the most-useful failure detail.

Fluents .MediaOpened / .MediaEnded / .MediaFailed + null-clear tests.
Threading contract documented in XML doc comments. Integration test
that asserts events fire on real media playback deferred to Phase 11.7
(AppTests harness).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.1 — Slider init fluents

Adds five frequently-set init properties on SliderElement (spec 039 §3.8)
and the matching fluent extension methods:

- .Orientation(Orientation) — horizontal vs vertical layout
- .TickFrequency(double) — interval between tick marks
- .TickPlacement(TickPlacement) — where ticks render on the track
- .SnapsTo(SliderSnapsTo) — snap to ticks vs step values during drag
- .ThumbToolTip(bool = true) — floating value tooltip during drag

The reconciler wires all five through Mount (initial control creation)
and Update (delta-based property writes guarded by equality checks so a
no-op render doesn't bounce the control state).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.2 — NumberBox init fluents

Adds four init properties on NumberBoxElement (spec 039 §3.3) and the
matching fluents:

- .NumberFormatter(INumberFormatter2) — currency / percent / etc.
- .AcceptsExpression(bool = true) — arithmetic expressions like 2*3+1
- .ValidationMode(NumberBoxValidationMode) — overwrite-vs-disabled
- .Description(string) — help text rendered under the box

The reconciler writes NumberFormatter only when the reference actually
changed, so a same-formatter re-render won't reformat the text and
clobber an in-progress edit.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.3 — ColorPicker init fluents

Adds six fluents over the existing ColorPickerElement init properties
(spec 039 §3.11) — one per visibility toggle:

- .AlphaEnabled(bool = true)
- .MoreButtonVisible(bool = true)
- .ColorSpectrumVisible(bool = true)
- .ColorSliderVisible(bool)
- .ColorChannelTextInputVisible(bool)
- .HexInputVisible(bool)

UpdateColorPicker now reconciles all five visibility flags (previously
only IsAlphaEnabled propagated through update), so flipping a toggle
mid-session takes effect on the next render.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.4 — TabView init fluents

Adds seven init properties on TabViewElement (spec 039 §7.4) and the
matching fluents:

- .TabWidthMode(TabViewWidthMode) — Equal / SizeToContent / Compact
- .CloseButtonOverlayMode(TabViewCloseButtonOverlayMode) — Auto / OnPointerOver / Always
- .CanDragTabs(bool = true) — detach to a new window
- .CanReorderTabs(bool = true) — drag within the strip
- .AllowDropTabs(bool = true) — accept tabs from another TabView
- .TabStripHeader(Element) — leading-edge content
- .TabStripFooter(Element) — trailing-edge content

Strip header/footer children are reconciled via the existing
ReconcileChild helper so update-in-place works (no full remount when
their content changes).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.5 — NavigationView init fluents

Adds six init properties on NavigationViewElement (spec 039 §7.2) and
the matching fluents:

- .AutoSuggestBox(AutoSuggestBoxElement) — pane-top search box
- .PaneFooter(Element) — pane-bottom slot below menu items
- .PaneCustomContent(Element) — slot between AutoSuggestBox and items
- .OpenPaneLength(double) — pane width when expanded
- .CompactModeThresholdWidth(double) — window width to collapse the pane
- .ExpandedModeThresholdWidth(double) — window width to auto-expand

Threshold/length init properties default to NaN so the WinUI defaults
take effect when unset (Mount/Update only writes when a real value is
provided). Pane children reconcile in place via ReconcileChild.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.6 — TitleBar init fluents

Adds fluents over existing TitleBarElement init properties (spec 039
§7.3):

- .BackButtonVisible(bool) / .BackButtonEnabled(bool)
- .PaneToggleButtonVisible(bool)
- .Content(Element) / .RightHeader(Element)
- .Icon(IconData) and convenience .Icon(string imageUri) — the string
  overload wraps the URI in an ImageIconData, matching the spec §7.3
  shorthand. No new init properties needed; reconciler already wires
  every target.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.7 — TextField init fluents

Adds five init properties on TextFieldElement (spec 039 §3.1) and the
matching fluents:

- .MaxLength(int) — character limit (0 = unlimited)
- .IsSpellCheckEnabled(bool = true) — toggle built-in spell-check
- .CharacterCasing(CharacterCasing) — Normal / Upper / Lower input
- .TextAlignment(TextAlignment) — horizontal text alignment
- .Description(string) — help text rendered below the box

InputScope is intentionally out of scope here — Phase 2.3 owns it.

The reconciler writes each property only when the WinUI TextBox value
diverges from the element, so a no-op render doesn't cause flicker.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 4.8 — HyperlinkButton .NavigateUri fluent + doc fix

Adds the .NavigateUri(Uri) fluent on HyperlinkButtonElement (spec 039
§14 #5). The init property already existed and the reconciler already
piped it through Mount and Update, so this is a pure extension method —
no record or reconciler changes.

Also updates the XML doc on HyperlinkButton(Command) — it used to send
callers to .Set() with a hand-written NavigateUri assignment. The
promise is now real: HyperlinkButton(cmd).NavigateUri(uri) compiles
and routes through the existing reconciler path. The Button(Command)
doc gets a parallel example to keep the discoverability story tight.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.1 — Text family init properties

Adds high-traffic init properties and matching fluents on the three
text records (spec 039 §1.1 / §1.3 / §1.4):

- TextBlockElement: .LineHeight(double), .MaxLines(int),
  .CharacterSpacing(int), .TextDecorations(TextDecorations)
- RichTextBlockElement: .MaxLines(int), .LineHeight(double),
  .TextAlignment(TextAlignment), .TextTrimming(TextTrimming),
  .CharacterSpacing(int)
- RichEditBoxElement: .IsSpellCheckEnabled(bool = true),
  .MaxLength(int), .TextWrapping(TextWrapping = Wrap),
  .AcceptsReturn(bool = true), .SelectionHighlightColor(SolidColorBrush)

The TextBlock bitmask diff (EXP-2) gained four new bits so the fast
path keeps avoiding interop reads for unchanged properties.
RichTextBlock and RichEditBox update paths reconcile all five props.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.2 — ToggleButton three-state + CheckedState fluents

Brings ToggleButtonElement to parity with CheckBoxElement / WinUI's
ToggleButton three-state cycle (true → false → null → true). Spec
039 §2.4 — matches the existing CheckBox/ThreeStateCheckBox precedent
(single record, IsThreeState flag), not the alternative split-record
shape.

Adds to ToggleButtonElement:
- IsThreeState (bool)
- CheckedState (bool?)  — active when IsThreeState=true
- OnCheckedStateChanged (Action<bool?>?)

New fluents:
- .IsThreeState(bool = true)
- .CheckedState(bool?) — auto-sets IsThreeState=true
- .CheckedStateChanged(Action<bool?>?) — null clears

New factory:
- ThreeStateToggleButton(label, checkedState = null, onCheckedStateChanged = null)

The reconciler now writes IsThreeState explicitly and clears it when
flipped back to two-state, so toggling .IsThreeState() between renders
works without remounting. The Click trampoline dispatches both
OnIsCheckedChanged and OnCheckedStateChanged; HasCallbacks was widened
to include the new callback.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.3 — Input control init props + fluents

Spec 039 §3.2 / §3.4 / §3.7 / §3.10 / §3.11. New init properties on
five input records, with matching value fluents plus event fluents
for the two new ComboBox callbacks.

PasswordBoxElement:
- MaxLength, Header, PasswordRevealMode, PasswordChar

AutoSuggestBoxElement:
- Header, QueryIcon (IconData), IsSuggestionListOpen

ComboBoxElement:
- MaxDropDownHeight, Description
- OnDropDownOpened, OnDropDownClosed (with .DropDownOpened /
  .DropDownClosed fluents per the leading-On rule)

RatingControlElement:
- PlaceholderValue (double), InitialSetValue (int — matches WinUI's
  RatingControl.InitialSetValue signature), .Caption() promoted from
  init-property to a fluent

ColorPickerElement:
- ColorSpectrumShape, Min/MaxHue, Min/MaxSaturation, Min/MaxValue
- .HueRange / .SaturationRange / .ValueRange paired-bound helpers

Reconciler wires every new property; ComboBox's two new events join
the HasCallbacks OR-chain. QueryIcon uses the existing ResolveIcon
helper (AutoSuggestBox.QueryIcon takes an IconElement, not IconSource).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.4 — Date/time picker init props + fluents

Spec 039 §4.1. New init properties on the three date/time records,
all with matching fluents.

CalendarDatePickerElement:
- DateFormat (string), IsTodayHighlighted (bool = true),
  IsCalendarOpen (bool), IsGroupLabelVisible (bool = true)

DatePickerElement:
- DayFormat / MonthFormat / YearFormat (string), Orientation
  (default Horizontal)

CalendarViewElement:
- MinDate / MaxDate (DateTimeOffset?), FirstDayOfWeek
  (Windows.Globalization.DayOfWeek?), NumberOfWeeksInView (int = 6),
  DisplayMode (CalendarViewDisplayMode = Month)

The reconciler reconciles every new property in the corresponding
Update* method (CalendarDatePicker, DatePicker, CalendarView).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.5 — Progress/layout/navigation init props + fluents

Spec 039 §5 / §6. New init properties on InfoBar, Expander, SplitView,
plus VariableSizedWrapGrid attached-prop fluents.

InfoBarElement:
- IconSource (IconData? — overrides severity icon), Content (Element? —
  rich body below the message). Both reconcile via ReconcileChild so the
  body element updates in place across re-renders.

ExpanderElement:
- HeaderTemplate (Element? — wins over the string Header), ContentTransitions
  (TransitionCollection? — custom expand/collapse motion).

SplitViewElement:
- PaneBackground (Brush?) with a `.PaneBackground(ThemeRef)` overload that
  routes through the existing ThemeBindings pipeline for light/dark-adaptive
  pane backgrounds.
- LightDismissOverlayMode (default Auto).

VariableSizedWrapGrid attached-prop fluents:
- new WrapGridAttached record + `.WrapGridColumnSpan(int)` /
  `.WrapGridRowSpan(int)` extensions. MountWrapGrid applies
  VariableSizedWrapGrid.SetRowSpan/SetColumnSpan at mount time, and
  UpdateWrapGrid re-applies on every render in lockstep with
  ReconcileChildren's null/EmptyElement filtering.

MountInfoBar/UpdateInfoBar now accept `requestRerender` so the child
Element mounts/reconciles correctly. UpdateExpander reconciles
HeaderTemplate via ReconcileChild with a string-header fallback when the
element header is cleared.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.6 — Collections + dialogs init props + fluents

Spec 039 §8 / §9. New init properties on ListView, GridView,
ContentDialog, Flyout, TeachingTip.

ListViewElement / GridViewElement:
- ItemContainerStyle (Style?), IncrementalLoadingTrigger (default Edge).
  Both wire at mount and reconcile on update.

ContentDialogElement:
- IsPrimaryButtonEnabled (bool = true), IsSecondaryButtonEnabled (bool = true),
  OnOpened with `.Opened()` event fluent. (WinUI 3 ContentDialog has no
  `Opening` event, so the spec's `OnOpening` is dropped — deferred upstream.)

FlyoutElement:
- ShowMode (FlyoutShowMode = Auto), AreOpenCloseAnimationsEnabled (bool = true),
  OverlayInputPassThroughElement (Element? — mounted as a DependencyObject).
  Both the existing-flyout reuse path and the fresh-flyout creation path in
  UpdateFlyoutElement propagate the new props.

TeachingTipElement:
- IconSource (IconData?), HeroContent (Element?), PlacementMargin (Thickness),
  PreferredPlacement (TeachingTipPlacementMode = Auto). HeroContent rebuilds
  on swap (simple over hot — teaching-tip hero isn't a render hot path).

GroupStyle on ListView/GridView is deferred per the spec — needs a
Reactor-shaped wrapper for the templated header/footer pair and tracked
separately.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.7 — Media + shapes init props + fluents

Spec 039 §10 / §11 / §12. New init props on six media/shape records.

ImageElement:
- OnImageOpened (Action?), OnImageFailed (Action<string>?), NineGrid
  (Thickness?). Both events route through the new EnsureImageWiring
  helper + PoolableWireFlags so a pooled Image won't double-subscribe
  across mount/unmount cycles.

WebView2Element:
- Source was already the record's positional parameter and is reconciled
  by UpdateWebView2. No change needed — verified at audit.

PathElement:
- StrokeStartLineCap / StrokeEndLineCap / StrokeDashCap (PenLineCap),
  StrokeLineJoin (PenLineJoin), StrokeMiterLimit (double = 10),
  StrokeDashOffset (double), FillRule (FillRule = EvenOdd).
- FillRule lives on the underlying PathGeometry (not Shapes.Path) so
  the reconciler propagates via `p.Data as PathGeometry`.

PipsPagerElement:
- WrapMode, MaxVisiblePips (default 5), PreviousButtonVisibility,
  NextButtonVisibility (both default Collapsed).

RefreshContainerElement:
- PullDirection (default TopToBottom); HasCallbacks now reflects
  OnRefreshRequested.

ParallaxViewElement:
- Source (UIElement?), VerticalSourceStartOffset, VerticalSourceEndOffset.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 5.8 — Universal multi-select SelectionChanged

Spec 039 §8 / §14 #4 universal gap. Adds snapshot-style
OnSelectionChanged to every collection element so Multiple / Extended
selection modes are reachable without dropping to .Set(...) +
SelectedItems iteration.

- ListViewElement / GridViewElement / ListBoxElement
  → Action<IReadOnlyList<int>>? OnSelectionChanged

- TemplatedListViewElement<T> / TemplatedGridViewElement<T> / ItemsViewElement<T>
  → Action<IReadOnlyList<T>>? OnSelectionChanged
  (typed peers materialize items from the SelectedItems indices via a new
   virtual InvokeMultiSelectionChanged on TemplatedListElementBase)

- TreeViewElement — deferred. WinUI's TreeView selection model is
  hierarchical and needs separate design (SelectionMode.Multiple over a
  tree differs in subtle ways from flat-list multi-select).

Snapshot semantics (not delta-style) match CalendarView's
OnSelectedDatesChanged from Phase 3.1 — the callback receives the FULL
current selection on every change, so component state can be a plain
IReadOnlyList without diffing.

Mount-time wiring is now unconditional for ListView/GridView/ListBox
SelectionChanged (handlers resolve via GetElementTag), so the previous
"lazy-wire on null→non-null" code in UpdateListView/UpdateGridView/
UpdateListBox is removed to avoid double-subscription. Tag refresh on
update keeps newly-attached handlers reachable.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 6.1 — rename RichText → RichTextBlock + obsolete alias

The record was already named `RichTextBlockElement`; this aligns the
factory name with the record and with WinUI's
`Microsoft.UI.Xaml.Controls.RichTextBlock`. Both `RichText(string)` and
`RichText(RichTextParagraph[])` overloads are preserved as `[Obsolete]`
forwarding aliases for one release per spec §16.4 (B). Ten sample / doc
/ test call sites migrated to the new name.

New `### Breaking changes (deferred)` section in `CHANGELOG.md` under
`## [Unreleased]` to catalog naming-alignment renames whose
`[Obsolete]` aliases come out in the next minor.

(spec 039 §1.3 / §14 #8)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 6.2 — document divergent Reactor wrappers

Add `<summary>` + `<remarks>` XML doc comments to every factory whose
name diverges from WinUI (no first-party WinUI control of the same
name): `Heading`, `SubHeading`, `Caption`, `VStack`, `HStack` (and the
`(spacing, ...)` overloads), `Flex` / `FlexRow` / `FlexColumn`,
`ListView<T>` / `GridView<T>` / `FlipView<T>` (typed/templated peers
sharing names with untyped factories), and `LazyVStack<T>` /
`LazyHStack<T>`. Each remark explains the SwiftUI / cross-platform
naming influence or the underlying WinUI primitive being wrapped.

(spec 039 §0.3)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 6.3 — document StackElement.Spacing default-8 deviation

Add `<summary>` + `<remarks>` to `StackElement.Spacing` calling out the
deliberate 8-DIP default vs WinUI `StackPanel.Spacing` default of 0.
Doc-only — value unchanged per spec 039 §0.4 / §16. Rationale: Reactor's
`VStack(a, b, c)` call shape almost always wants whitespace between
siblings; the WinUI-zero default produced visually wrong output for the
zero-arg case.

(spec 039 §0.4 / §16)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 6.4 — TextField / MaskedTextField naming rationale

Per spec 039 §16.5 the `TextField` / `MaskedTextField` rename is
explicitly out of scope (option C — keep as-is). Add an XML
`<summary>` + `<remarks>` to each factory pointing readers at the
spec sections that capture the impact analysis and decision. The
`TextField` doc anchors §3.1 / §16; `MaskedTextField` anchors §13 /
§16.3 and notes that the two renames would bundle together if ever
revisited.

(spec 039 §3.1 / §13 / §16)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 6.5 — ScrollViewer obsolete alias + doc comment

Decision: keep `ScrollView`, add `[Obsolete]` `ScrollViewer(Element)`
forwarding alias. Reactor's `ScrollViewElement` reconciles to WinUI's
legacy `Microsoft.UI.Xaml.Controls.ScrollViewer`, but WinUI 3 also
ships the newer `Microsoft.UI.Xaml.Controls.ScrollView` — the shorter,
modern name. Reactor's `ScrollView` is already consistent with that
preferred WinUI name, so the alias direction lets agents reaching for
the WPF / WinUI-legacy `ScrollViewer` spelling discover the modern one.

CHANGELOG entry under `### Breaking changes (deferred)` already in place
from Phase 6.1.

(spec 039 §6 / §16)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 6.6 — ProgressBar obsolete alias + Progress doc comment

Decision: keep `Progress` / `ProgressIndeterminate`, add `[Obsolete]`
`ProgressBar(double)` / `ProgressBar()` forwarding aliases. Reactor's
`ProgressElement` reconciles to WinUI's `ProgressBar`; Reactor names
factories by intent (`Progress`) rather than rendering shape
(`ProgressBar` includes the visual primitive in the name). Aliases let
WinUI muscle-memory callers discover the Reactor spelling without
breaking code.

Also adds `<summary>` + `<remarks>` to the `Progress` and
`ProgressIndeterminate` factories themselves; the rationale doc lives
on the primary (non-obsolete) factory.

CHANGELOG entry under `### Breaking changes (deferred)` already in place
from Phase 6.1.

(spec 039 §5 / §16)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 7.1 — draft spec 040 specialized control scrub

Schedules the follow-up specialized-control audit deferred from spec 039
§13. Draft scaffold only — five controls each get the three audit checks
(event parity, property coverage, naming alignment) as unanswered
checkbox outlines; the audit itself lands in a future change.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 7.2 — specialized control event fluents

Re-runs the Phase 0.3 inventory script over src/Reactor/Controls/** and
broadens the delegate-type regex to capture one level of nested generics
(so DataGridElement<T>.OnSelectionChanged — Action<IReadOnlySet<RowKey>>?
— is now picked up). Adds the missing .SelectionChanged(...) fluent on
DataGridElement<T> plus its null-clear test; the other four specialized
controls (AutoSuggest / MaskedTextField / PropertyGrid / VirtualList)
were already covered by Phase 1's hand-written sweep.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 8.1 — ReactorGallery Button/TextField/InfoBar fluent showcases

Demonstrates the new Phase 1–5 fluents in the gallery:

- ButtonPage: .Click + .AccentButton / .SubtleButton / .TextLink
  (also satisfies the Phase 2.2 .TextLink demo deferred from §17.2).
- TextFieldPage: .NumericInput / .EmailInput / .UrlInput alongside
  .Description(...) per spec §17.3 / §5.
- InfoBarPage: all four severity fluents (.Informational / .Success /
  .Warning / .Error) per spec §17.4 — replaces the previous
  'Severity = InfoBarSeverity.X' record-with pattern.

GalleryControls.cs fully-qualifies WinUI's
Microsoft.UI.Xaml.Controls.ScrollViewer attached-property class because
the Phase 6.5 Factories.ScrollViewer() obsolete alias now shadows it
through the file's 'using static Factories' import. Pre-existing
baseline issue surfaced by the gallery build, fixed here so Phase 8
verifications run.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 8.1 — Card / type-ramp / CalendarView showcases

Three more gallery pages exercising the new Phase 5 / §17 surface:

- Layout/CardPage (new) — Card(child) preset BorderElement with an
  icon + heading + body composition so the theme-aware brushes are
  visible. Demonstrates that Card returns a BorderElement and chains
  with Padding/CornerRadius overrides (§17.5).
- Text/TypeRampPage (new) — Title / Subtitle / Body / BodyStrong /
  BodyLarge factories rendered standalone and inside a Card "article"
  composition (§17.6).
- DateAndTime/CalendarViewPage — adds a Multiple-selection demo wiring
  the new .SelectedDatesChanged(...) fluent into local state (§3.1).
  The fluent drops the leading "On"; the underlying property remains
  OnSelectedDatesChanged.

Both new pages registered in ControlRegistry + PageRouter so they're
discoverable from the gallery shell.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 8.3 — Frame navigation micro-sample

Adds the Frame.Navigated / .Navigating / .NavigationFailed sample
deferred from Phase 3.2. FrameElement bridges into WinUI by calling
the underlying Frame.Navigate(Type), which requires real Page-derived
classes — so the sample ships three trivial code-only Page subclasses
(Home, Details, Broken) alongside the demo component.

The demo wires all three fluents into a 20-entry rolling log via
UseReducer (functional setter — handlers fire after render so the
plain UseState setter would close over stale state). A "Force failure"
button navigates to the Broken page whose ctor throws, so
NavigationFailed fires with the exception captured in the log.

Re-keying the FrameElement on a tick state forces Reactor to remount
the Frame so identical-target re-navigations still raise
Navigating + Navigated (the underlying WinUI Frame coalesces
identical Navigate calls otherwise).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* feat(039): Phase 8.2 — sample apps fluent sweep (no-op verification)

Grepped each in-scope app for the .Set(c => c.OnX = ...) /
property-init OnX = pattern that the Phase 1–7 fluent surface
supersedes:

  samples/apps/chat
  samples/apps/demo-script-tool
  samples/apps/regedit
  samples/apps/wordpuzzle
  samples/apps/validation-showcase
  samples/apps/a11y-showcase

Zero hits across all six. The Set(...) escape-hatches that exist are
theme-resource templating (Set("ButtonBackground", brush)) or
style-only WinUI knobs (Padding, TextWrapping, AcceptsReturn, etc.),
none of which currently have a fluent. The OnClosed / OnItemInvoked
property-init patterns in regedit already live inside with { ... }
record-construction (not inside Set), where the fluent swap doesn't
buy anything.

Documented as no-op on the task list. No app code changes; this
commit is the task-tracker flip + 8.1 / 8.3 deferred-item
cross-references (Phase 2.2 TextLink sample, Phase 3.2 Frame sample).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 9.1 — guide updates

Add minimum-viable coverage of the spec-039 surface to the existing user
guides:

- forms.md: new "Configuring TextField" section covers
  .NumericInput / .EmailInput / .UrlInput / .PhoneInput / .SearchInput
  alongside .MaxLength / .IsSpellCheckEnabled / .CharacterCasing /
  .TextAlignment / .Description.
- styling.md: new "Named-Style Fluents" section covers .AccentButton /
  .SubtleButton / .TextLink and the four InfoBar severity helpers.
- layout.md: new Card and Type-Ramp sections with worked examples.
- navigation.md: new Frame events section (.Navigated / .Navigating /
  .NavigationFailed) plus NavigationView.SelectedTagChanged fluent.
- collections.md: new Multi-Select section covering the universal
  .SelectionChanged fluent on ListView / GridView / ListBox and the
  typed peers, including the IReadOnlyList<int> vs IReadOnlyList<T>
  signature split and the TreeView deferral note.

getting-started.md already used the post-Phase-1 fluent shapes throughout;
no edits needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 9.2 — xaml-developers cross-reference

Add an "Events: XAML Attributes Become Fluents" section to the
XAML-developers guide so people coming from XAML find the bridge
quickly. Covers the canonical mappings (Click, TextChanged,
SelectionChanged, SelectedIndexChanged, IsCheckedChanged) and the
naming convention — the fluent drops the leading On (because C#
binds delegate-property invocation in preference to extension
methods, per spec 039 §0.1), while the underlying property keeps
On so existing record-construction syntax still compiles.

docs/reference/ has no auto-generated API surface — the only
machine-derived API doc is skills/reactor.api.txt + the mirror at
plugins/reactor/skills/reactor-dsl/references/reactor.api.txt,
both regenerated on every Reactor build. No manual action needed
there.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 9.3 — spec 039 Status: Implemented

Flip the spec's status header from "In Implementation" to
"Implemented", with backlinks to the task list, the implementing
branch, and the per-phase commit history (single line, not enumerated).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 9.4 — CHANGELOG entries

Add a spec-039 block under [Unreleased] / ### Added covering the
four required subheadings:

- New fluent extensions (single bullet referring to the inventory).
- Named-style helpers (.AccentButton / .SubtleButton / .TextLink,
  InfoBar severity helpers, Card factory, type-ramp factories).
- New events exposed (CalendarView, Frame, ScrollView, Popup,
  WebView2, MediaPlayerElement, ContentDialog, Image, ComboBox,
  DataGrid, universal collection multi-select).
- New init properties (single bullet referring to spec 039 §14 #4 —
  Phase 4 / Phase 5 inventory).

Naming aliases (RichText → RichTextBlock, ScrollViewer, ProgressBar)
remain in the existing "Breaking changes (deferred)" block where
Phase 6.1 / 6.5 / 6.6 originally landed them — they're already
described there, no duplication needed.

Also flips the Phase 9 task-file checkboxes to [x] and the tracker
"Docs updated (Phase 9)" line.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 10.1 — reactor-dsl SKILL.md fluent-naming clarification

Adds a "Fluent naming convention (callbacks)" section explaining that
record `OnX` callback properties have matching `.X(...)` fluent
extensions (the leading `On` drops). Calls out the C# instance-property
vs extension-method clash that drove the split, and the null-clear
semantic.

reactor.api.txt is auto-regenerated on every Reactor build; current
copy is up-to-date.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 10.2 — reactor-recipes fluent sweep + new recipes

Updates the four target recipes and adds two new ones in both
`plugins/reactor/skills/reactor-recipes/references/` (current layout)
and `skills/recipes/` (legacy layout — still consumed by Reactor.csproj
NuGet pack at `agentkit/skills/recipes/`).

themed-card.cs:
  - Uses the new Card(child) factory (Phase 2.5) instead of hand-rolling
    Border + Theme.CardBackground + .CornerRadius(8) + .Padding(16).
  - Switches headings to the type-ramp factories (Subtitle/Caption).

form-with-validation.cs:
  - Adds an Age field demonstrating .NumericInput() + .MaxLength(3).
  - Applies .EmailInput() to the existing email field.
  - Header note covers the .Changed(...) fluent and its REPLACE
    semantic (vs. the combined-lambda pattern in the body).

list-add-delete.cs:
  - Converts the manual VStack of rows to the templated
    ListView<T>(items, keySelector, viewBuilder) factory with
    .ItemClick(item => ...) wired to the toggle reducer action.

sidebar-nav.cs:
  - Header note and inline comment document the
    .SelectedTagChanged(...) fluent and note that .WithNavigation
    occupies the same callback slot (mutually exclusive).

New: named-styles.cs:
  - Side-by-side demo of .AccentButton() / .SubtleButton() /
    .TextLink() on Button + HyperlinkButton, plus the four InfoBar
    severity fluents (.Informational / .Success / .Warning / .Error).

New: calendar-multiselect.cs:
  - CalendarViewSelectionMode.Multiple (via `with`) + .SelectedDates
    + .SelectedDatesChanged for two-way binding.

index.md updated in both layouts to reference the new recipes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 10.{3,4,5,6,7} — additional skill fluent sweep

10.3 reactor-design: Typography table extended with the WinUI 3 ramp
factories (Title/Subtitle/Body/BodyStrong/BodyLarge) with a note
disambiguating them from the older Heading/SubHeading Reactor presets.
"Avoid Deep Nesting" example gains a Card(...) one-liner. Mirror update
applied to legacy skills/design.md.

10.4 reactor-getting-started: no-op — zero .Set(c => c.On*) or
with { On* = ... } patterns in SKILL.md.

10.5 reactor-forms: Available-input-types table extended for TextField
(+ .MaxLength(n), .NumericInput(), .EmailInput(), .Changed(handler))
and PasswordBox (+ .MaxLength(n), .PasswordChanged(handler)). New
"Named-input shapes" callout with a worked .EmailInput() chain.

10.6 reactor-commanding / reactor-navigation / reactor-input: no-op —
zero .Set(c => c.On*) or property-init callback patterns in any.

10.7 Top-level mirrors:
  - Root SKILL.md: cheatsheet adds Title/Subtitle/Body/BodyStrong/
    BodyLarge line and Card(child) line; recipe roll-call now includes
    canvas-positioning, named-styles, calendar-multiselect.
  - skills/dsl-reference.md: typography table gains the 5 WinUI ramp
    factories; layout-containers table gains a Card(child) row.
  - skills/forms.md: input-types table mirrors the reactor-forms update.
  - skills/input.md / skills/navigation.md / skills/commanding.md:
    no-op (same grep-clean result as 10.6).

Phase 10 tracker line flipped to [x].

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* test(039): Phase 11.1 — public-API surface guard test

Adds PublicApiSurfaceGuardTests under tests/Reactor.Tests/Elements/ that
walks every Element record reflectively and asserts each Action/Action<T>
callback property has a matching public extension method with a compatible
delegate-shape signature.

Two intentional property-name exceptions allowlisted with inline rationale:
VirtualListElement.Ref (ref-capture; clashes with generic .Ref<T> modifier)
and XamlHostElement.Updater (constructor-time interop hook). All other
callback properties resolve cleanly to their fluent counterpart.

Failures are collected and reported in a single readable assertion so a
future record gaining several callbacks at once surfaces every missing
fluent in one shot. Guards the spec 039 §14 #1 / §15 Q1 fluent convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* test(039): Phase 11.2 — naming-alignment guard test

Adds NamingAlignmentGuardTests under tests/Reactor.Tests/Elements/ that
loads the Reactor.xml doc-comment output and asserts each spec §0.3
divergent factory (VStack/HStack/Heading/SubHeading/Caption/Flex/FlexRow/
FlexColumn/LazyVStack/LazyHStack/ListView<T>) carries a non-empty <remarks>
explaining the WinUI deviation. Failures collected so a future rename
surfaces every regression in one shot.

ListView only requires the remark on the generic overload (TemplatedListViewElement<T>);
the untyped ListView matches WinUI's spelling and needs no rationale.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* test(039): Phase 11.3 — null-clear contract audit + missing facts

Audited EventFluentNullClearTests against the CSV inventory of all
callback properties and added the 8 facts missing for fluents landed
in Phases 5/7:

  - ItemsView.ItemInvoked / SelectionChanged
  - TemplatedGridView.ItemClick / SelectedIndexChanged / SelectionChanged
  - TemplatedFlipView.SelectedIndexChanged
  - TemplatedListView.SelectionChanged
  - PropertyGrid.RootChanged

Total null-clear facts now 92 (was 84).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* test(039): Phase 11.4 — Card + AccentButton theme-ref smoke

Adds CardThemeResolutionSmokeTests asserting Card(child) wires the
CardBackgroundFillColorDefaultBrush + CardStrokeColorDefaultBrush keys
into ThemeBindings (so render-time resolution adapts to theme switches)
and cross-checks the keys against Theme.CardBackground / Theme.CardStroke.

For .AccentButton(): asserts the OnMount action exists and (when the
compiler closure layout cooperates) that the captured style-name string
is "AccentButtonStyle".

Full Light/Dark/HighContrast flip-and-verify test deferred — needs a
theme-flip primitive on Reactor.AppTests which is a separate workstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* test(039): Phase 11.6 — sample-page construction smoke

Adds GallerySampleConstructionSmokeTests with one [Fact] per Phase 8
gallery page (ButtonPage / TextFieldPage / InfoBarPage / TypeRampPage /
CardPage / CalendarViewPage / FrameNavigationPage) asserting the page's
factory + fluent chain constructs without exception and that bound
callbacks reach the expected element property.

The gallery pages are internal types in a WinExe so the full mount-test
under Light/Dark/NightSky needs the Reactor.AppTests harness — deferred
with a tracked checkbox. The fixture-level construction smoke catches
the same defect class (typos, missing factories, wrong receiver type)
without the harness cost.

Phase 11.5 noted as no-op in the task file — source-gen scaffolding was
struck per Phase 0.4 / Q1; the reflective surface guard from 11.1 covers
the equivalent drift detection.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* test(039): Phase 11.7 — spec-flagged bug regression checks

Adds SpecFlaggedBugRegressionTests with named regression checkpoints for
the three spec-039 §14 bugs:

  - §3.4 AutoSuggestBox.OnSuggestionChosen reachable via record
    constructor (factory path) and via .SuggestionChosen(...) fluent
  - §14 #5 HyperlinkButton.NavigateUri fluent exists and the
    HyperlinkButton(Command) + .NavigateUri(...) doc-promise holds
  - §17.5 Card(child) theme-binding wiring (cross-reference to the
    detailed smoke in CardThemeResolutionSmokeTests)

Flips the Phase 11 checkboxes and the bottom-tracker "Tests landed
(Phase 11)" entry. Two AppTests-harness-blocked deferrals tracked
inline:
  - 11.4 real theme-flip Light/Dark/HighContrast resolution test
  - 11.6 real Phase-8 page mount-and-fire test

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 3.7 — defer niche WinUI events to spec 040

Convert the bundled "defer if too big" line to explicit [deferred]
checkboxes per item with per-control rationale (MenuFlyout cancel-args,
CommandBar lack-of-consumer, SemanticZoom/AnnotatedScrollBar not modelled,
MapControl no SDK dep). Adds §6.1 carry-over section to spec 040 capturing
the ownership transfer. Flips the §14 #3 tracker checkbox now that 3.7
is no longer ambiguous.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* build(039): regenerate reactor.api.txt after rebase onto main

Picks up upstream Viewbox.Stretch / Viewbox.StretchDirection fluents
(#310) that were dropped by the rebase conflict resolution (chose
ours-with-regen-from-build strategy).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): move Phase 9 guide edits into the pipeline source

PR review flagged that Phase 9.{1,2} edited docs/guide/*.md directly, but
those are compiled outputs — the source-of-truth is
docs/_pipeline/templates/<topic>.md.dt + docs/_pipeline/apps/<topic>/App.cs
per the AI-author skill at docs/_pipeline/ai-author-skill.md.

This commit moves each previously-inlined addition into the corresponding
template + doc-app pair and regenerates the compiled guide via
`mur docs compile`:

- forms.md.dt + apps/forms/App.cs: new TextFieldConfigDemo snippet drives
  the "Configuring TextField" section (named-input fluents + MaxLength /
  IsSpellCheckEnabled / CharacterCasing / TextAlignment / Description).
- styling.md.dt + apps/styling/App.cs: NamedStylesExample snippet drives
  the "Named-Style Fluents" section (AccentButton / SubtleButton / TextLink
  + four InfoBar severity helpers).
- layout.md.dt + apps/layout/App.cs: CardDemo + TypeRampDemo snippets drive
  the Card and Type-Ramp sections.
- navigation.md.dt + apps/navigation/App.cs: FrameEventsDemo (with a
  trivial DocsFrameDemoPage Page subclass for Frame.Navigate to target)
  and SelectedTagChangedDemo snippets drive the Frame Events and
  NavigationView.SelectedTagChanged sections.
- collections.md.dt + apps/collections/App.cs: MultiSelectDemo snippet
  drives the "Multi-Select with SelectionChanged" section.
- xaml-developers.md.dt + apps/xaml-developers/App.cs: EventsFluentExample
  snippet drives the "Events: XAML Attributes Become Fluents" section.

Net effect on the compiled output (docs/guide/*.md) vs the prior
direct-edit commits: only three files have material content diffs and
all three are *strict improvements* over the prior fragments — the
original prose code blocks contained either (a) undeclared identifiers
(`MyXamlPage`, `handler`, `bodyElement`, `nav`) or (b) buggy logic
(`indices.Select(i => contacts[i].Id)` against a typed-peer selection
callback that delivers `IReadOnlyList<T>`, not `IReadOnlyList<int>`).
The compiled snippets now come from real, building components in the
doc apps.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* docs(039): Phase 12.{1,2} — check off build + perf neutrality

Records the post-rebase ship-gate results: dotnet build -warnaserror clean
(NU1903 cleared by upstream #311's solution-warning sweep), startup_perf
TTFP 238.1 ms vs 230.2 ms calibrated baseline (~3%, within noise — WinUI3
baseline moved the opposite direction over the same window), stress_perf
reconcile times essentially identical (46.7 ms vs 46.3 ms at 50%,
56.8 ms vs 56.9 ms at 100%).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(039): reconciler — subscribe-before-source + uncontrolled CalendarView selection

Addresses PR #314 review feedback (Copilot inline comments on
Reconciler.Mount.cs:974/1044/3037 and Reconciler.Update.cs:3566).

Three subscribe-before-source ordering bugs — small or cached resources
can fire load/init events synchronously during the Source assignment, so
handlers attached after Source would miss the event:

- MountImage: SetElementTag + EnsureImageWiring move before image.Source
  so cached BitmapImage / SvgImageSource hits don't drop ImageOpened /
  ImageFailed.
- MountWebView2: SetElementTag + all event trampolines (NavigationStarting /
  NavigationCompleted / WebMessageReceived / CoreWebView2Initialized) move
  before webView.Source so a fast CoreWebView2 initialization can't fire
  before subscriptions land.
- MountMediaPlayerElement: SetElementTag + MediaOpened / MediaEnded /
  MediaFailed subscriptions move before player.Source so a cached URI or
  fast-failing source can't drop the initial event.

One uncontrolled-selection bug:

- UpdateCalendarView: SyncSelectedDates was called unconditionally with a
  potentially-null `n.SelectedDates`, and the diff treated null as "desired
  is empty" which cleared every user-picked date on the next render. Now
  only sync when the caller explicitly provided a SelectedDates list —
  null means "uncontrolled, leave the user's selection alone". SyncSelectedDates
  signature tightens to non-null `desired` accordingly.

All 227 element-extension tests (EventFluent / GallerySample / Phase4Init /
SpecFlagged filters) still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(039): PR #314 CR — remove ScrollViewer alias + sweep recipe/skill accuracy

Addresses the remaining Copilot inline review comments from PR #314 (after
the 4 reconciler bug fixes in b8f4d00):

API surface
- Remove the [Obsolete] Factories.ScrollViewer(Element) alias added in
  Phase 6.5. Reviewer flagged that the alias is *not* purely additive —
  under `using static Microsoft.UI.Reactor.Factories;` + `using
  Microsoft.UI.Xaml.Controls;`, the bare name `ScrollViewer` shadows
  Microsoft.UI.Xaml.Controls.ScrollViewer's attached-property type, so
  callers reaching for ScrollViewer.SetVerticalScrollMode(...) etc. have
  to fully-qualify (as samples/ReactorGallery/UserControls/GalleryControls.cs
  was doing). Discoverability win didn't justify the imposed disambiguation
  cost; alias removed. CHANGELOG + Phase 6.5 task-spec entry updated to
  record the reversal. GalleryControls.cs un-fully-qualifies its four
  ScrollViewer.Set*(...) calls.

Tests
- PublicApiSurfaceGuardTests.DelegateShapeMatches now recursively walks
  generic arguments instead of only comparing outer-generic def + arity.
  Prevents Action<IReadOnlySet<RowKey>> from matching Action<IReadOnlyList<int>>.
- ControlCatalogFixtures: catalog entry label `RichText` → `RichTextBlock`
  so the rename guard isn't undermined by the fixture.

Doc / recipe accuracy
- xaml-developers.md.dt: XAML→Reactor table corrected — TextField fluent is
  `.Changed(...)` not `.TextChanged(...)`; ComboBox XAML event is
  `SelectionChanged` (not `SelectedIndexChanged`) with a note that the
  Reactor fluent surfaces the index; CheckBox XAML uses
  `Checked`/`Unchecked` (not `IsCheckedChanged`) with a note that the
  Reactor fluent collapses the three XAML events. Recompiled.
- reactor-dsl SKILL.md: `.Click(_ => Save())` → `.Click(() => Save())`
  (Click takes parameterless Action).
- reactor-forms SKILL.md: §17.4 → §17.3 (named-input scopes live in
  §17.3; §17.4 is InfoBar severity). PasswordBox signature in the
  modifiers table matches the real factory: `(password, setPassword,
  placeholder)` + `.Header(text)` fluent (no fourth positional `header`).
- skills/recipes/named-styles.cs + plugin mirror: `.TextLink()` uses
  `TextBlockButtonStyle` (not `HyperlinkButtonStyle`).
- skills/recipes/list-add-delete.cs + plugin mirror: reverted the
  "no manual .WithKey needed" guidance and restored .WithKey(item.Id)
  on each row. The reconciler reconciles templated-list realized
  containers by index (ItemsSource = 0..N range, RefreshRealizedContainers
  matches by position), so KeySelector on the element record isn't
  consulted for diffing — on reorder/delete-from-middle, focus and
  per-row state stick to the wrong row without an explicit .WithKey.
- skills/recipes/canvas-positioning.cs mirrored from plugin copy; added
  to skills/recipes/index.md so the top-level SKILL.md cheat-sheet
  reference resolves.
- samples/ReactorGallery/.../CardPage.cs: "embedded file remains
  pure-ASCII" comment removed (the file contains a literal Fluent Icons
  glyph — comment was wrong, not the file).

Tooling
- tools/api-scrub/Build-EventFluentInventory.ps1 header comment now
  documents the `File` column added during Phase 7.2.

Spec follow-up
- docs/specs/040-...md: dead link to the not-yet-existing
  tasks/040-specialized-control-scrub-implementation.md replaced with
  prose noting the task list will be created once the audit lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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) <[email protected]>
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) <[email protected]>
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) <[email protected]>
@codemonkeychris
Chris Anderson (codemonkeychris) deleted the refactor/move-src-to-src-dir branch May 28, 2026 19:11
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Jul 31, 2026
Multi-model cross-check (dimension #8 of the pr-review skill, run on a
different model family) confirmed all seven earlier fixes and raised four
more. Three are addressed here; the fourth was tested and rejected on
evidence.

The real one: `HalfSyncedDeconstructions` fired on *any* snippet tuple with
two or more names. Its whole justification is the `(x, setX)` convention —
a `UseState` pair moves together, so half of it is drift — but an ordinary
tuple carries no such contract. `var (row, count) = ...` beside a card that
happens to bind an unrelated `row` reported `count`, an innocent sibling.
With no allowlist that is a blocked tree. It is now restricted to
deconstructions that actually contain a setter/value pair; the shipped
`setPath` defect is still caught and the wholesale-rename silence is
unchanged.

Rejected on evidence: tightening "the page's shared context" from "outside
any card" to "lexically visible from this card", which would stop a page
helper's parameters from resolving names in unrelated cards. Implemented and
measured — it reports two correct cards and finds no drift. ListView's
"Animated edit" reproduces the body of the page's `Mutate` helper and elides
its signature as `void Mutate(...)`, so `change` really is the name beside
it; SpacingPage's "Margin" uses `element.Margin(16)` as deliberate
pseudocode. Buying that precision costs two snippets rewritten worse, so the
coarseness stays — but it is now documented as a measured trade-off with the
two counter-examples named, rather than asserted.

Also corrected two pieces of prose that overstated or misstated:

- The omission-detection note claimed Basic ItemsView *proves* structural
  comparison cannot coexist with a clean tree. It does not: that card
  diverges in argument structure, while TabView's omission sat under an
  otherwise identical chain, so a narrower comparator could separate them.
  Restated as the precision trade-off it is.
- TESTING.md described `GallerySampleLintTests` as enforcing sample-card
  titles, ordering and required arguments. It enforces none of those; it
  checks ItemsView view-builder roots, shape painting, and `ms-appx` assets.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: cf175758-fc9b-4061-8e35-0248470487e2
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Nov 18, 2026
- Drop the skill's self-authorization of the #8 model override; ask once when
  the host requires an explicit user choice, else fall back and report it.
- Make #8's blind scan structural: launch it with the primaries and send
  critical/high findings as a follow-up (phase B).
- #8 judges substance; the orchestrator verifies family from host-reported
  models and reports same-family agreement as corroborated.
- Add a not-applicable header to the shared contract and report it as such.
- Pass the contract and dimension fragments by path, not inline.
- Private, deleted scratch diff; refresh the example output, description,
  README cross-family wording, and pr-lifecycle handling of skipped dimensions.

Co-authored-by: Copilot App <[email protected]>
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Nov 18, 2026
…del family (#1574)

* pr-review: always fan out one sub-agent per dimension and run a blind-first cross-family check

The #1463 refresh let the orchestrator review small diffs directly, which combined
with host 'review small things inline' heuristics to skip every sub-agent and the
multi-model pass. Make the seven-way fan-out and #8 unconditional, state that
invoking the skill is the explicit request for sub-agents and the cross-family
model override, retry failed dimensions once, and have #8 form its own view
before reading specialist findings (as winappCli's pr-review does).

Co-authored-by: Copilot App <[email protected]>

* pr-review: pass sub-agents a diff file path instead of seven inline copies

Inlining the full diff in seven task prompts in one response hit the output limit
in a live run, truncating the fifth call so three dimensions had to be relaunched.

Co-authored-by: Copilot App <[email protected]>

* Address pr-review findings

- Drop the skill's self-authorization of the #8 model override; ask once when
  the host requires an explicit user choice, else fall back and report it.
- Make #8's blind scan structural: launch it with the primaries and send
  critical/high findings as a follow-up (phase B).
- #8 judges substance; the orchestrator verifies family from host-reported
  models and reports same-family agreement as corroborated.
- Add a not-applicable header to the shared contract and report it as such.
- Pass the contract and dimension fragments by path, not inline.
- Private, deleted scratch diff; refresh the example output, description,
  README cross-family wording, and pr-lifecycle handling of skipped dimensions.

Co-authored-by: Copilot App <[email protected]>

* Address review round 1

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>
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.

1 participant