Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d5d0a08
fix(preview): apply viewport changes when the panel is hidden
gbarros-dev Aug 17, 2026
b64bb2f
fix(preview): keep guest viewport and server snapshot in lockstep
gbarros-dev Aug 17, 2026
b05215f
fix(preview): apply human viewport overrides without agent control
gbarros-dev Aug 17, 2026
0b5135c
fix(preview): keep landscape phones mobile and sync drag to the guest
gbarros-dev Aug 17, 2026
d99b7a9
fix(preview): apply guest viewport only after the webview is registered
gbarros-dev Aug 17, 2026
153ddee
fix(preview): leave guest viewport overrides to HostedBrowserWebview
gbarros-dev Aug 17, 2026
4eb85a9
style(preview): drop extra blank line in viewport override test
gbarros-dev Aug 23, 2026
73feef6
fix(preview): restore viewport after DevTools and gate guest rollback
gbarros-dev Aug 23, 2026
8ad7221
fix(preview): scale desktop CDP viewport overrides by page zoom
gbarros-dev Aug 23, 2026
4077912
fix(preview): keep store and guest matched on resize rollback
gbarros-dev Aug 23, 2026
d75ac83
fix(preview): make viewport overrides deterministic
t3dotgg Aug 28, 2026
135d602
fix(preview): close viewport deadline races
t3dotgg Aug 28, 2026
9fb1bf4
fix(preview): reconcile restored viewport intent
t3dotgg Aug 28, 2026
4d107fb
fix(preview): guard viewport rollback writes
t3dotgg Aug 28, 2026
cc06ca3
fix(preview): close remaining viewport races
t3dotgg Aug 28, 2026
b2020b5
fix(preview): roll back failed viewport state
t3dotgg Aug 28, 2026
814d1a0
fix(web): retain pending preview revisions
t3dotgg Aug 28, 2026
3ec0123
fix(web): prefer preview revisions to timestamps
t3dotgg Sep 1, 2026
5f8634c
fix(web): set automation viewport when opening tab
t3dotgg Sep 1, 2026
9425d6e
fix(preview): reconcile viewport swaps after apply failures
t3dotgg Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/desktop/src/ipc/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const PREVIEW_RESET_ZOOM_CHANNEL = "desktop:preview-reset-zoom";
export const PREVIEW_HARD_RELOAD_CHANNEL = "desktop:preview-hard-reload";
export const PREVIEW_SET_COLOR_SCHEME_CHANNEL = "desktop:preview-set-color-scheme";
export const PREVIEW_SET_AUDIO_MUTED_CHANNEL = "desktop:preview-set-audio-muted";
export const PREVIEW_SET_VIEWPORT_CHANNEL = "desktop:preview-set-viewport";
export const PREVIEW_OPEN_DEVTOOLS_CHANNEL = "desktop:preview-open-devtools";
export const PREVIEW_CLEAR_COOKIES_CHANNEL = "desktop:preview-clear-cookies";
export const PREVIEW_CLEAR_CACHE_CHANNEL = "desktop:preview-clear-cache";
Expand All @@ -80,6 +81,7 @@ export const PREVIEW_AUTOMATION_PRESS_CHANNEL = "desktop:preview-automation-pres
export const PREVIEW_AUTOMATION_SCROLL_CHANNEL = "desktop:preview-automation-scroll";
export const PREVIEW_AUTOMATION_EVALUATE_CHANNEL = "desktop:preview-automation-evaluate";
export const PREVIEW_AUTOMATION_WAIT_FOR_CHANNEL = "desktop:preview-automation-wait-for";
export const PREVIEW_AUTOMATION_SET_VIEWPORT_CHANNEL = "desktop:preview-automation-set-viewport";
export const PREVIEW_RECORDING_START_CHANNEL = "desktop:preview-recording-start";
export const PREVIEW_RECORDING_STOP_CHANNEL = "desktop:preview-recording-stop";
export const PREVIEW_RECORDING_SAVE_CHANNEL = "desktop:preview-recording-save";
Expand Down
28 changes: 28 additions & 0 deletions apps/desktop/src/ipc/methods/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
DesktopPreviewAnnotationThemeInputSchema,
DesktopPreviewArtifactInputSchema,
DesktopPreviewAutomationClickInputSchema,
DesktopPreviewAutomationSetViewportInputSchema,
DesktopPreviewAutomationEvaluateInputSchema,
DesktopPreviewAutomationPressInputSchema,
DesktopPreviewAutomationScrollInputSchema,
Expand Down Expand Up @@ -163,6 +164,18 @@ export const setAudioMuted = DesktopIpc.makeIpcMethod({
yield* manager.setAudioMuted(tabId, audioMuted);
}),
});
export const setViewport = DesktopIpc.makeIpcMethod({
channel: IpcChannels.PREVIEW_SET_VIEWPORT_CHANNEL,
payload: DesktopPreviewAutomationSetViewportInputSchema,
result: Schema.Void,
handler: Effect.fn("desktop.ipc.preview.setViewport")(function* (input) {
const manager = yield* PreviewManager.PreviewManager;
yield* manager.setViewport(
input.tabId,
"clear" in input ? { clear: true } : { width: input.width, height: input.height },
);
}),
});
export const openDevTools = tabMethod(
IpcChannels.PREVIEW_OPEN_DEVTOOLS_CHANNEL,
"desktop.ipc.preview.openDevTools",
Expand Down Expand Up @@ -299,6 +312,19 @@ export const automationSnapshot = DesktopIpc.makeIpcMethod({
}),
});

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;
yield* manager.automationSetViewport(
input.tabId,
"clear" in input ? { clear: true } : { width: input.width, height: input.height },
);
}),
});

