Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(preview): make in-app browser automation work on real app pages #7127

Closedgb1095(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/7127/headopened View on GitHub

Showing 18 changed files with 49 additions and 3 deletions (loading 15).

x
0 of 18 viewed, 18 left
19 additions and 3 deletionsapps/desktop/src/ipc/methods/preview.tsModified
View file
@@ -2,6 +2,8 @@
DesktopPreviewAnnotationThemeInputSchema,
DesktopPreviewArtifactInputSchema,
DesktopPreviewAutomationClickInputSchema,
+ DesktopPreviewAutomationSetViewportInputSchema,
+ DesktopPreviewAutomationSnapshotInputSchema,
DesktopPreviewAutomationEvaluateInputSchema,
DesktopPreviewAutomationPressInputSchema,
DesktopPreviewAutomationScrollInputSchema,
@@ -276,11 +278,24 @@
​
export const automationSnapshot = DesktopIpc.makeIpcMethod({
channel: IpcChannels.PREVIEW_AUTOMATION_SNAPSHOT_CHANNEL,
- payload: DesktopPreviewTabInputSchema,
+ payload: DesktopPreviewAutomationSnapshotInputSchema,
result: PreviewAutomationSnapshot,
- handler: Effect.fn("desktop.ipc.preview.automationSnapshot")(function* ({ tabId }) {
+ handler: Effect.fn("desktop.ipc.preview.automationSnapshot")(function* ({ tabId, include }) {
+ const manager = yield* PreviewManager.PreviewManager;
+ return yield* manager.automationSnapshot(tabId, include ?? []);
+ }),
+});
+​
+export const automationSetViewport = DesktopIpc.makeIpcMethod({
+ channel: IpcChannels.PREVIEW_AUTOMATION_SET_VIEWPORT_CHANNEL,
+ payload: DesktopPreviewAutomationSetViewportInputSchema,
+ result: Schema.Void,
+ handler: Effect.fn("desktop.ipc.preview.automationSetViewport")(function* (input) {
const manager = yield* PreviewManager.PreviewManager;