Skip to content

Commit 8cf8d4e

Browse files
Lykhoydaclaude
andauthored
fix(observe): thread projectRoot into per-action Run so the flow reaches the device (#351)
The observe Regression "Run" button failed instantly with NO_PROJECT_ROOT and never touched the simulator. The runAction wiring resolved the correct root for loadAction() but called runActionHandler() (cdp_run_action) without projectRoot, so it re-derived process.cwd() (the plugin repo) and couldn't find the action YAML. Thread the already-resolved root through. Verified e2e on the booted iPhone 17: the action now finds its YAML and runs maestro-runner on the device (reaches WDA/execution) instead of erroring before dispatch. Follow-up to #348 (same root-resolution family: list + suite). 2337/2337 tests pass; lint + format clean. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f592999 commit 8cf8d4e

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rn-dev-agent-cdp": patch
3+
---
4+
5+
Fix the observe Regression tab's per-action **Run** button doing nothing. The observe `runAction` wiring resolved the correct project root for `loadAction` but then called the inner `runActionHandler` (`cdp_run_action`) without passing `projectRoot`, so the runner re-derived it from `process.cwd()` (the plugin repo) and failed instantly with `NO_PROJECT_ROOT` before ever reaching the device. The resolved root is now threaded into `runActionHandler`, so a clicked action runs its Maestro flow on the connected app's project. (Follow-up to #348, which fixed the same root-resolution family for the actions list and suite.)

scripts/cdp-bridge/dist/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,7 @@ setObserveE2eDeps({
15511551
const result = await runActionHandler({
15521552
actionId,
15531553
params,
1554+
projectRoot: root,
15541555
platform: (getActiveSession()?.platform ?? 'ios'),
15551556
trigger: 'human',
15561557
});

scripts/cdp-bridge/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,7 @@ setObserveE2eDeps({
22632263
const result = await runActionHandler({
22642264
actionId,
22652265
params,
2266+
projectRoot: root,
22662267
platform: (getActiveSession()?.platform ?? 'ios') as 'ios' | 'android',
22672268
trigger: 'human',
22682269
});

0 commit comments

Comments
 (0)