Skip to content

Conversation

jasonyuezhang
Copy link
Owner


Copied from getsentry#101068
Original PR: getsentry#101068

Copy link

Prevent Flashing of Tabs in AI Insights Module During First Navigation

This pull request refactors the rendering of header and tab elements within the insights/ai (Agents and MCP) modules to ensure tabs are always present and to avoid visual flash or jitter during the first navigation. Specifically, header rendering is moved to dedicated layout components for both the agents and mcp insights modules, and route configuration is updated to pass the relevant module data, enabling consistent header rendering and eliminating duplicate logic from overview pages.

Key Changes

• Created new AgentsLayout component in static/app/views/insights/pages/agents/layout.tsx to always render header and outlet for nested routes.
• Removed duplicated header rendering (AgentsPageHeader) from agents/views/overview.tsx and mcp/views/overview.tsx.
• Added handle: {module: ModuleName.AGENTS} and handle: {module: ModuleName.MCP} metadata to respective route definitions in static/app/routes.tsx.
• Updated routing for ${AGENTS_LANDING_SUB_PATH}/ to use the new layout and ensure consistent structure.

Affected Areas

static/app/views/insights/pages/agents/layout.tsx
static/app/views/insights/agents/views/overview.tsx
static/app/views/insights/mcp/views/overview.tsx
static/app/routes.tsx

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

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