Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(preview): restore native browser tabs in WSL-only mode #36530

Openjuliusmarmingewants to merge 4 commits intomain fromrefs/pull/36530/headopened View on GitHub

Showing 25 changed files with 131 additions and 0 deletions (loading 22).

x
0 of 25 viewed, 25 left
42 additions and 0 deletionsapps/desktop/src/backend/DesktopBackendConfiguration.test.tsModified
View file
@@ -851,6 +851,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",