From c9e78ec25aa01de0c2074ace20d9882d65198652 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:20:15 +0000 Subject: [PATCH 1/2] feat: add region selector to test and replay task UI Allow users to select which region to run a task in when testing or replaying from the webapp dashboard. Previously this was only possible via the SDK's trigger() options. The region selector appears in the options panel alongside machine preset, and only shows when multiple regions are available to the project. Closes #3016 --- .../components/runs/v3/ReplayRunDialog.tsx | 30 ++++ .../route.tsx | 142 ++++++++++++++++-- .../resources.taskruns.$runParam.replay.ts | 20 ++- .../app/v3/services/replayTaskRun.server.ts | 2 +- .../webapp/app/v3/services/testTask.server.ts | 2 + apps/webapp/app/v3/testTask.ts | 1 + 6 files changed, 178 insertions(+), 19 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/ReplayRunDialog.tsx b/apps/webapp/app/components/runs/v3/ReplayRunDialog.tsx index 9192020e1bc..e42a2122abe 100644 --- a/apps/webapp/app/components/runs/v3/ReplayRunDialog.tsx +++ b/apps/webapp/app/components/runs/v3/ReplayRunDialog.tsx @@ -201,6 +201,7 @@ function ReplayForm({ tags, version, machine, + region, prioritySeconds, }, ] = useForm({ @@ -357,6 +358,35 @@ function ReplayForm({ )} {version.error} + {replayData.regions.length > 1 && ( + + + + {replayData.disableVersionSelection ? ( + Region is not available in the development environment. + ) : ( + Overrides the region for this run. + )} + {region.error} + + )} + {regionItems.length > 1 && ( + + + {/* Our Select primitive uses Ariakit under the hood, which treats + value={undefined} as uncontrolled, keeping stale internal state when + switching environments. The key forces a remount so it reinitializes + with the correct defaultValue. */} + + {isDev ? ( + Region is not available in the development environment. + ) : ( + Overrides the region for this run. + )} + {region.error} + + )} + {regionItems.length > 1 && ( + + + + {isDev ? ( + Region is not available in the development environment. + ) : ( + Overrides the region for this run. + )} + {region.error} + + )}