Skip to content

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

Open

Description

@vatsashah45

Summary

The uno-testing workflow is written as one step per turn (baseline, locate, act, wait and re-snapshot, assert), and the agent follows it that way: with the skills loaded it issues 1.7 tools per model call; with the Uno MCPs and no skills at all it batches 2.3. Over the same number of tool uses that is ~40% more model calls, each re-reading the whole conversation. On the catalog brief it is the larger part of what the skills cost; the skill text itself is 7% of context.

Evidence

skill-ab catalog scenario, no-skills arm catalog-20261020-093343 (unoplatform/private#1218: a plugin holding only plugin.json, so the Uno MCPs without skills, agents or hooks) against the with-skills arms catalog-20261019-225302 (unoplatform/private#1214) and catalog-20261020-034157 (unoplatform/private#1215). Same pins (App MCP 2.0.0-dev.15, Uno.Sdk 7.0.0-dev.81, studio main@6869add), Opus, three sessions each.

no skills (3) with skills (6)
cost, median $9.15 ($8.75–$14.00) $14.23 ($12.89–$22.38)
turns, median 391 494
harness checks all pass; recommended Uno stack fails 3/3 all pass, 6/6

One typical session a side (no-skills A2 against #1215 A2):

no skills with skills
model calls 163 230
tool uses 381 386
tools per model call 2.34 1.68
mean context per call 156k 180k
total context tokens 25.4M 41.3M
skill text in context – 13k (7%)
uno_discover_tools 11k (6%) 9k (4%)

MAUI's and Avalonia's agents sit at 1.5–1.7 tools per call (#1214, #1215), so with the skills Uno is no worse than the competitors; without them it is better. The restart and screenshot habits are the same with or without skills (16–30 launches a session without, 23–38 with), so they are not this issue; #199 and the App MCP issues cover them.

Two sessions a side on the tools-per-call ratio is a lead, not a proof; the cost and turn medians are on three and six.

Proposal

Rewrite the workflow section so that independent checks are issued together, without changing what is checked:

  • Baseline as one turn: uno_app_visualtree_snapshot and the path screenshot in the same message.
  • Locate several targets at once: when the next step needs more than one element, issue the find_elements calls together rather than one per turn.
  • Act, then wait in one turn where the tools allow it: peer_action followed by find_elements(waitForMs) on the expected result in the same message; once unoplatform/uno.app-mcp#211 lands, wait_for with the condition.
  • Assert the final-state checks (tree, text, DataContext, screenshot) together.
  • One critical rule that says it: "Issue independent calls in the same turn; one call per turn only when the next call needs this one's result (a fresh handle after a UI change)."

The harness's per-session tools per model call (in the per-run PRs) is the measure to re-run against after the change.

Related

Activity

  1. vatsashah45 commented on Oct 20, 2026

    @vatsashah45
    ContributorAuthor

    Correction. Looking at all nine catalog Uno sessions instead of the two in the table above, the tools-per-call gap does not hold up:

    with skills (6 sessions) without (3 sessions)
    tools per model call 1.68–2.42, median 1.95 1.60–2.34, median 2.13
    same, excluding pointer_click and get_screenshot 1.40–1.92 1.16–1.81

    The 1.68-vs-2.34 pair was the two extremes, and the 2.34 session is the one that issued seven scrollbar clicks per message (127 pointer_click). The step-by-step workflow does not serialize tool use, and batching independent checks would not recover the extra model calls. In both arms, 92% or more of the context tokens are spent after the first uno_app_start.

    Where the extra calls go with the skills loaded, on the same brief, read from the full claude-home transcripts (they carry the hook output; stream.jsonl drops it):

    • Restarts right after the hook said applied: 6–13 a session, about a third of all launches. Stated reasons: "constructor changes need a fresh model instance", "a new dependency property can't be hot-reloaded", "restarting cleanly to test from a fresh start", and startup-theme checks done as one restart per edit.
    • An external UI Automation window-resize tool, written in-session and run 28–59 times a session, once before most screenshots. The no-skills agents sized the window from inside the app with a launch argument instead (0–3 runs). The skill says nothing about window size, and its without-app-mcp.md is the only place UI Automation is mentioned.
    • The hot-reload hook fires on 14–20 scaffolding edits before any app exists, a reminder each time: 32–59 hook injections a session, 4.5–8.4k tokens that stay in context.
    • 50–84% of screenshots come back inline (returnImage: true or no path) despite the "save to file" rule; references/ui.md still says to omit path to inspect the image.

    Retitling this issue to those four; the skill and hook changes follow in a PR.

  2. changed the title [-]uno-testing: the step-by-step procedure serializes tool use (1.7 vs 2.3 tools/call)[/-] [+]uno-testing: restarts after 'applied', per-screenshot external window resizing, hook reminders before the app exists, inline screenshots[/+] on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions