Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(preview): restore native browser tabs on WSL-only desktops #28601

ClosedKaizer303(GitHub profile, opens in a new tab)wants to merge 14 commits intomain fromrefs/pull/28601/headopened View on GitHub

Showing 24 changed files with 152 additions and 2 deletions (loading 21).

x
0 of 24 viewed, 24 left
42 additions and 0 deletionsapps/desktop/src/backend/DesktopBackendConfiguration.test.tsModified
View file
@@ -809,6 +809,48 @@
}).pipe(Effect.scoped, Effect.provide(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))),
​
+ it.effect("gives only a WSL-only primary the browser channel socket secret", () =>
+ Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const baseDir = yield* fileSystem.makeTempDirectoryScoped({
+ prefix: "t3-desktop-backend-config-test-",
+ });
+​
+ yield* Effect.gen(function* () {
+ const configuration = yield* DesktopBackendConfiguration.DesktopBackendConfiguration;
+ const primary = yield* configuration.resolvePrimary;
+ const besideWindows = yield* configuration.resolveWsl({ port: 5000, distro: "Ubuntu" });
+​
+ assert.equal(primary.executablePath, "wsl.exe");
+ assert.match(primary.bootstrap.desktopBrowserSocketSecret ?? "", /^[0-9a-f]{64}$/);
+ // Only the primary's tabs render natively.
+ assert.isUndefined(besideWindows.bootstrap.desktopBrowserSocketSecret);
+ }).pipe(
+ Effect.provide(
+ layerBackendConfiguration().pipe(
+ Layer.provideMerge(layerServerExposure),
+ Layer.provideMerge(
+ DesktopAppSettings.layerTest({
+ ...DesktopAppSettings.DEFAULT_DESKTOP_SETTINGS,
+ wslBackendEnabled: true,
+ wslOnly: true,
+ wslDistro: "Ubuntu",