Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ re-renders automatically. No XAML. No data binding. No ViewModels.
| [`skills/async.md`](skills/async.md) | Fetching data, caching, pagination, optimistic writes. `UseResource`, `UseMutation`, `UseInfiniteResource`, `Pending`. |
| [`skills/design.md`](skills/design.md) | Any visual-styling work. Windows 11 design rules — theme tokens, High Contrast, typography, 4px grid, acrylic surfaces, accessibility. |
| [`skills/commanding.md`](skills/commanding.md) | Actions that appear in multiple surfaces (menu + toolbar), need keyboard shortcuts, or need `CanExecute`. `Command`, `StandardCommand`, `UseCommand`, `CommandHost`. |
| [`skills/devtools.md`](skills/devtools.md) | Drive a running app from code — screenshot, inspect visual tree, click/type/scroll, read hook state. Load when diagnosing visible bugs (layout, contrast) or verifying a change landed. |
| [`skills/devtools.md`](skills/devtools.md) | Drive a running app via `mur devtools` — screenshot, inspect visual tree, click/type/scroll, read hook state. Load when diagnosing visible bugs (layout, contrast) or verifying a change landed. |
| [`skills/dsl-reference.md`](skills/dsl-reference.md) | Look up signatures — every factory, modifier, and enum in the DSL. |

## Project Setup
Expand Down
330 changes: 330 additions & 0 deletions docs/specs/025-devtools-cli-parity.md

Large diffs are not rendered by default.

214 changes: 150 additions & 64 deletions skills/devtools.md

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions src/Reactor.Cli/Devtools/DevtoolsSupervisor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,33 @@ internal static SupervisorArgs ParseArgs(string[] args)

public static int Run(string[] args)
{
// Spec 025 routes: session subverbs and the named-verb surface dispatch
// before the launcher parser so the launcher doesn't misread them as
// project paths.
if (args.Length > 0)
{
var first = args[0].ToLowerInvariant();
if (first == "session")
return SessionCommands.Run(args.Skip(1).ToArray());
if (DevtoolsVerbs.KnownVerbs.Contains(first))
{
// --launch opts into the old spawn-per-invocation behavior for
// verbs that existed as launcher subverbs (tree, screenshot,
// list/components). Today those one-shot forms are still served
// by the launcher path; named-verb mode without --launch attaches
// to the running session via lockfile discovery.
bool launch = args.Contains("--launch");
if (!launch)
{
var verbArgs = args.Skip(1).ToArray();
return DevtoolsVerbs.Run(first, verbArgs);
}
// Fall through to launcher parsing with --launch stripped;
// launcher subverbs don't know the flag.
args = args.Where(a => !string.Equals(a, "--launch", StringComparison.Ordinal)).ToArray();
}
}

var parsed = ParseArgs(args);
if (parsed.Help)
{
Expand Down Expand Up @@ -164,6 +191,8 @@ internal static IReadOnlyList<string> BuildChildArguments(string project, string
args.Add(component);
args.Add("--mcp-port");
args.Add(mcpPort.ToString());
args.Add("--devtools-project");
args.Add(Path.GetFullPath(project));
return args;
}

Expand Down Expand Up @@ -219,6 +248,43 @@ private static void PrintHelp()
Console.WriteLine();
Console.WriteLine(" --print-config Emit MCP config fragments (Claude Code, Copilot, VS Code)");
Console.WriteLine(" wired to the given --mcp-port; prints to stdout only.");
Console.WriteLine();
Console.WriteLine("Session management:");
Console.WriteLine(" mur devtools session list [--pretty] List running devtools sessions");
Console.WriteLine(" mur devtools session clean [--dry-run] Remove stale lockfiles");
Console.WriteLine();
Console.WriteLine("Named verbs (attach to the running session via lockfile discovery):");
Console.WriteLine(" version App build tag, pid, and MCP port");
Console.WriteLine(" windows List active windows with bounds and mounted component");
Console.WriteLine(" components List Component classes; marks which is mounted");
Console.WriteLine(" switch <component> Swap the root component (invalidates node ids)");
Console.WriteLine(" tree [--selector S] [--window W] Dump the visual tree as JSON");
Console.WriteLine(" [--view summary|full] [--include-reactor-source]");
Console.WriteLine(" screenshot [--selector S] [--out P] Capture a PNG of the window (or selector region)");
Console.WriteLine(" [--wait-idle] [--include-chrome]");
Console.WriteLine(" state [--selector S] Read reactive hook state from the mounted component");
Console.WriteLine(" click <selector> Click the element via UIA Invoke/Toggle/Selection");
Console.WriteLine(" type <selector> <text> [--clear] Set text on a value-bearing control");
Console.WriteLine(" focus <selector> Programmatically focus the element");
Console.WriteLine(" invoke <selector> Call IInvokeProvider.Invoke directly");
Console.WriteLine(" toggle <selector> Call IToggleProvider.Toggle; returns new state");
Console.WriteLine(" select <selector> <item-selector> Select an item in a ListView / ComboBox");
Console.WriteLine(" scroll <selector> [--by H%,V%] Scroll by percent deltas or scroll an item into view");
Console.WriteLine(" [--to <item-selector>]");
Console.WriteLine(" expand <selector> Expand an ExpandCollapse element (ComboBox, TreeView)");
Console.WriteLine(" collapse <selector> Collapse an ExpandCollapse element");
Console.WriteLine(" wait <selector> [--text X] Poll until a predicate matches or timeout");
Console.WriteLine(" [--text-matches RE] [--visible]");
Console.WriteLine(" [--count N] [--timeout MS]");
Console.WriteLine(" fire <Component>.<event> Invoke a named handler method on a Component");
Console.WriteLine(" [--args JSON] (escape hatch — prefer UIA verbs when possible)");
Console.WriteLine(" reload [--component Name] Rebuild + relaunch via the supervisor sentinel");
Console.WriteLine(" shutdown Close the app cleanly (supervisor exits 0)");
Console.WriteLine(" call <tool|method> [--args JSON] Generic JSON-RPC passthrough (parity escape hatch)");
Console.WriteLine();
Console.WriteLine(" Shared flags: --endpoint <url> override discovery");
Console.WriteLine(" --auto opt-in loopback port scan (slow)");
Console.WriteLine(" --pretty indent JSON output");
}

/// <summary>
Expand Down
Loading
Loading