Repository navigation
docs(024): add AI agent devtools spec - #28
Merged
Chris Anderson (codemonkeychris) merged 1 commit intoApr 18, 2026
Merged
Conversation
Designs the MCP-based devtools surface that gives an AI agent the observability and automation it needs to iterate on a Reactor app without a human in the middle. Renames --preview to --devtools, exposes a real WinUI visual tree with rendered bounds, UIA-driven verbs plus a reactor.fire escape hatch, and an explicit reactor.reload lifecycle instead of dotnet watch. Tracks #16. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Jun 25, 2026
Alexandre Zollinger Chohfi (azchohfi)
added a commit
that referenced
this pull request
Jun 26, 2026
Reduces redundant WinRT/COM-RCW boundary crossings and per-element allocations on the diff/reconcile/patch hot path (data-grid stress workload, StocksGrid). Targets the dominant Reconcile gap. Reconciler.cs / Update.cs / Mount.cs: - #16 UnmountRecursive: read ReactorAttached.State once (was 5x GetValue). - #17 UnmountAndCollect: read element tag once (was 5x GetElementTag). - #14 Update: coalesce repeated `is FrameworkElement` RCW type-tests to one. - #15 Cache the component rerender delegate on ComponentNode; recreate only when the requestRerender identity changes. - #18 UpdateDefaultAutomationName: ref/ordinal short-circuit before the AutomationProperties.GetName COM read. - #19 ApplyModifiers accepts null = clear-all (no fresh ElementModifiers). - #20 PopulateDirtyAncestorPath iterates a tracked self-triggered set instead of the whole _componentNodes dict. - #21 UnmountAndPool reuses a borrowed scratch list (reentrant calls fall back to a fresh list). - #22 RefreshRealizedContainers reuses a cleared field list. - #23 ApplyStyleToElement ref-equal + ActualTheme guard; ApplyThemeBindings gated on the ShallowEquals fast path. - #24 BuildCacheKey: thread-static StringBuilder + pair buffer, single pass. - #25 HasConsumedContextChanged compares via Context<T>/EqualityComparer<T> (no boxing of value-type context). - #26 ApplyResourceOverrides: no ToHashSet/ToArray, ref-equal fast path. - #27 WireReferenceListEdge: static loop, no per-edge List/closures. - #28 ApplyStaggerDelays: hoisted static animation-key array. - #29 PushContextDisposable: single-pair push overload, pooled PopOnDispose. Reconciler.KeyedItemsBinding.cs: - #39 ref-equality cache; only realloc + SetItemViewSource on change. Reconciler.Mount.cs: - #40 LayoutFootgunDetector gated by GridElement pre-filter. AccessibilityScanner.cs (debug-only scan path): - #62 compute GetChildren once in Walk, pass into Push. - #63 cache sibling-text array in ScanContext, invalidate on Push. - #64 BuildContext single-pass with pooled scratch (no LINQ chains). - #65 IsLikelyEmoji explicit span loop (no LINQ). - #66 CheckTabIndexGaps sorts a rented buffer (no OrderBy/ToList). Behavior preserved exactly: coalesced COM reads observe the same values at the same times; unmount/cleanup ordering unchanged; scanner emits identical findings. AOT/trim clean (no new reflection). Adds tests/Reactor.Tests/ReconcilerInteropPerfTests.cs (11 tests: rerender-delegate caching, context-change compare, cache-key reuse, single-pair context push, scanner output parity). Closes #654 Co-authored-by: Copilot <[email protected]>
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/specs/024-ai-agent-devtools.mddesigning the MCP-based devtools surface that closes the AI-agent perception gap tracked in Give the AI agent 'eyes': make build → view → iterate efficient for AI-driven development #16.--preview→--devtoolswith deprecated aliases; keeps the VS Code preview panel working unchanged.tree,screenshot,click,type,waitFor,fire,reload, …), a rendered WinUI visual tree (post-layout bounds, templated parts, sparse Reactor source backrefs), UIA-driven automation with a documented Reactor-event-injection escape hatch, and an explicitreactor.reloadlifecycle instead ofdotnet watch.r:main/Counter.btn-inc); top-levelWindowonly (ContentDialog/Popup/Flyout are nodes inside their owner).Key decisions captured in §16
dotnet run+ agent-drivenreactor.reload, notdotnet watch— process replacement is an explicit, agent-visible event.waitFor.$schemapinned on every tree payload.reactor.snapshot/reactor.diffdeferred past v1 — agent caches/diffs in its own turn context.tree,click, …); the MCP plugin name carries the namespace.Test plan
reactor.reloadlifecycle (§11) is implementable given currentReactorApp.Runshutdown path.🤖 Generated with Claude Code