Skip to content

feat(skills): uno-testing confirms each edit with uno_app_hot_reload_status when the App MCP offers it - #188

Merged
kazo0 merged 4 commits into
mainfrom
dev/steve/uno-testing-hot-reload-status
Oct 12, 2026
Merged

kazo0 merged 4 commits into
mainfrom
dev/steve/uno-testing-hot-reload-status

Conversation

@kazo0

@kazo0 kazo0 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #186 (base dev/steve/uno-testing-hot-reload).

What

The uno-testing skill (both copies) and the PostToolUse hook use uno_app_hot_reload_status when the App MCP's discovery lists it (unoplatform/uno.app-mcp#187):

  • Step 2: when the tool is listed, uno_app_start already waits for Hot Reload and its result has a Hot Reload: line; if it says still initializing, call uno_app_hot_reload_status(waitForReady: true) before the first edit. Without the tool, the 15 s clock rule from feat(skills): uno-testing edits the running app through Hot Reload instead of restarting it, with a PostToolUse hook #186 stays.
  • After an edit: uno_app_hot_reload_status(file) first (applied, or the compiler errors to fix and save again, no restart), then uno_app_find_elements(waitForMs).
  • Recovery: "no operation covered the file" replaces the 10 s timeout as the signal to re-save, then start.
  • Hook context names the tool "when that tool is available" and drops the 15 s condition.

Verification

  • Hook self-check: a .xaml path returns JSON whose additionalContext names the tool; a .md path returns nothing.
  • FieldCheck run fieldcheck-20261009-170353 (unoplatform/private#1190) ran this branch at b590d5d with an App MCP 1.4 pack that has the tool: the two Uno sessions called uno_app_hot_reload_status 6 and 10 times, every call reported the edit applied, and no restart in the second session was made to pick up an edit. The start count did not fall (26 and 17), because the remaining restarts are for launch arguments, persistence checks, clean data, startup code, platform switches and replaying a journey from a fresh app; that is for the App MCP to address, not this skill.

Hook: the DevServer answers, not a reminder (3b25c7f, b9b0ab0)

The PostToolUse hook now runs uno-devserver app hot-reload-status --no-start --file <edited> --waitForMs 8000 (the app verbs from unoplatform/uno#25374) and tells the agent the verdict from the exit code:

  • 0 applied: additionalContext with the verdict line; assert with uno_app_find_elements, no build or restart.
  • 1 not applied: decision: block whose reason carries the DevServer text, including the compiler diagnostics.
  • 3 rude edit: additionalContext saying this is the one case for uno_app_close then uno_app_start.
  • Anything else (no uno-devserver on the PATH, no running host, host without the status tool): the previous reminder text, so Community and older App MCP setups behave as before.

It never starts a DevServer, finds the solution by walking up from the edited file, and checks app tools first so a host without the tool answers in under a second. hooks.json timeout 10 → 15 s.

Verified with the Debug CLI on real paths (other file types and files outside a solution print nothing; no host, and a host without the tool, print the reminder in under 1 s and never start a host) and with a stub CLI for exit 0, 1 and 3 (valid JSON, quotes, tabs and CRLF in the diagnostics escaped). The live applied/not applied/rude edit paths need an App MCP build with uno_app_hot_reload_status, which was not available on the machine.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SYer42kcr3PXtoro9RDXEL

@kazo0
kazo0 added this pull request to stack #187 October 12, 2026 11:09
@kazo0
kazo0 force-pushed the dev/steve/uno-testing-hot-reload-status branch from b9b0ab0 to 7d2b169 Compare October 12, 2026 11:20
@kazo0 kazo0 changed the title feat(uno-testing): confirm each edit with uno_app_hot_reload_status when the App MCP offers it feat(skills): uno-testing confirms each edit with uno_app_hot_reload_status when the App MCP offers it Oct 12, 2026
@kazo0
kazo0 force-pushed the dev/steve/uno-testing-hot-reload-status branch from 7d2b169 to 2db3bb2 Compare October 12, 2026 11:54
@kazo0
kazo0 force-pushed the dev/steve/uno-testing-hot-reload-status branch from 2db3bb2 to 856b66c Compare October 12, 2026 12:15
Base automatically changed from dev/steve/uno-testing-hot-reload to main October 12, 2026 12:18
kazo0 and others added 4 commits October 12, 2026 08:18
…status when the App MCP offers it

The App MCP from unoplatform/uno.app-mcp#187 makes uno_app_start wait until Hot Reload is ready and adds uno_app_hot_reload_status(file), which reports whether an edit was applied, with the compiler errors when not. The skill and the PostToolUse hook point at it when discovery lists it, and keep the 15 s clock rule as the fallback for App MCP versions without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SYer42kcr3PXtoro9RDXEL
…nd lets the status result decide when to start again

FieldCheck sessions on the branch with the previous rule still made 17 to 29 uno_app_start calls each:
the agent rebuilt and relaunched after batches of edits, restarted "to be safe" for a new class, an
MVUX member or an event handler, and on Android treated the missing uno_app_close as a reason to
start again; where it did ask uno_app_hot_reload_status, every edit was applied.

- Workflow step 8 is the edit loop: save, uno_app_hot_reload_status(file, waitForMs), back to the
  check; NOT applied carries the compiler diagnostics (no dotnet build); RudeEdit is the one signal
  for a start. Step 1 says the build and the start happen once per platform.
- The critical rule names the allowed reasons to start and says new classes, members, files, handlers
  and generated code go through Hot Reload first; Android without uno_app_close is not a reason.
- references/ui.md: the quick start loops through Hot Reload, the tool table lists
  uno_app_hot_reload_status, "Before rebuilding" asks whether a rebuild is needed at all.
- The PostToolUse hook says not to build, close or start for an edit, not to be safe either.
- uno-build-app verification.md: a fix needs neither a build nor a start.
- codex/uno-dev.toml synced with agents/uno-dev.agent.md (the repo check had failed since the
  automation-ids commit).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_017KfqeYY7rsu5aiXBNtzsDQ
…ther Hot Reload applied the edit

The hook runs `uno-devserver app hot-reload --no-start --file <edited>` and
reports the exit code to the agent: applied (assert), not applied (block
with the compiler diagnostics), rude edit (start again). It never starts
a DevServer, finds the solution by walking up from the edited file, and
keeps the former reminder when the CLI, a host, or the status tool is
missing, so Community and older App MCP setups behave as before.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NzKY9EQxsHN7uhcmPniyJZ
@kazo0
kazo0 force-pushed the dev/steve/uno-testing-hot-reload-status branch from 856b66c to 52d0dd5 Compare October 12, 2026 12:18
@kazo0
kazo0 merged commit c4d5265 into main Oct 12, 2026
4 checks passed
@kazo0
kazo0 deleted the dev/steve/uno-testing-hot-reload-status branch October 12, 2026 12:19
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