Repository navigation
Merge upstream v2.6.0 into tb-mods - #1
Merged
Merged
Conversation
* Show hierarchy and check-syntax commands in help Remove the hidden flag from hierarchy and check-syntax commands to make them visible in the maestro --help output. These are useful commands that users should be aware of. Changes: - PrintHierarchyCommand: Remove hidden = true - CheckSyntaxCommand: Remove hidden = true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: Add speed parameter support for Flutter web scrolling * Animated scroll for flutter. * removed console.logs * removed debugging code * removed not required code. * in-progress working on comments * feat: Add coordinate-based swipe support for Flutter web Refactored smooth scroll implementation to support both direction-based and coordinate-based scrolling for Flutter web apps. The swipe(start, end) method now correctly converts touch coordinates to wheel events for Flutter. Changes: - Add smoothScrollFlutterByDelta() for explicit delta values - Update swipe() to detect Flutter and dispatch wheel events - Keep smoothScrollFlutter() as a wrapper for direction-based scrolling
* added tags & properties in - html report - junit report * fix: id if flow name has spaces
…inc#2970) * fix ansi not printing complex sub flows * pr fix * pr fix * pr fix * add ut
fix: timeouts creating errors in compilation
* Bump datafaker to v2.5.3 * Bump graaljs to 24.2.0 (This is minor. I didn't want to tackle v25) * Bump log4j to v2.25.3 * Bump selenium to 4.40.0
…onName predictable (mobile-dev-inc#3005) * Fix e2e tests following changes in demo_app * Make inputRandomPersonName predicatable Right now it firstname and lastname, possibly preceded by a prefix and possibly followed by a suffix. I don't think that's the right behaviour for reliable tests. This solves that predictability that our e2e was expecting.
* Add web support for clearState * Tidy tests --------- Co-authored-by: Dan Caseley <dan@mobile.dev>
…ile-dev-inc#3034) make assertScreenshot work without specifying the extension
* feat: added deviceLocale and depreciated localeutils * feat: added devicelocale and used that * removed duplicate platform * update code to use new device configurations * added deviceCatalogtest * depreciate locale test * fix platform import * fix test * fix: added cloud devices from response * added sealed MaestroDeviceConfiguration * add more fields to DeviceConfiguration * fix: device catalog device * fix: tests * added web device launch * moved platform inside resolve and avoided try/catch * fix: pick recommended device to take defaults directly * improved device list response. * fix device catalog test * use api for device * feat: added deviceLocale and depreciated localeutils * feat: added devicelocale and used that * removed duplicate platform * update code to use new device configurations * added deviceCatalogtest * depreciate locale test * fix platform import * fix test * fix: added cloud devices from response * added sealed MaestroDeviceConfiguration * add more fields to DeviceConfiguration * fix: device catalog device * fix: tests * added web device launch * moved platform inside resolve and avoided try/catch * fix: pick recommended device to take defaults directly * improved device list response. * fix device catalog test * use api for device * fix: added new flags to device start, and depreaciated --os-version * removed the default list * fix test * reverted os flag discription * fix: added deviceConfiguration to available device * moved orientation and locale inside device * change type name * removed locale utils test * fix tests * moved getMacOSArchitecture to client * fix: added image test + handled CPU_Architecture enum differently * monor fix
mobile-dev-inc#3050) feat: make all options for resolve to be passed explisitly + added os version
…nc#3055) * typed request in devicecatalog.resolve * fix: devicespec type
* Route xctest runner logs into the per-run debug output Each iOS xctest log producer (XCRunnerCLIUtils.runXcTestWithoutBuild, LocalSimulatorUtils.launchUITestRunner, LocalIOSDeviceController.launchRunner) now takes the destination directory as an explicit parameter at the call site. LocalXCTestInstaller threads a required logsDir field through to all three producers, and MaestroSessionManager points the installer at <run-debug-dir>/xctest_runner_logs/ so the runner log lands inside the same per-run bundle as commands.json, screenshots, and maestro.log. Drops the static XCRunnerCLIUtils.logDirectory singleton, its AppDirsFactory-backed rotation, and the unused clearLogs() method. Consumers own the path and its lifecycle now -- the existing TestDebugReporter.deleteOldFiles sweep already covers the new location. * ci: drop redundant xctest_runner_logs artifact uploads The xctest runner log now lands in ~/.maestro/tests/<run>/xctest_runner_logs/ as part of the per-run debug output, which is already uploaded under the maestro-root-dir-ios artifact (path: ~/.maestro). The dedicated steps that re-uploaded ~/Library/Logs/maestro/xctest_runner_logs are no longer needed. Leaves the disabled test-ios-xctest-runner job's upload alone -- that job runs the runner directly via test-maestro-ios-runner.sh, not through LocalXCTestInstaller, so its log path is unrelated to this change. * Place xctest runner log at the run-dir root Hand the run debug directory directly to LocalXCTestInstaller so the xctest_runner_<date>.log file lands alongside maestro.log, commands-*.json, and screenshots, instead of in a nested xctest_runner_logs/ subdirectory. * ci: read xctest log from per-run debug output in preflight verifier The script globbed ~/Library/Logs/maestro/xctest_runner_logs/*.log, which is empty now that the iOS driver writes its log into the per-run debug-output dir (~/.maestro/tests/<run>/xctest_runner_*.log). Update the glob to walk the new tree (honoring XDG_STATE_HOME, matching EnvUtils.xdgStateHome) and fail with a clear message if no log matched.
…le-dev-inc#3264) * fix(env): fail fast with helpful message when env value is null A YAML entry like `KEY:` (no value) deserializes to null inside Map<String, String> via Kotlin generic erasure and later crashes DefineVariablesCommand.evaluateScripts with an opaque Kotlin null-intrinsics error. Validate at withEnv and surface the offending key(s) instead. * fix(env): surface bad key name in parser error summary Use a typed EnvVariableMissingValueError so MaestroFlowParser.wrapException can render "Environment variable has no value: KEY at file:line:col" instead of the generic "Parsing Failed" summary.
…ed (mobile-dev-inc#3262) warn when deprecated --android-api-level/--ios-version are used Print a runtime warning pointing users to --device-os when either flag is passed to maestro cloud. Previously the flags were marked deprecated and hidden from help, but used silently with no feedback.
… tracking (mobile-dev-inc#3138) feat: enable parallel iOS simulator execution iOS simulators share the host's localhost, causing port collisions when multiple Maestro processes target different sims simultaneously. Session tracking was per-platform, so two processes on different devices would interfere with each other's sessions. Changes: - Per-device session tracking: SessionStore keys are now "{platform}_{deviceId}_{sessionId}" instead of "{platform}_{sessionId}" - Add --driver-host-port CLI flag for explicit XCTest server port - Auto-select available ports with isPortAvailable() check - Refactor SessionStore from singleton to injectable class (DI) - Add shouldCloseSession(platform, deviceId) for per-device shutdown instead of global activeSessions().isEmpty() - Add cross-process file locking to KeyValueStore (~/.maestro/sessions) - Append PID to debug log directory to prevent parallel race - Enable useJUnitPlatform() in maestro-cli (was missing) - Add SessionStoreTest with 8 tests covering isolation and lifecycle Verified: 3 iOS simulators + Android emulator running simultaneously, all passing. Both --driver-host-port (explicit) and auto-port-selection work correctly. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Proksh Luthra <35415752+proksh@users.noreply.github.com>
…-dev-inc#3235) * feat: make JUnit XML id and classname attributes configurable Add optional `id` and `classname` keys to the flow YAML config section. When present, they override the corresponding JUnit XML <testcase> attributes; when omitted, behavior is unchanged (all default to flow name). Closes mobile-dev-inc#3151 * refactor: move id/classname into properties as junitId/junitClassname JUnit-specific test case attributes (id, classname) are now configured via the existing properties map instead of top-level config fields. This avoids confusing users of HTML reports with JUnit-only concepts and makes the purpose of these values explicit through naming. Properties values are now script-evaluated, enabling ${...} expressions. The JUnit reporter extracts junitId/junitClassname for XML attributes and filters them from <property> elements to avoid redundancy. --------- Co-authored-by: Balint Dezsi <balint.dezsi@sap.com> Co-authored-by: Dan Caseley <dan@mobile.dev>
…state (mobile-dev-inc#3283) The maestro-driver-ios.zip and maestro-driver-iosUITests-Runner.zip under driver-iPhoneSimulator/Debug-iphonesimulator/ were rebuilt and committed unintentionally as part of mobile-dev-inc#3138 (db366b0). That PR's logic changes don't require updated driver binaries, so restoring the zips to their previous content. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add links to Maestro Cloud run and App binary ID to HTML report. * Restrict cloud footer metadata to cloud reports Remove cloud metadata merging from local `maestro test` summary aggregation and only render the HTML footer when a cloud upload URL is present. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Dan Caseley <dan@mobile.dev>
Signed-off-by: Ash Wu <hsatac@gmail.com>
* Make hierarchy command JSON only * Backpeddle on `--output` - its not needed * Revert change to PickDeviceView - it's overkill and no longer used * Don't duplicate options. Fix this later.
* MCP visualizer Browser-based visualizer for MCP-driven sessions: a session-aware McpVisualizerDriver wraps the underlying driver and streams screen state, commands, and run progress to a Ktor server. The Vite React UI renders the device, command log, and hardware controls, and forwards touch/key/button input back to the simulator. Includes mock-backend support for offline UI iteration. * Address PR review on MCP visualizer - Make /api/device/input an opaque proxy to simulator-server's stdin so the server doesn't need to know the protocol grammar; reject newlines and oversize bodies. The TS client owns the format. - Reject /api/* requests whose Sec-Fetch-Site isn't same-origin/none/ absent so a drive-by browser page can't silently drive the simulator via no-cors fetches against 127.0.0.1. - Coalesce concurrent DeviceStream.start() callers behind a Mutex so the SSE MaestroConnected handler and POST /api/device/start don't spawn duplicate simulator-servers. A separate input Mutex serializes stdin writes; a JVM shutdown hook is the safety net for any process that escapes a start/close race. - Fire the visualizer-link hint only on the first tool response of a session instead of every response, to avoid bloating outputs and fighting the agent's task.
… UNAVAILABLE (mobile-dev-inc#3290) The Android driver opens an in-process gRPC channel against the maestro-driver app on the device. Today the channel has no retry policy, so a transient "No route to host" or stream-reset on the pod-local network bubbles up as a StatusRuntimeException and fails the entire job — the backend then re-queues the run on a different worker, costing ~30-60s per occurrence. Empirical 14d sample from production worker logs: 109 INFRA_ERRORs from StatusRuntimeException on this channel, 85% of them in callViewHierarchy (an idempotent read). Enabling channel-level retry with a bounded service config covers all calls on the channel without per-callsite changes: - Transparent retries fire automatically when the RPC never reached the server (e.g. couldn't open the connection). Safe even for non-idempotent calls because the server never saw the request. - Configured retries fire on UNAVAILABLE returned by the server, bounded by maxAttempts=4 with 0.5s→2s exponential backoff. If retries are exhausted, behaviour matches today: the StatusRuntimeException bubbles up and the existing INFRA_ERROR classification re-queues the job. Tests use an in-process gRPC server to verify the policy fires for UNAVAILABLE, stops at maxAttempts, and leaves non-retryable codes alone.
…bled for XCTest (mobile-dev-inc#3291) feat(http-client): opt-in retry on transient 5xx and IOException Wires an OkHttp application interceptor into HttpClient.build that retries calls on transport-level IOException or HTTP 5xx responses, up to a bounded maxAttempts with exponential backoff. 4xx responses pass through unchanged because they are deterministic client errors. Enabled for XCTestDriverClient by default: empirical 14d sample from production worker logs shows 117 INFRA_ERRORs from XCUITestServerError (5xx with "kAXErrorInvalidUIElement" and similar transient state from the XCTest runner while the UI is updating). With retry on the HTTP client, the rest of the runner observes a single logical call and the job no longer needs to be re-queued on a different worker just to absorb a transient hiccup. If retries are exhausted, the last response or IOException is surfaced unchanged, so existing classification (AppCrash, OperationTimeout, UnknownFailure → INFRA_ERROR) still fires as a safety net. Retry events are recorded on the existing `http.client.retries` micrometer counter (kind=http_5xx or exception class name) so we can observe how often the new path is firing post-deploy. Other callers of HttpClient.build default to retryOnTransientFailure = false to keep behaviour identical for them. Test plan: - New TransientFailureRetryInterceptorTest covers: 5xx-then-200 succeeds, 5xx exhausts at maxAttempts, 4xx is not retried, IOException retries bounded, IOException recovers if next attempt succeeds, retry disabled is no-op, 2xx makes exactly one call. - Updated XCTestDriverClientTest's AppCrash parameterized case to enqueue three 500 responses (matches the new default maxAttempts) so the classification assertion still passes.
…obile-dev-inc#3284) fix(web): catch Throwable around DevTools setup so CDP service errors don't escape WebDriver.open() wrapped the optional DevTools setup in `catch (e: Exception)`, but Selenium's CDP version-selection throws `ServiceConfigurationError` (a subclass of `Error`, not `Exception`) when no matching `CdpInfo` provider is on the classpath. The error escaped and surfaced as an INFRA_ERROR on the worker side. Widen the catch to `Throwable` — the block already documents that any failure here should be swallowed because DevTools support is optional.
…le-dev-inc#3278) * fix(orchestra): consistent sourceDescription for runScript runScript previously stored the resolved absolute script path in sourceDescription, while runFlow / retry store the literal YAML `file:` field. The path was doing double duty: display label and the anchor GraalJsEngine.setCurrentScriptDir uses to resolve relative file lookups (e.g. multipartForm filePath). That made the user-facing description drift with the workspace root (`Run /var/folders/.../workspace.../foo.js` when YAML is read from an extracted temp dir, vs `Run /foo.js` from a zip filesystem). Split the two concerns: - RunScriptCommand gains scriptDir (absolute parent of the script, populated by YamlFluentCommand). The JS engine uses it directly to anchor relative file lookups; sourceName / sourceDescription is no longer derived from a path. - sourceDescription now mirrors runScript.file (the literal YAML field), matching runFlow and retry. originalDescription is plain "Run $sourceDescription", same shape as the other two. scriptDir defaults to null so commands assembled outside the YAML parser keep working, and FAIL_ON_UNKNOWN_PROPERTIES=false absorbs the new field across rolling deploys. * fix(orchestra): consistent sourceDescription for runScript runScript previously stored the resolved absolute script path in sourceDescription, while runFlow / retry store the literal YAML `file:` field. The path was doing double duty: display label and the anchor GraalJsEngine.setCurrentScriptDir uses to resolve relative file lookups (e.g. multipartForm filePath). That made the user-facing description drift with the workspace root (`Run /var/folders/.../workspace.../foo.js` when YAML is read from an extracted temp dir, vs `Run /foo.js` from a zip filesystem). Split the two concerns: - RunScriptCommand gains scriptDir (absolute parent of the script, populated by YamlFluentCommand). The JS engine uses it directly to anchor relative file lookups; sourceName / sourceDescription is no longer derived from a path. - sourceDescription now mirrors runScript.file (the literal YAML field), matching runFlow and retry. originalDescription is plain "Run $sourceDescription", same shape as the other two. scriptDir defaults to null so commands assembled outside the YAML parser keep working, and FAIL_ON_UNKNOWN_PROPERTIES=false absorbs the new field across rolling deploys. * updated comment
…-dev-inc#3285) * chore(deps): bump selenium to 4.43.0 and CDP bindings to v145 Selenium 4.40.0 bundled CDP support up to Chrome 144, so any worker on Chrome 145+ failed to load a matching CdpInfo provider and threw ServiceConfigurationError at DevTools setup. Selenium 4.43.0 bundles v145/v146/v147 CDP bindings, restoring support for current Chrome stable. - libs.versions.toml: selenium + selenium-devtools → 4.43.0, artifact suffix v142 → v145 (the lowest version bundled by 4.43.0). - Updated three import sites (WebDriver, CdpWebDriver, WebScreenRecorder) from v144 to v145 packages. Companion to mobile-dev-inc#3284 (which makes the unmatched-provider case non-fatal going forward). * chore(deps): bump CDP bindings to v147 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…obile-dev-inc#3275) * CI: Fix gradle config to prevent android sentinel failures or iOS dependency failures * Add CI job to test building on all 3 OSes, and test version output Disable Maestro CLI analytics to not pollute the test Fix Windows path setting in GHA Merge e2e testing together Make CLI tests local-first * Extra test, improved usage and formatting * Fix Windows tests that output to stderr * Additional tests, deal with ANSI in bash
…#3297) * fix(mcp-visualizer): support physical Android devices The visualizer always launched simulator-server with the `android` subcommand (emulator-only), which panicked on physical Android serials with "emulator with id <serial> should be running". And even with the right subcommand it could not find its screen-sharing agent resources because installSimulatorServer only unpacked the binary, not its sibling `resources/` tree. - Plumb a typed StreamDeviceType (android | android_device | ios) through DeviceStreamTarget, MaestroConnected, and McpMaestroSession so the launch site picks the correct subcommand based on Device.DeviceType at the source. Browser carries the field opaquely in /api/device/start. Invalid combinations (BROWSER, real iOS) are unrepresentable. - Unpack the entire deps/simulator-server/<platform>/ classpath subtree into ~/.maestro/deps/ via a new Unpacker.unpackTree, so screen-sharing-agent.jar + per-ABI .so files land next to the binary. Uses NIO FileSystems.newFileSystem to share one walker across jar and filesystem resources. Verifies all declared executableEntries were present so missing-binary packaging bugs fail loudly. * chore(deps): bump simulator-server to f4b4f058 Required by the visualizer fix above: this release adds the `android_device` subcommand for physical Android and ships the screen-sharing-agent.jar + per-ABI .so files alongside the binary. * fix(mcp-visualizer): flush SSE headers on stream open Ktor 2.3.x's respondBytesWriter buffers the response until the first write. /api/events/stream has no initial payload, so the browser sees ERR_EMPTY_RESPONSE on the EventSource and never reconnects, hiding the entire command log and tap-animation pipeline. The bug has been latent since the visualizer was introduced in mobile-dev-inc#3288 — exposed now that physical Android lets us exercise the events path. Write an SSE comment line on stream open — the standard pattern to flush headers without producing a data event the client will misinterpret. * refactor(mcp): consolidate stream-device-type mapping in createSession Per pedro18x review: the EMULATOR/REAL→ANDROID/ANDROID_DEVICE mapping lived in two places (createAndroidSession and StreamDeviceType.forConnected) and could drift if a new DeviceType lands in one without the other. Resolve the stream type once at createSession's entry, bail with a clear unsupported message if forConnected returns null, and pass the resolved value into the per-platform builders. forConnected becomes the sole authority. The "real iOS unsupported" check is now subsumed by the same null branch.
* Fix web date input text entry * Add web date input e2e flow --------- Co-authored-by: Leonardo Viveiros <leo@wooshair.com> Co-authored-by: Dan Caseley <dan@mobile.dev>
…bile-dev-inc#3300) * fix(android-webview): preserve hostname in DummyDns so devtools augmentation works `androidWebViewHierarchy: devtools` was silently returning empty webview hierarchies. OkHttp resolves the request URL via DummyDns, then builds `InetSocketAddress(InetAddress, port)` from the result. That constructor copies `addr.getHostName()` into the holder — for `getLoopbackAddress()` this is "localhost", erasing the webview socket name. `AdbSocket.connect()` then reads `endpoint.hostString` and calls `dadb.open("localabstract:localhost")` instead of the real `localabstract:webview_devtools_remote_*`. The IOException is swallowed by the catch blocks in `getWebViewInfos`/`getWebViewTreeNodes`, so the hierarchy is never augmented and webview-only elements can't be found. Switch DummyDns to `InetAddress.getByAddress(hostname, loopback bytes)` so the original hostname round-trips through to `endpoint.hostString`. Regression in mobile-dev-inc#3171 (Apr 14) — the prior `.dadb(dadb)` HTTP client routed `localabstract.<socket>.adb` hosts via its own resolver, which preserved the socket name; the new SocketFactory + DummyDns pair did not. Adds a unit test that exercises the OkHttp address-constructor path. * fix: added e2e test
…bile-dev-inc#3299) * chore(cli): remove bundled Maestro Studio in favor of desktop app The `studio` command no longer launches the bundled web Studio. It now prints a notice with the OS-appropriate download link for the Maestro Studio desktop app (.dmg / .exe / .AppImage). The `:maestro-studio:server` Gradle dependency is dropped from the CLI so the Studio server is no longer shipped inside the CLI artifact. The deprecation message in `query` is updated to point users at the same download links. * chore: delete maestro-studio module Follow-up to 3f9ba8f, which removed the CLI's bundled Studio. The :maestro-studio:server and :maestro-studio:web Gradle modules are no longer referenced by any build target, so drop the directory along with the orphan settings.gradle.kts includes and the module table entry in CONTRIBUTING.md.
…dev-inc#3298) * refactor(mcp-visualizer): extract McpVisualizerOrchestra factory Move the Orchestra-with-visualizer-callbacks wiring out of RunTool into its own file so the run path stays focused on flow execution. * refactor(mcp-visualizer): use identity-keyed command IDs Switch callIds from `$flowId:$index` to a process-scoped counter keyed by MaestroCommand instance identity. This lets pending and runtime events upsert into the same visualizer row by sharing a callId for the same command reference — groundwork for publishing the full set of commands as pending up front before execution begins. * feat(mcp-visualizer): show pending commands up front via flow snapshots Replace the per-command event stream with a `maestro.flow_state` snapshot of the full command list, published on every change. The backend seeds every top-level command with a `pending` status at `onFlowStart` so the visualizer can render the whole flow before execution begins, then re-publishes a fresh snapshot on each status transition. If the flow aborts (onCommandFailed rethrows), trailing pending rows are swept to `skipped` so they don't sit unresolved. The frontend becomes a pure projection: a single reducer merges incoming snapshots into its row map by commandId, with prior runs' rows preserved automatically because their commandIds never reappear in later snapshots. * refactor(mcp-visualizer): move nested-command rendering decision to frontend Backend now publishes every command in the tree — top-level and nested — with a depth field, instead of filtering nested ones via a depth-stack in onCommandStart/Complete. Seeding walks CompositeCommand.subCommands() recursively at flow start. Status callbacks just flip statuses by identity; no more outer-only gating. Frontend filters to depth === 0 at render time, so behavior is identical to before: only top-level commands appear, each treated atomically. Future nested-rendering work (indent, collapsible tree, etc.) lives entirely in the frontend. * chore(mcp-visualizer): add design sandbox at /?demo Extract a VisualizerLayout component (commands panel + device pane, including bg-tint and ring driven by row statuses) so both the live App and a static demo can render the same chrome with their own data. The demo lives in src/demo.tsx and is loaded dynamically only when `import.meta.env.DEV && ?demo` is set, so prod builds drop it via dead-code elimination. Visit http://127.0.0.1:5173/?demo (after `npm run dev`) to iterate on panel rendering against a fixed set of rows covering every status. To remove the sandbox, delete src/demo.tsx and the dev-only branch at the bottom of main.tsx. * feat(mcp-visualizer): dark mode via prefers-color-scheme Add `dark:` Tailwind variants throughout the visualizer panel, device frame, no-stream card, and hardware rail. Tailwind v4's `dark:` variant follows `prefers-color-scheme`, which the browser ties to the OS color preference. Note: this is OS-preference-based, not IDE-theme-based. VS Code/Cursor Simple Browser does not pass IDE theme through to embedded pages — that's only available to first-party extension webviews via `vscode-light`/`vscode-dark` body classes and `var(--vscode-*)` CSS variables. For users who sync OS and IDE themes (the common case), the visualizer effectively follows the IDE; for others it will track the OS preference. * chore(mcp-visualizer): add @types/react and @types/react-dom * style(mcp-visualizer): float command panel and redesign row visuals Panel sits as a floating, translucent card centered next to the device pane and stretches to the device's height. Rows render with circle status icons (glyph inside), a faint vertical connector tinted by status, and a polished sky highlight for the running row. * fix(mcp-visualizer): publish SSE events on a single-threaded dispatcher Snapshot updates fan out through scope.launch on Dispatchers.IO, which lets two rapid publishes run on different threads and reach the SSE client's write mutex out of order. The frontend's snapshot merge is a blind overwrite by commandId, so an older snapshot arriving last regresses statuses (PENDING flickers in after STARTED, etc.). Route event delivery through Dispatchers.IO.limitedParallelism(1) so snapshots are written in submission order. Split deviceStream.start off to its own launch on the unconstrained scope so its 30s blocking call doesn't head-of-line block subsequent snapshots. * feat(mcp-visualizer): syntax highlight YAML rows and quiet the scrollbar YAML in each command row now renders with light syntax coloring (indigo keys, emerald strings, violet numbers, muted punctuation). Falls back to plain text when the line doesn't match the expected key:value shape. Also pins the list scrollbar to a low-opacity neutral across default, hover, and active states so the browser can't swap it for the system highlight color. * style(mcp-visualizer): make running row read at a glance Opaque sky background (sky-200 light, sky-900 dark) with a thick ring and saturated shadow halo so the active command is unmistakable. Skip the connector line inside the running row body — it would otherwise draw a thin pending-colored stripe across the highlight — but keep the short segment in the gap below so the flow is still visually linked. * fix(mcp-visualizer): scroll the running command into view, not the list bottom Pending rows now extend past the running one (seeded up front via the flow snapshot), so scrolling to scrollHeight buried what's actually executing. Use findLast to locate the running row and scrollIntoView with block: nearest so the panel only moves when needed. * style(mcp-visualizer): tone down running glow and refine YAML typography Light-mode running row uses a softer shadow, YAML keys render semibold while values render light for clearer hierarchy, and the device ring uses brighter sky-500 in light mode. * style(mcp-visualizer): self-host Inter and JetBrains Mono via fontsource Drops the dependency on whatever fonts the host happens to ship so the visualizer looks the same on macOS, Linux, and Windows. * fix(mcp-visualizer): render optional-missing commands as skipped, not warned Orchestra reports an optional command whose target isn't on screen as WARNED, but to the user that's an expected miss, not a problem worth an amber exclamation. Map it to SKIPPED so it reads as a quiet dash. * style(mcp-visualizer): let the command panel grow with the viewport The command panel was pinned to 320px regardless of available space. Now it grows via flex-1 up to a 64rem group cap, keeps a 320px floor so it doesn't collapse on narrow screens, and the [panel + device] group stays centered (including when the panel is collapsed to its icon strip). * style(mcp-visualizer): add a bit of breathing room on the command panel's left edge * chore(mcp-visualizer): bump react and react-dom to 19 to match @types The package was pinned to react@^18.3 while the type packages were already on @types/react@^19, which would bite anyone running tsc even though vite build skips type-checking. Aligning runtime with the types is the safer direction since 19 is current.
mobile-dev-inc#3301) * refactor(mcp-viewer): rename MCP Visualizer to Maestro Viewer Renames the mcp-visualizer module, Kotlin package, classes, CLI flags (--no-viewer, --viewer-port), and stderr ready marker. User-facing strings now refer to "Maestro Viewer". * feat(mcp-viewer): add open_maestro_viewer tool Exposes the running Maestro Viewer URL to MCP agents. The response tells the agent to surface the URL to the user rather than shelling out to a launcher, since most host environments (Claude Code, Cursor, Codex) have a preferred embedded preview surface. * test(mcp): cover open_maestro_viewer in MCP tool tests Adds open_maestro_viewer to expected_tool_list so run_mcp_tool_tests.sh no longer fails its discovery check, and asserts the isError path by running the MCP server with --no-viewer.
…inc#3179) * fix: throw correct test error in case of invalid timeout * fix: updated all timeout to use parseTimeoutMs and added test * updated error message for non number timeout
…mobile-dev-inc#3303) * feat(analytics): attach sanitized commandStringUsed to PostHog events Adds a CommandArgsSanitizer that produces a redacted representation of the CLI invocation (sensitive flag values replaced with <REDACTED>, positional file paths dropped) and exposes it as a super-property on the Analytics singleton. The merge in convertEventToEventData attaches it to every event the CLI emits, so future flag-level deprecation questions become a PostHog query instead of per-flag instrumentation. Sensitive flags: --api-key/--apiKey, -e/--env, --name, --app-binary-id/--appBinaryId. Both alias casings included. * feat(analytics): narrow sanitizer to credential-only redaction Drop --name and --app-binary-id/--appBinaryId from SENSITIVE_FLAGS. Neither is a credential: --app-binary-id is an opaque server-generated ID (and is already sent explicitly as the app_binary_id event property where needed), and --name is a human-readable upload label. The sanitizer now only redacts actual secrets (--api-key/--apiKey and -e/--env).
…3305) Vision models reject images whose longest side exceeds 2000px, which breaks the take_screenshot MCP tool mid-session. Downscale screenshots with bicubic resampling so the longest side stays within that limit, encode JPEG at 0.9 quality, guard against decode failures, and surface the exception type in error messages. The 2000px cap is a hardcoded constant rather than a tool parameter: vision models share the same limit and the calling agent has no signal to vary it per call. Fixes mobile-dev-inc#2952
…ransient UNAVAILABLE (mobile-dev-inc#3290)" (mobile-dev-inc#3311) This reverts commit 3e17f7c.
…ion, enabled for XCTest (mobile-dev-inc#3291)" (mobile-dev-inc#3312) This reverts commit a71e5b5.
* chore: prepare release 2.6.0 * chore: add screenshot downscale entry to 2.6.0 changelog * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Update CHANGELOG.md Co-authored-by: Dan Caseley <dan@mobile.dev> * Fix formatting error that Dan introduced! --------- Co-authored-by: Dan Caseley <dan@mobile.dev>
Reconciles tb-mods with mobile-dev-inc/Maestro v2.6.0. Conflict resolution notes: - gradle.properties / maestro-cli/gradle.properties: bumped to 2.6.0-tb to follow the established -tb suffix convention. - maestro-client/.../maestro-app.apk: took upstream's apk; we never modified the maestro-android sources so the upstream-built artifact is authoritative. - XCTestDriverClient.kt: combined upstream's transportCall() wrapping for socket timeouts with our existing XCTest request/response info logging. Our AppNotRunning vs AppCrash split in processResponse is preserved. - ScreenSizeHelper.swift: kept upstream's effectiveWidth/effectiveHeight for landscape-aware physicalScreenSize handling AND our defensive branches for .faceUp/.faceDown/.unknown/@unknown default (avoids fatalError when device is flat). - SetPermissionsRequest.swift: switched to importing PermissionValue from MaestroDriverLib instead of redefining it locally. Extended the upstream enum (in MaestroDriverLib/Models/PermissionValue.swift) with our location-specific (.always/.inuse/.never) and photos-specific (.limited) cases. - SystemPermissionHelper.swift: kept all 16 of our XCUIElement-based permission dialog handlers (permissionDialogs table, handleInterruption, autoAllowPermissions, fallback alert/sheet/static-text matching) and adopted upstream's new (appHierarchy: AXElement, foregroundApp:) async signature. Upstream's PermissionButtonFinder is wired as a defensive last-resort fallback for notifications. iOS physical-device runner zips under driver-iphoneos/ kept (re-signed versions). The iOS XCTest runner must be rebuilt and re-signed for the upstream Swift changes (PermissionButtonFinder integration, transport fixes) to take effect on device. See maestro-ios/README.md and resign-maestro-ios-runner.sh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Resyncs
tb-modswithmobile-dev-inc/Maestrov2.6.0 (151 upstream commits, 672 files, ~28k/34k lines). Adopts the newMaestroDriverLibSwift package andPermissionButtonFinderarchitecture while keeping all 12 fork-specific iOS / TestingBot mods intact.Baseline snapshot for rollback: tag
tb-mods-pre-v2.6.0-merge.Conflict resolutions
gradle.properties,maestro-cli/gradle.properties2.6.0-tb(kept the-tbsuffix pattern)maestro-client/.../maestro-app.apkmaestro-androidsources, so upstream's artifact is authoritativeXCTestDriverClient.kttransportCall()socket-timeout latching with our XCTest request/response info logging. OurAppNotRunningvsAppCrashsplit is preserved (Errors.ktalready had both types)ScreenSizeHelper.swifteffectiveWidth/effectiveHeightlandscape-aware dimension handling AND our defensive.faceUp/.faceDown/.unknown/@unknown defaultbranches (avoidsfatalErrorwhen device is flat)SetPermissionsRequest.swiftimport MaestroDriverLib'sPermissionValue(removed the local enum)MaestroDriverLib/.../PermissionValue.swift.always,.inuse,.never) and photos-specific (.limited) casesSystemPermissionHelper.swiftpermissionDialogstable,handleInterruption,autoAllowPermissions, alert/sheet/static-text matching). Adopted upstream's new(appHierarchy: AXElement, foregroundApp:) asyncsignature. Upstream'sPermissionButtonFinderis wired as a defensive last-resort fallback for notificationsFiles NOT touched by the merge (intentional)
driver-iphoneos/— kept the re-signed versions (upstream did not touch this path since fork point)tb-modsparent of the mergeCLAUDE.md,maestro-ios/README.md— fork-only files, keptAction required before deploying
The iOS XCTest runner zips at
driver-iphoneos/reflect our pre-merge Swift code. For upstream'sPermissionButtonFinder,transportCall, andMaestroDriverLibchanges to take effect on physical devices, the runner must be rebuilt and re-signed:Then deploy the new
~/.maestro/maestro-iphoneos-driver-build.zipto test machines.Test plan
./gradlew compileKotlin— passes./gradlew test— note: 5XCTestDriverClientTesttests fail withBindExceptionon port 22087 due to a pre-existing upstream issue with hardcoded test ports (reproduces on a clean v2.6.0 test file)build-maestro-ios-runner.shresign-maestro-ios-runner.sh--driver-host-portparallel-execution path still works (custom session-manager logic)PermissionValuecases)Rollback
If anything goes wrong:
git reset --hard tb-mods-pre-v2.6.0-mergeCo-Authored-By: Claude Opus 4.7 (1M context)