Skip to content

fix(skills): uno-testing sizes the window from inside the app, keeps Hot Reload's applied as the verdict, saves screenshots without returning them - #201

Open
vatsashah45 wants to merge 2 commits into
mainfrom
dev/vatsa/uno-testing-cost
Open

vatsashah45 wants to merge 2 commits into
mainfrom
dev/vatsa/uno-testing-cost

Conversation

@vatsashah45

@vatsashah45 vatsashah45 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The uno-testing text changes only: the hook change is #202 (validated), and the restart rule is being enforced by a hook in a follow-up PR.

What changed

Four habits measured on nine skill-ab catalog sessions (six with the plugin, three with the Uno MCPs and no skills: unoplatform/private#1214, #1215, #1218), read from the claude-home transcripts, which carry the hook's notes that stream.jsonl drops. Numbers and sequences are in #200.

Habit Measured Change
External window resizer run before most screenshots 28–59 runs a session with the skills; 0–3 without (those agents sized the window from inside the app) New critical rule: read the size from a launch argument in OnLaunched, apply it with AppWindow.Resize (ResizeClient is not implemented in Uno), pass it through uno_app_start(args)
Restart right after the hook said applied 6–13 a session, a third of all launches The Hot Reload rule names those cases as applied and asks for startup checks to be proved with one restart after the related edits
Relaunching to catch a 4 s loading view that is gone before uno_app_start returns 5–17 --data=slow starts a session New critical rule: make the app hold the state when its own switch controls it, or batch the start with several saved screenshots in one message
Screenshots returned inline (returnImage: true or no path) against the save-to-file rule 50–84% of 42–90 screenshots a session The rule and references/ui.md now name returnImage and maxWidth; ui.md no longer says to omit path to inspect the image

skills/ mirrors the plugin copy; Test-Plugin.ps1 passes.

Validation, and what it says about this PR

Three catalog sessions on the branch (unoplatform/private#1220): two never loaded uno-testing (the baseline loaded it in five of six; the description is unchanged), and the one that did restarted after applied ten times, built a window-resizer tool and was the dearest of the nine sessions on this plugin. Same conclusion as unoplatform/private#1217 on dev/steve/uno-testing-loop: a rule in the skill text does not move the restart, and the resizer is written while building, before uno-testing loads. So this PR is the text that should be true, not a measured saving; the enforcement is the restart-guard hook PR, and the window-sizing rule may belong in uno-build-app.

Closes #200.

🤖 Generated with Claude Code

…Hot Reload's `applied` as the verdict, saves screenshots without returning them; the hook says nothing before the app exists

Measured on nine skill-ab catalog sessions (six with the plugin, three with the Uno MCPs alone;
unoplatform/private#1214, #1215, #1218), from the claude-home transcripts, which carry the hook's
notes:

- With the skills, agents wrote a UI Automation window resizer and ran it 28 to 59 times a session,
  once before most screenshots; without them, agents sized the window from inside the app through a
  launch argument (0 to 3 runs). The skill said nothing about window size. New rule: read the size
  from a launch argument in OnLaunched and apply it with AppWindow.Resize (ResizeClient is not
  implemented in Uno), passed through uno_app_start(args).
- 6 to 13 launches a session, a third of them, came right after the hook had said `applied`:
  "constructor changes need a fresh model instance", "a new dependency property can't be
  hot-reloaded", "restarting cleanly", and startup-theme checks done as one restart per edit. The
  rule now names those cases as `applied`, and asks for startup checks to be proved with one
  restart after the related edits.
- 5 to 17 starts a session relaunched `--data=slow` chasing a 4 s loading view that is gone before
  uno_app_start returns. New rule: make the app hold the state, or batch the start with several
  saved screenshots in one message.
- 50 to 84% of screenshots came back inline (returnImage: true, or no path) against the save-to-file
  rule; references/ui.md still said to omit path to inspect the image. The rule and the reference
  now name returnImage and maxWidth.
- The hook fired on 14 to 20 scaffolding edits before any app existed and injected a reminder each
  time, 32 to 59 notes and 4.5 to 8.4k persistent tokens a session. With the CLI present and no app
  connected it now prints nothing; the no-CLI reminder stays.

Closes #200.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@CLAassistant

CLAassistant commented Oct 20, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ vatsashah45
❌ vatsauno
You have signed the CLA already but the status is still pending? Let us recheck it.

@vatsashah45

Copy link
Copy Markdown
Contributor Author

Validated with three catalog sessions on this branch (9d3a740), same pins and machine as the six main@6869add sessions of unoplatform/private#1214 and #1215: unoplatform/private#1220.

The hook change holds. No session got a hook note before its first uno_app_start (the baseline got 11 to 17 each), and hook text in context fell to 3.2k–5.3k tokens from 4.5k–8.4k.

The skill text did not show. Two of the three sessions never invoked uno-testing (the baseline loaded it in five of six; the description is untouched here, so that is the trigger's variance), and the one that did restarted right after an applied verdict ten times (baseline 6–13), built a WindowCapture tool to resize the window (seven runs), returned 56% of its screenshots inline and cost $18.12, the most of the nine sessions on this plugin. Cost over the three: $11.98, $14.69, $18.12 against a baseline median of $14.70. One session is an environment outlier: desktop launches crashed inside the Vulkan driver and the agent turned Vulkan off to finish.

That matches unoplatform/private#1217's A/B of dev/steve/uno-testing-loop: the restart is decided from what the agent believes about Hot Reload, and a sentence in the skill does not move it. Two consequences for this PR:

  • Keep the hook commit (silence before the first start) on its own merit.
  • The restart rule needs enforcing, not stating: a PreToolUse hook that denies uno_app_restart (and uno_app_close followed by uno_app_start) unless the last verdict was RudeEdit/InternalError or the edit touched startup code, as #1217 proposes. The window-sizing rule belongs in uno-build-app or the uno_app_start result text: the one session that wrote a UI Automation resizer did it while building, before uno-testing could have loaded.

I can split the hook change out into its own PR and turn the rest into the PreToolUse hook if that is the direction you want.

@vatsashah45 vatsashah45 changed the title fix(skills): uno-testing stops per-screenshot resizing, restarts after applied and inline screenshots; the hook is silent before the app exists fix(skills): uno-testing sizes the window from inside the app, keeps Hot Reload's applied as the verdict, saves screenshots without returning them Oct 21, 2026
kazo0 added a commit that referenced this pull request Oct 21, 2026
…ll_into_view, sizes with uno_app_resize

The App MCP gains three things agents scripted from outside the app (unoplatform/uno.app-mcp#214):
find_elements' `until` (wait for a state in one call), uno_app_scroll_into_view (reach a list item,
loading further pages), and uno_app_resize / uno_app_start(windowSize) (client size in logical pixels).

- SKILL.md: step 1 passes windowSize; step 5 reaches off-screen list items with scroll_into_view; step 6
  adds `until` and says NOT met is the answer; the transient-state rule waits with until absent/visible;
  a window-size rule replaces startup code and scripts; an older App MCP falls back through availability.md.
- references/ui.md: the two tools, windowSize and until in the catalogue and parameter blocks.
- references/INTERACTION-PATTERNS.md: scrolling a list to an item; waits and loading states in one call.
- references/assertions.md: list counts and the wait patterns become one call each (replaces the
  snapshot-retry loops).
- references/availability.md: the fallbacks for an App MCP without them (today's Sdk pins).
- references/VISUAL-TREE-GUIDE.md: fresh handles from scroll_into_view, counts from {items=N}.

Conflicts in intent with #201's "Size the window from inside the app" rule, which becomes the fallback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01V9n3Hvt7p8mFxL7WAT2dBM

This branch has not been deployed

No deployments
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.

uno-testing: restarts after 'applied', per-screenshot external window resizing, hook reminders before the app exists, inline screenshots

3 participants