export const automationClick = DesktopIpc.makeIpcMethod({
channel: IpcChannels.PREVIEW_AUTOMATION_CLICK_CHANNEL,
payload: DesktopPreviewAutomationClickInputSchema,
Expand Down Expand Up @@ -383,6 +409,7 @@ export const methods = [
hardReload,
setColorScheme,
setAudioMuted,
setViewport,
openDevTools,
clearCookies,
clearCache,
Expand All @@ -397,6 +424,7 @@ export const methods = [
closePictureInPicture,
automationStatus,
automationSnapshot,
automationSetViewport,
automationClick,
automationType,
automationPress,
Expand Down
10 changes: 10 additions & 0 deletions apps/desktop/src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ contextBridge.exposeInMainWorld("desktopBridge", {
ipcRenderer.invoke(IpcChannels.PREVIEW_SET_COLOR_SCHEME_CHANNEL, { tabId, colorScheme }),
setAudioMuted: (tabId, audioMuted) =>
ipcRenderer.invoke(IpcChannels.PREVIEW_SET_AUDIO_MUTED_CHANNEL, { tabId, audioMuted }),
setViewport: (tabId, input) =>
ipcRenderer.invoke(IpcChannels.PREVIEW_SET_VIEWPORT_CHANNEL, {
tabId,
...input,
}),
openDevTools: (tabId) =>
ipcRenderer.invoke(IpcChannels.PREVIEW_OPEN_DEVTOOLS_CHANNEL, { tabId }),
clearCookies: () => ipcRenderer.invoke(IpcChannels.PREVIEW_CLEAR_COOKIES_CHANNEL),
Expand Down Expand Up @@ -269,6 +274,11 @@ contextBridge.exposeInMainWorld("desktopBridge", {
ipcRenderer.invoke(IpcChannels.PREVIEW_AUTOMATION_STATUS_CHANNEL, { tabId }),
snapshot: (tabId) =>
ipcRenderer.invoke(IpcChannels.PREVIEW_AUTOMATION_SNAPSHOT_CHANNEL, { tabId }),
setViewport: (tabId, input) =>
ipcRenderer.invoke(IpcChannels.PREVIEW_AUTOMATION_SET_VIEWPORT_CHANNEL, {
tabId,
...input,
}),
click: (tabId, input) =>
ipcRenderer.invoke(IpcChannels.PREVIEW_AUTOMATION_CLICK_CHANNEL, { tabId, input }),
type: (tabId, input) =>
Expand Down
Loading
Loading