-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(ui): always render tabs in insights/ai to avoid flash during first navigation #101068
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
Conversation
|
||
return ( | ||
<Fragment> | ||
{handle && 'module' in handle ? <AgentsPageHeader module={handle.module} /> : null} |
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.
note: I left out passing headerTitle={<Fragment>{getAIModuleTitle(organization)}</Fragment>}
because headerTitle
just falls back to domainTitle
if it’s not present, and that does the exact same thing:
sentry/static/app/views/insights/pages/agents/agentsPageHeader.tsx
Lines 41 to 42 in 38fa875
headerTitle={headerTitle} | |
domainTitle={getAIModuleTitle(organization)} |
path: `${MODULE_BASE_URLS[ModuleName.AGENTS]}/`, | ||
children: [ | ||
{ | ||
index: true, | ||
handle: {module: ModuleName.AGENTS}, | ||
component: make(() => import('sentry/views/insights/agents/views/overview')), | ||
}, | ||
], | ||
}, | ||
{ | ||
path: `${MODULE_BASE_URLS[ModuleName.MCP]}/`, | ||
children: [ | ||
{ | ||
index: true, | ||
handle: {module: ModuleName.MCP}, |
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.
note: I think it’s quite weird that these routes are part of the moduleRoutes
object. That object gets passed to 4 different parent routes: frontend
, backend
, mobile
and ai
and should probably only contain things that we need everywhere or in multiple places.
But right now, that means I can go to urls like /insights/frontend/agents/
and it works because the route exists but it renders a non-sensical page: frontend header with the agents page :/
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.
🙌 thx
No description provided.