Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): recover preview automation after snapshot timeouts #8486

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromt3code/fix-preview-snapshot-recovery-3713opened View on GitHub

Showing 13 changed files with 80 additions and 5 deletions (loading 11).

x
0 of 13 viewed, 13 left
64 additions and 0 deletionsapps/desktop/src/ipc/methods/preview.test.tsModified
View file
@@ -28,6 +28,13 @@
},
}));
​
+const snapshotInput = {
+ tabId: "runtime-tab",
+ connectionId: "connection-1",
+ requestId: "request-1",
+ timeoutMs: 15_000,
+} as const;
+​
describe("preview IPC methods", () => {
beforeEach(() => {
fromPartition.mockClear();
@@ -94,4 +101,61 @@
}),
).toThrow();
});
+​
+ effectIt.effect("encodes Manager deadline errors as timeout results", () =>
+ Effect.gen(function* () {
+ const error = new PreviewManager.PreviewAutomationDeadlineExceededError({
+ operation: "snapshot",
+ tabId: snapshotInput.tabId,
+ webContentsId: 42,
+ connectionId: snapshotInput.connectionId,
+ requestId: snapshotInput.requestId,
+ timeoutMs: snapshotInput.timeoutMs,
+ stage: "execution",