Skip to content

feat(webapp): move env-agnostic routes#5371

Open
kaposke wants to merge 2 commits intomasterfrom
gui/NAN-4685/feat-env-agnostic-routes
Open

feat(webapp): move env-agnostic routes#5371
kaposke wants to merge 2 commits intomasterfrom
gui/NAN-4685/feat-env-agnostic-routes

Conversation

@kaposke
Copy link
Contributor

@kaposke kaposke commented Feb 3, 2026

Pages like Billing, Team settings and Profile are env-agnostic (they don't change based on the selected env), yet their routes were still under an env (eg. /dev/team-settings). This is annoying when trying to link one of those to a customer, since we might not know their environments.


The router now keeps environment-scoped pages under the /:env branch while exposing absolute paths such as /team-settings, /team/billing, /user-settings, and /account-settings, and all navigation entry points route directly to these env-free destinations so they remain independent of the currently selected environment.

Key Changes

• Rearranged packages/webapp/src/App.tsx to group env-specific screens under the /:env branch while adding top-level routes for team, billing, and user settings plus the account-settings redirect.
• Updated ProfileDropdown, UsageCard, AutoIdlingBanner, CreateConnectionSelector, and ConnectUISettings to use the new env-agnostic URLs when linking to billing or settings pages.
• Removed unnecessary env dependencies from UI components whose targets are now global, simplifying memoized link lists.

Affected Areas

packages/webapp/src/App.tsx
packages/webapp/src/components-v2/AppSidebar/ProfileDropdown.tsx
packages/webapp/src/components-v2/AppSidebar/UsageCard.tsx
packages/webapp/src/pages/Integrations/components/AutoIdlingBanner.tsx
packages/webapp/src/pages/Connection/components/CreateConnectionSelector.tsx
packages/webapp/src/pages/Environment/Settings/ConnectUISettings/index.tsx


This summary was automatically generated by @propel-code-bot

@kaposke kaposke requested a review from a team February 3, 2026 14:07
@linear
Copy link

linear bot commented Feb 3, 2026

@kaposke kaposke force-pushed the gui/NAN-4685/feat-env-agnostic-routes branch from 5de1cc4 to 35afa24 Compare February 3, 2026 15:54
Comment on lines 195 to 212
{
path: '/:env/logs',
element: <LogsShow />,
handle: { breadcrumb: 'Logs' } as BreadcrumbHandle
},
{
path: '/:env/activity',
element: <RedirectWithEnv path="logs" />
},
{
path: '/:env/environment-settings',
element: <EnvironmentSettings />,
handle: { breadcrumb: 'Environment settings' } as BreadcrumbHandle
},
{
path: '/:env/project-settings',
element: <Navigate to="/environment-settings" />
},
{
path: '/:env/account-settings',
path: 'account-settings',
element: <Navigate to="/team-settings" />
},
{
path: '/:env/team-settings',
path: 'team-settings',
element: <TeamSettings />,
handle: { breadcrumb: 'Team settings' } as BreadcrumbHandle
},
{
path: '/:env/team/billing',
path: 'team/billing',
element: <TeamBilling />,
handle: { breadcrumb: 'Billing' } as BreadcrumbHandle
},
{
path: '/:env/user-settings',
path: 'user-settings',
element: <UserSettings />,
handle: { breadcrumb: 'User settings' } as BreadcrumbHandle
Copy link
Contributor

Choose a reason for hiding this comment

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

Important

[Reliability] By replacing the old env-scoped routes (e.g. /:env/team-settings, /:env/team/billing, /:env/user-settings, /:env/account-settings) with the new absolute ones in this block, we’ve dropped any matcher for the legacy URLs that are already in emails, docs, and customer bookmarks. Hitting something like /dev/team-settings will now match the /:env parent but 404 because no child handles team-settings. Please keep the env-prefixed paths around—at least as simple redirect routes under the /:env branch—so existing links continue to resolve. For example:

{
    path: 'team-settings',
    element: <Navigate to="/team-settings" replace />
},

(and similarly for team/billing, user-settings, and account-settings). This preserves backward compatibility while still enabling the new env-agnostic entry points.

Context for Agents
By replacing the old env-scoped routes (e.g. `/:env/team-settings`, `/:env/team/billing`, `/:env/user-settings`, `/:env/account-settings`) with the new absolute ones in this block, we’ve dropped any matcher for the legacy URLs that are already in emails, docs, and customer bookmarks. Hitting something like `/dev/team-settings` will now match the `/:env` parent but 404 because no child handles `team-settings`. Please keep the env-prefixed paths around—at least as simple redirect routes under the `/:env` branch—so existing links continue to resolve. For example:

```tsx
{
    path: 'team-settings',
    element: <Navigate to="/team-settings" replace />
},
```

(and similarly for `team/billing`, `user-settings`, and `account-settings`). This preserves backward compatibility while still enabling the new env-agnostic entry points.

File: packages/webapp/src/App.tsx
Line: 212

label: 'Getting Started',
icon: Sparkle,
href: `/${env}/getting-started`
href: `/dev/getting-started`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this hardcoded to dev? In theory, users can rename this environment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting started only shows up for an environment named dev. Renaming it means it doesn't show up anymore. Despite being /${env} there, it was not dynamic in the first place.

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.

2 participants