Skip to content

feat(webapp): add region override to the bulk replay action#4022

Open
matt-aitken wants to merge 1 commit into
prod-954ee5cfrom
feature/bulk-replay-region
Open

feat(webapp): add region override to the bulk replay action#4022
matt-aitken wants to merge 1 commit into
prod-954ee5cfrom
feature/bulk-replay-region

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

Summary

When replaying runs in bulk from a deployed environment, you can now choose which region the replayed runs run in. The bulk action inspector shows an "Override region" dropdown that defaults to "Don't override", which keeps each run in its original region, so replaying a selection that spans multiple regions doesn't silently re-route anything. Pick a region and every matched run is replayed there instead.

The dropdown only appears for the replay action in a deployed environment with more than one region available; cancel actions and development environments don't show it.

Design

The selected region is carried through the bulk action as a dedicated replayRegion param, kept separate from the run-list selection filters so it can't be confused with a region selection filter. When the action runs, each replay passes it through to the existing region override on the replay service, which already falls back to each run's original region when no override is set. "Don't override" is a sentinel value that the action normalizes away so the service only ever sees a real region or nothing.

@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 17990e0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c572ae2c-d1bc-4540-8454-7e88aba32208

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The pull request adds an optional "Override region" feature to bulk replay actions. BulkActionService.create now computes a replayRegion from the incoming payload and persists it within the params object stored in the database. BulkActionService.process reads this value back and passes it as the region argument to ReplayTaskRunService. On the route side, the loader is updated to fetch available regions via RegionsPresenter in parallel with the existing presenter, a sentinel constant (REPLAY_REGION_NO_OVERRIDE_VALUE) is introduced for the "no override" state, and the CreateBulkActionPayload Zod schema gains an optional region field. The action normalizes the sentinel to undefined before calling the service. The UI conditionally renders a region dropdown when the selected action is replay, the environment is not DEVELOPMENT, and more than one region exists.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main feature addition: a region override capability for bulk replay actions in the webapp.
Description check ✅ Passed The description provides comprehensive context about the feature, design decisions, and implementation details, but lacks explicit coverage of all template sections like testing steps and checklist items.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/bulk-replay-region

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the feature/bulk-replay-region branch from cbfa6fa to d74adf4 Compare June 23, 2026 01:55
@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@d74adf4

trigger.dev

npm i https://pkg.pr.new/trigger.dev@d74adf4

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@d74adf4

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@d74adf4

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@d74adf4

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@d74adf4

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@d74adf4

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@d74adf4

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@d74adf4

commit: d74adf4

devin-ai-integration[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken force-pushed the feature/bulk-replay-region branch from d74adf4 to cbfa6fa Compare June 23, 2026 11:51
@matt-aitken matt-aitken changed the base branch from main to prod June 23, 2026 11:57
@matt-aitken matt-aitken deleted the branch prod-954ee5c June 23, 2026 11:59
@matt-aitken matt-aitken reopened this Jun 23, 2026
@matt-aitken matt-aitken changed the base branch from prod to prod-954ee5c June 23, 2026 12:00
devin-ai-integration[bot]

This comment was marked as resolved.

When replaying runs in bulk from a deployed environment, you can now choose
which region the replayed runs run in. The inspector shows an "Override
region" dropdown that defaults to "Don't override", which keeps each run in
its original region, so replaying a selection that spans multiple regions
doesn't silently re-route anything. Pick a region and every matched run is
replayed there instead.
@matt-aitken matt-aitken force-pushed the feature/bulk-replay-region branch from cbfa6fa to 17990e0 Compare June 23, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant