Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): WSL browser tabs show the page the agent drives #27043

Closedjuliusmarmingewants to merge 4 commits intomain fromfix/issue-27035opened View on GitHub

Showing 4 changed files with 25 additions and 3 deletions (loading 1).

x
0 of 4 viewed, 4 left
20 additions and 0 deletionsapps/server/src/preview/ServerBrowser.test.tsModified
View file
@@ -494,6 +494,26 @@
).pipe(Effect.provide(layer)),
​
+it.effect("a server with no desktop channel marks its tabs headless", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const { tabId } = yield* ready;
+ const manager = yield* Manager.PreviewManager;
+ const { sessions } = yield* manager.list({ threadId: scope.thread.threadId });
+​
+ expect(sessions.find((session) => session.tabId === tabId)?.headless).toBe(true);
+ }),
+ ).pipe(
+ Effect.provide(
+ ServerBrowser.layer.pipe(
+ // The test config has no desktop browser fds, like a WSL backend.
+ Layer.provideMerge(DesktopChannel.layer),
+ Layer.provideMerge(dependencies),
+ ),
+ ),
+ ),
+);
+​
it.live.each([
{ method: "goto" as const, message: { type: "navigate", url: "http://10.255.255.1/" } },
{ method: "goBack" as const, message: { type: "history", delta: -1 } },
2 additions and 2 deletionsapps/server/src/preview/ServerBrowser.tsModified
View file