* refactor: migrate interaction + snapshot chains from test-only DI to vitest mocking
Remove ~25 DI parameters threaded through the interaction and snapshot
handler chains that existed solely for testability. Functions now import
their dependencies directly; tests use vi.mock to intercept them.
Interaction chain: dispatch, readAndroidScreenSize removed from
interaction.ts, interaction-touch.ts, interaction-common.ts,
interaction-read.ts, interaction-selector.ts, interaction-snapshot.ts,
interaction-get.ts, interaction-is.ts, interaction-scroll.ts, find.ts.
Snapshot chain: dispatchSnapshotCommand, runnerCommand,
sessionlessRunnerCleanup removed from snapshot.ts, snapshot-wait.ts,
snapshot-alert.ts, snapshot-capture.ts.
Old node:test files replaced with vitest equivalents using vi.mock.
Closes#282
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: align vitest interaction handler coverage
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: migrate leaf modules from test-only DI to vitest mocking
Drop optional DI parameters from 6 production modules that existed
solely as test seams. Replace with vi.mock() in new vitest test files.
Production files simplified:
- recording-telemetry.ts: remove writeTelemetry?
- find.ts: remove dispatch?, use dispatchCommand directly
- install-source.ts: remove entire deps? object (7 params)
- session-runtime-command.ts: remove clearRuntimeHints?
- android-system-dialog.ts: remove 4 DI params, simplify internals
- record-trace-recording.ts: remove writeRecordingTelemetry from deps
Closes#281
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: restore DI seams broken by premature removal, fix test script
- request-router.ts: remove 4 dead DI params (snapshotAndroidUi,
reopenAndroidApp, readAndroidAppState, execCommand) from
RequestRouterDeps since recoverAndroidBlockingSystemDialog no
longer accepts them
- session-runtime-command.ts: restore clearRuntimeHints? param that
handleSessionCommands threads through — removing it broke callers
that override the seam
- session.ts: restore clearRuntimeHints pass-through to runtime branch
- session.test.ts: restore the end-to-end runtime clear DI test
- package.json: include vitest in the default `test` script
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: rename *.vitest.test.ts → *.vitest.ts to avoid node:test collision
Node's default test discovery matches *.test.ts, which picked up vitest
files and crashed. Rename to *.vitest.ts so the two runners have disjoint
file sets without needing find-based exclusions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use vi.mocked().mock.calls instead of module-level mutable state
Replace manual clearCalls array with direct assertion on the mock,
consistent with the pattern used in request-router-android-modal.vitest.ts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add metadata-aware ad test runner
* test: migrate platform integrations to replay suites
* fix: stop macos runner during close
* fix: harden ad test runner
* fix: tighten ad test runner retries and reporting
* refactor: tighten replay test suite runtime
* test: cover replay suite helpers
* docs: trim replay test guidance in skill
* refactor: extract replay test cli helpers
* fix: improve large text surface discovery and reads
* chore: trim duplicated skill guidance
* fix: tighten large text read follow-ups
* fix: scope snapshot metadata and log read fallbacks
PR #248 refactored interaction.ts into a thin routing layer delegating
to focused command modules. PR #245 (gesture telemetry overlays)
unintentionally reverted get/is/scrollintoview back to inline
implementations due to a stale branch.
This restores the thin router from #248, adapted for #245's
handleTouchInteractionCommands, and removes interaction-press.ts and
interaction-fill.ts which were made dead code by #245's
interaction-touch.ts.