-
Notifications
You must be signed in to change notification settings - Fork 478
feat(frontend): add cloud region selector on sign-in #3629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@jp-agenta we need to set these Runtime env (secrets/vars): AGENTA_CLOUD_REGION=eu|us (and probably in staging or so for testing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, in this PR, plenty of things seem to be hardcoded:
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
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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
junaway
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 lgtm! @mmabrouk
Summary
Config
AGENTA_CLOUD_REGION=eu|us(injected intoNEXT_PUBLIC_AGENTA_CLOUD_REGIONviaweb/entrypoint.sh)AGENTA_WEB_URL(setsNEXT_PUBLIC_AGENTA_WEB_URL),AGENTA_API_URL