fix(seer): Fix tab normalization so Seer Settings tab hrefs are correct#111279
fix(seer): Fix tab normalization so Seer Settings tab hrefs are correct#111279
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
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}}> |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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}}> |
There was a problem hiding this comment.
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


Before

After