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 && ( + + + {/* 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} + + )}