Skip to content

Commit 458fab3

Browse files
committed
fix(mobile): keep explicit scratch choice on the tapped machine
1 parent a71433a commit 458fab3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/NewTaskRouteScreen.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,14 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
244244
const scratchOption =
245245
reservedDestinationProject === null
246246
? resolveNewTaskScratchOption({
247-
environments: connectedEnvironments,
247+
// Explicit choice stays on the tapped machine: never fall back to
248+
// another environment's scratch space from this picker.
249+
environments:
250+
routePreferredEnvironmentId === undefined
251+
? connectedEnvironments
252+
: connectedEnvironments.filter(
253+
(environment) => String(environment.environmentId) === routePreferredEnvironmentId,
254+
),
248255
serverConfigs,
249256
selectedEnvironmentId: preferredEnvironmentId,
250257
})

0 commit comments

Comments
 (0)