Skip to content

fix(seer): Fix tab normalization so Seer Settings tab hrefs are correct#111279

Merged
ryan953 merged 1 commit intomasterfrom
ryan953/seer-tabs
Mar 23, 2026
Merged

fix(seer): Fix tab normalization so Seer Settings tab hrefs are correct#111279
ryan953 merged 1 commit intomasterfrom
ryan953/seer-tabs

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Mar 22, 2026

Before
Screenshot 2026-03-22 at 3 57 58 PM

After

Tab Url
Overview Screenshot 2026-03-22 at 3 57 42 PM
SCM Screenshot 2026-03-22 at 3 57 48 PM
Autofix Screenshot 2026-03-22 at 3 57 50 PM
Code Review Screenshot 2026-03-22 at 3 57 52 PM

@ryan953 ryan953 requested a review from a team as a code owner March 22, 2026 23:01
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 22, 2026
@ryan953 ryan953 requested a review from billyvg March 22, 2026 23:02
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

// If we manually make the call then it'll be double-normalized,
// we'd have `/settings/repos/` instead of `/settings/seer/repos/`.
return (
<TabList.Item key={normalized} to={{pathname: tabPath}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Keyboard tab navigation uses un-normalized URLs

Medium Severity

Passing to={{pathname: tabPath}} with the un-normalized path avoids double normalization in the Link component, but the BaseTabList's onSelectionChange handler also reads the to prop and calls navigate(linkTo) directly — without going through Link's normalization. Previously to was a pre-normalized string, so navigate worked correctly. Now navigate receives {pathname: '/settings/org-slug/seer/repos/'} which won't be normalized, resulting in incorrect URLs in customer-domain environments (e.g. keyboard tab selection navigating to a path that includes the org slug).

Fix in Cursor Fix in Web

Copy link
Member

Choose a reason for hiding this comment

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

This sounds legit, something to follow-up on for TabList generally. Check how many TabList.Item to props are using normalized URLs and if we can/should make onSelectionChange normalize the to prop to match Link's normalization

Copy link
Member Author

Choose a reason for hiding this comment

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

I see a few spots that are using key={..} to={..} and one spot spreading all props {...props}. I'll see if the design-eng team has bandwidth.

// If we manually make the call then it'll be double-normalized,
// we'd have `/settings/repos/` instead of `/settings/seer/repos/`.
return (
<TabList.Item key={normalized} to={{pathname: tabPath}}>
Copy link
Member

Choose a reason for hiding this comment

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

This sounds legit, something to follow-up on for TabList generally. Check how many TabList.Item to props are using normalized URLs and if we can/should make onSelectionChange normalize the to prop to match Link's normalization

@ryan953 ryan953 merged commit 8e3ab59 into master Mar 23, 2026
71 checks passed
@ryan953 ryan953 deleted the ryan953/seer-tabs branch March 23, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants