Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): WSL browser tabs show pages typed in the address bar #28488

ClosedKieraano(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/28488/headopened View on GitHub

Showing 2 changed files with 29 additions and 2 deletions.

x
0 of 2 viewed, 2 left
27 additions and 1 deletionapps/server/src/preview/ServerBrowser.test.tsModified
View file
@@ -299,6 +299,7 @@
let contextFailure: Error | null = null;
let initialNavigation: (() => Promise<void>) | null = null;
let desktopRendersNext = false;
+let desktopChannelAvailable = true;
let desktopPageUrl = "about:blank";
/** Replaces the answer to the desktop page's size reads. */
let desktopSizeAnswer: (() => Promise<Record<string, unknown>>) | null = null;
@@ -345,7 +346,9 @@
installed: Effect.die("mock Chromium does not need an executable"),
}),
Layer.succeed(DesktopChannel.DesktopBrowserChannel, {
- available: true,
+ get available() {
+ return desktopChannelAvailable;
+ },
awaitAttached: (key) => Effect.sync(() => desktopRenders(key.tabId)),
detached: Stream.callback<{ threadId: string; tabId: string }>((queue) =>
Effect.acquireRelease(
@@ -592,6 +595,29 @@
).pipe(Effect.provide(layer)),
​
+it.effect("a tab is marked headless when the backend has no desktop channel, as under WSL", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const { broker } = yield* ready;
+ const manager = yield* Manager.PreviewManager;