docs: under-the-hood guide to the V1 Protocol + extension cookbook#444
Merged
Conversation
Two new comprehensive-tier pages in the Under-the-hood track (Section 9 of the docset): - docs/_pipeline/templates/v1-protocol.md.dt (order 33.5) — reference for the V1 handler protocol. Dispatch model, IElementHandler contract, ref-struct contexts + ReactorBinding, the mount-then-subscribe ordering invariant, ChildrenStrategy survey (11 shapes), pool integration, echo suppression / WriteSuppressed, element-identity tag pattern, descriptors as declarative sugar, full PropEntry builder vocabulary, registration variants. Patterns, Common Mistakes, Tips, Next Steps. - docs/_pipeline/templates/extending-reactor-controls.md.dt (order 33.7) — cookbook. Walks through porting WinUI RatingControl as a new StarMeterElement descriptor end-to-end: element record → descriptor-vs-handler decision → prop wiring → events → children strategy → registration → use. Locks in the perf bar (pool reuse, echo suppression, static trampolines) external authors should hit. Each page ships with a compilable doc app: - docs/_pipeline/apps/v1-protocol/ — LedIndicatorElement custom element registered via a ControlDescriptor (joint-field OneWay over Border.Background). - docs/_pipeline/apps/extending-reactor-controls/ — StarMeterElement custom element wrapping WinUI RatingControl with Controlled + OneWay + OneWayConditional props and a gated callback subscription. Prose is written to reflect the post-cleanup state (non-V1 paths removed): V1 is the only protocol, RegisterHandler is GA, no [Experimental] surface, no UseV1Protocol flag mentioned, no Path-B-delegate handlers as a stable shape. The doc apps still call AppContext.SetSwitch today because that's what V1 dispatch requires in the current codebase — that line goes away with the cleanup. Five small <snippet:...> markers added in src/Reactor/Core/V1Protocol/ so the reference page can cite the authoritative source for the handler contract, MountContext, ChildrenStrategy survey, the adapter Mount body, and the descriptor's interpretation phase ordering. Framework still builds clean. Generated outputs included so the docset is publishable from this PR: - docs/guide/v1-protocol.md - docs/guide/extending-reactor-controls.md - docs/guide/images/v1-protocol/led-indicator.png - docs/guide/images/extending-reactor-controls/star-meter.png Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
codemonkeychris
added a commit
that referenced
this pull request
May 29, 2026
…Protocol" (#448) The two pages added in #444 (the protocol reference + the extension cookbook) were never added to the mkdocs `nav:` tree, so they published but were unreachable from the site navigation. Wire both into the "Under the Hood" section. Rename the reference page from the internal "V1 Protocol" label to the clearer "Control Reconciler Protocol" (reader-visible only): - template v1-protocol.md.dt -> control-reconciler-protocol.md.dt, which drives the generated output filename - page title/H1, nav label, and the 8 cross-links + link text from the cookbook page - internal slugs left as-is (doc-app folder, image paths, the src/Reactor/Core/V1Protocol namespace) since they are not reader-visible Recompiled the docset (no screenshots), which refreshes generated output that had drifted from source: - threading-and-dispatch.md: echo-suppression snippet picks up the EchoSuppressScopeDepth path - skills/reactor.api.txt (both copies) regenerated: adds the ItemsRepeater<T> factory overloads and the V1UnmountDisposition enum Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/_pipeline/templates/v1-protocol.md.dt(order 33.5) — reference for the V1 handler protocol: dispatch model,IElementHandlercontract, ref-struct contexts +ReactorBinding, mount-then-subscribe ordering invariant, fullChildrenStrategysurvey (11 shapes), pool integration, echo suppression, element-identity tag pattern, descriptors as declarative sugar, the completePropEntrybuilder vocabulary, registration variants.docs/_pipeline/templates/extending-reactor-controls.md.dt(order 33.7) — cookbook. End-to-end walkthrough of porting WinUIRatingControlas aStarMeterElementdescriptor: element record → descriptor-vs-handler choice → prop wiring → events → children strategy → registration. Locks in the perf bar (pool reuse, echo suppression, callback-gated subscription) external authors should hit.docs/_pipeline/apps/with working custom-control extensions (LedIndicatorElement,StarMeterElement).<snippet:...>markers added insrc/Reactor/Core/V1Protocol/so the reference page can cite the authoritative source for the handler contract,MountContext,ChildrenStrategy, the adapter's Mount body, and the descriptor interpreter. Framework rebuilds clean.docs/guide/v1-protocol.md,docs/guide/extending-reactor-controls.md,docs/guide/images/{v1-protocol,extending-reactor-controls}/*.png).Audience and framing
The intended reader is anyone extending Reactor with a new native control (third-party WinUI control, custom
Controlsubclass, or built-in not yet in the catalog), or anyone debugging why an existing element does not update the way it should. Prose is written to reflect the post-cleanup state the user asked for — V1 is the only protocol,RegisterHandleris GA, no[Experimental]surface, noUseV1Protocolflag mentioned, no Path-B-delegate handlers as a stable shape. The doc apps still callAppContext.SetSwitch(\"Reactor.UseV1Protocol\", true)today because that switch is still required at the codebase's current state; that line goes away with the cleanup.Validation
mur docs compile --validate-only --topic v1-protocol— passes (one non-fatal warning aboutwinui-refnot being declared, which is correct — these are Reactor-original concept pages, not transparent wrappers).mur docs compile --validate-only --topic extending-reactor-controls— passes (same non-fatal warning).mur docs compile --topic <each>— both topics emit their.md+ screenshot; no other topics rebuilt.RatingControlat 3.5 stars with the configured caption.src/Reactor/Reactor.csprojrebuilds clean with the source markers in place.Comprehensive-tier checklist (per
ai-author-skill.md§6)## Patterns✓## Common Mistakes✓## Tips✓## Next Stepswith ≥3 links ✓ (5 each)ai:caveatblock ✓ (one each)Test plan
docs/guide/v1-protocol.mdanddocs/guide/extending-reactor-controls.mdto sanity-check the prose against the implementationmur docs compile --topic v1-protocol/--topic extending-reactor-controlslocally and diffs the output against the committeddocs/guide/*artifacts🤖 Generated with Claude Code