The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 11:00 UTC
fix(web): Sharing & access can select a desktop-local WSL backend (#37151)
Julius Marminge committed
Nov 15, 2026 at 03:00 UTC
789d10fb54adfce468dbf5c7ad8f118ceeed6c53
1 file changed
+3
-4
apps/web/src/components/settings/useAccessEnvironment.ts
+3
-4
@@ -1,14 +1,13 @@
1
import type { EnvironmentId } from "@t3tools/contracts";
2
3
-import { isDesktopLocalConnectionTarget } from "../../connection/desktopLocal";
3
import { useEnvironments, usePrimaryEnvironmentId } from "../../state/environments";
4
import { resolveAccessEnvironmentId } from "./ConnectionsSettings.logic";
5
import { settingsScopeEnvironmentLabel } from "./settingsScopeAxis";
6
7
/**
8
* The environments Sharing & access manages, the one `requested` resolves to, and its name.
10
- * The MCP wizard uses the same, so both name an environment alike. A requested environment
11
- * always counts, so a thread on a second WSL backend opens on that backend.
9
+ * The MCP wizard uses the same, so both name an environment alike. A desktop-local WSL backend
10
+ * runs its own server with its own access, so it is a candidate too.
11
*/
12
export function useAccessEnvironment(requested: EnvironmentId | null) {
13
const { environments } = useEnvironments();
@@ -17,7 +16,7 @@ export function useAccessEnvironment(requested: EnvironmentId | null) {
16
(environment) =>
17
environment.environmentId === primaryEnvironmentId ||
18
environment.environmentId === requested ||
20
- (environment.entry.enabled && !isDesktopLocalConnectionTarget(environment.entry.target)),
19
+ environment.entry.enabled,
20
);
21
const environmentId = resolveAccessEnvironmentId({
22
primaryEnvironmentId,