Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): t3_preview_close reports the server browser's refusal #17429

MergedScottN-PV(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/17429/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 88 additions and 5 deletions.

x
0 of 3 viewed, 3 left
85 additions and 0 deletionsapps/server/src/mcp/toolkits/previewControls/handlers.test.tsModified
View file
@@ -4,8 +4,10 @@
import {
DEFAULT_SERVER_SETTINGS,
EnvironmentId,
+ PreviewAutomationControlInterruptedError,
ProjectId,
ProviderInstanceId,
+ SERVER_BROWSER_AUTOMATION_CLIENT_ID,
ThreadId,
} from "@t3tools/contracts";
import { resolveProjectSettings } from "@t3tools/shared/projectSettings";
@@ -101,3 +103,86 @@
}),
+​
+it.effect("close reports why the server browser refused to close a tab", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const threadId = ThreadId.make("preview-controls-thread");
+ const scope: McpInvocationContext.McpInvocationScope = {
+ environmentId: EnvironmentId.make("preview-controls-environment"),
+ requestNamespace: "preview-controls-provider-session",
+ thread: {
+ threadId,
+ providerSessionId: "preview-controls-provider-session",
+ providerInstanceId: ProviderInstanceId.make("codex"),
+ },
+ client: undefined,