Skip to content

Conversation

@mmabrouk
Copy link
Member

@mmabrouk mmabrouk commented Feb 4, 2026

Summary

  • add cloud region selector UI with info modal on the auth page
  • store preferred region in cookie and redirect from cloud alias when needed
  • wire cloud region env + update Next config to transpile workspace package

Config

  • Runtime env (secrets/vars): AGENTA_CLOUD_REGION=eu|us (injected into NEXT_PUBLIC_AGENTA_CLOUD_REGION via web/entrypoint.sh)
  • Existing required vars (already in use): AGENTA_WEB_URL (sets NEXT_PUBLIC_AGENTA_WEB_URL), AGENTA_API_URL
CleanShot 2026-02-04 at 22 24 48@2x CleanShot 2026-02-04 at 22 24 57@2x
Open with Devin

@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Feb 10, 2026 7:26pm

Request Review

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 4, 2026
@mmabrouk
Copy link
Member Author

mmabrouk commented Feb 4, 2026

@jp-agenta we need to set these Runtime env (secrets/vars): AGENTA_CLOUD_REGION=eu|us (and probably in staging or so for testing)

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional flags.

Open in Devin Review

@junaway
Copy link
Contributor

junaway commented Feb 5, 2026

@mmabrouk

  • I added copy fixes (mostly Virginia > Ohio)
  • We already have ACCOUNT=[..., cloud], REGION=[..., eu, us], STAGE=[..., live] at the platform level. We might want to expose them to the application level, indeed.

However, in this PR, plenty of things seem to be hardcoded:

  • The available regions
  • The region details
  • The url structure
  • The region urls

I'd say that adding an env var for the region only is not clean. Either we put everything in env vars or nothing.

In this case, I'd

  • either extract the current region from the current hostname (given that we are hardcoding the url structure, why not?)
  • or put all the bullet points in env var(s).

I guess the former is simpler.

Now, in self-hosted, all this would still be visible ? Even the decision to show this whole thing or not follows the same rule:

  • either we display based on the hostname
  • or we have it as part of the env var(s) info.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 12 additional findings in Devin Review.

Open in Devin Review

- Remove AGENTA_CLOUD_REGION env var; region is now derived purely
  from window.location.hostname (the hostname is the source of truth)
- Revert unrelated next.config.ts changes (bundleAnalyzer, duplicate
  transpilePackages, optimizePackageImports)
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 10 additional findings in Devin Review.

Open in Devin Review

- Centralize all hostname logic into CLOUD_ENVIRONMENTS table
- Add preview/staging envs (staging.preview.agenta.dev=EU,
  testing.preview.agenta.dev=US)
- Add redirect-loop guard via sessionStorage
- Fix ARIA: use radiogroup + radio + aria-checked
- Fix hardcoded #586673 colors to theme tokens
- Extract RegionButton as a proper component
- Wrap export in error boundary (auth page won't crash)
- Fix cookie parsing (substring instead of split)
- Drop useless useMemo on isAuthCallback
- Add aria-haspopup on Learn more button
- Derive modal region list from REGIONS data
Copy link
Contributor

@junaway junaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 lgtm! @mmabrouk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Frontend size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants