Conversation
5de1cc4 to
35afa24
Compare
| { | ||
| 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 |
There was a problem hiding this comment.
[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` |
There was a problem hiding this comment.
Why is this hardcoded to dev? In theory, users can rename this environment
There was a problem hiding this comment.
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.
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
/:envbranch 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.tsxto group env-specific screens under the/:envbranch while adding top-level routes for team, billing, and user settings plus the account-settings redirect.• Updated
ProfileDropdown,UsageCard,AutoIdlingBanner,CreateConnectionSelector, andConnectUISettingsto use the new env-agnostic URLs when linking to billing or settings pages.• Removed unnecessary
envdependencies 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.tsxThis summary was automatically generated by @propel-code-bot