Skip to content

Commit c418c1b

Browse files
t3dotggclaude
andcommitted
fix(contracts): preview_act keeps selector so selector-only actions keep their target
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent fe2b088 commit c418c1b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/server/src/mcp/McpHttpServer.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ it.effect("checks each preview_act action against that action's own input", () =
372372
});
373373
expect(click.isError).toBe(false);
374374
expect(inputs[0]).toEqual({ locator: "text=Send" });
375+
376+
yield* callTool("preview_act", { action: "type", selector: "#name", text: "Ada" });
377+
expect(inputs.at(-2)).toEqual({ selector: "#name", text: "Ada" });
375378
}),
376379
).pipe(Effect.provide(layerTest)),
377380
);

‎packages/contracts/src/previewAutomation.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ export const PreviewAutomationActInput = Schema.Struct({
438438
]),
439439
...PreviewAutomationTabTargetFields,
440440
locator: Schema.optional(Locator),
441+
selector: Schema.optional(LegacySelector),
441442
x: Schema.optional(Schema.Finite),
442443
y: Schema.optional(Schema.Finite),
443444
button: Schema.optional(Schema.Literals(["left", "right", "middle"])),

0 commit comments

Comments
 (0)