Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(providers): keep preview timeout recovery inside T3 #23107

OpenPixPMusic(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/23107/headopened View on GitHub

Showing 5 changed files with 53 additions and 2 deletions (loading 2).

x
0 of 5 viewed, 5 left
49 additions and 0 deletionsapps/server/src/mcp/PreviewAutomationBroker.test.tsModified
View file
@@ -5,6 +5,7 @@
PreviewAutomationClientDisconnectedError,
PreviewAutomationMalformedResponseError,
PreviewAutomationNoAvailableHostError,
+ PreviewAutomationTimeoutError,
PreviewTabId,
ProviderInstanceId,
ThreadId,
@@ -1045,3 +1046,51 @@
+​
+it.effect("reports a browser operation timeout without claiming the broker deadline elapsed", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const broker = yield* makeBroker;
+ const connected = yield* Deferred.make<void>();
+ const requests = requestsFrom(yield* broker.connect(makeHost()), () => {
+ Deferred.doneUnsafe(connected, Effect.void);
+ });
+ const connections: string[] = [];
+ yield* Stream.runForEach(requests, (request) => {
+ connections.push(request.connectionId);
+ return broker.respond({
+ clientId: "client-1",
+ connectionId: request.connectionId,
+ requestId: request.requestId,
+ ...(request.operation === "snapshot"