Skip to content

Conversation

natemoo-re
Copy link
Member

Follow-up to #95365.

Previously, legacy URLs would not be redirected.
Now, legacy URLs force a redirect.

Previously, the sidebar and search pointed to the legacy URLs, which required a redirect.
Now, the sidebar and search leverage the new URLs and pass along state info.

@natemoo-re natemoo-re requested a review from a team as a code owner July 14, 2025 16:22
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 14, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

codecov bot commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #95442       +/-   ##
===========================================
+ Coverage   38.44%   86.54%   +48.10%     
===========================================
  Files        9955    10548      +593     
  Lines      559478   607699    +48221     
  Branches    23822    23806       -16     
===========================================
+ Hits       215092   525958   +310866     
+ Misses     344090    81445   -262645     
  Partials      296      296               

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

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.

Bug: Tree Node Selection Fails for Direct Items

The getStoryTreeNodeFromKey function incorrectly assumes all items in props.defaultItems are StorySections, failing to find StoryTreeNodes that are directly present (not wrapped in sections). This causes selection to fail silently for such items. Additionally, within StorySection processing, it inefficiently calls node.find on already flattened leaf nodes from category.options instead of directly comparing node.filesystemPath === key.

static/app/stories/view/storySearch.tsx#L248-L264

function getStoryTreeNodeFromKey(
key: Key,
props: SearchComboBoxProps
): StoryTreeNode | undefined {
for (const category of props.defaultItems) {
if (isStorySection(category)) {
for (const node of category.options) {
const match = node.find(item => item.filesystemPath === key);
if (match) {
return match;
}
}
}
}
return undefined;
}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@natemoo-re natemoo-re merged commit 3deb0b6 into master Jul 15, 2025
46 checks passed
@natemoo-re natemoo-re deleted the stories/nm/urls branch July 15, 2025 16:32
natemoo-re added a commit that referenced this pull request Jul 15, 2025
Follow-up to #95442, which updated sidebar and search routing behavior
but did not update the footer navigation.

This PR refactors the story footer cards to use the new URL scheme
rather than the old query scheme.
cursor bot pushed a commit that referenced this pull request Jul 18, 2025
Follow-up to #95442, which updated sidebar and search routing behavior
but did not update the footer navigation.

This PR refactors the story footer cards to use the new URL scheme
rather than the old query scheme.
andrewshie-sentry pushed a commit that referenced this pull request Jul 21, 2025
Follow-up to #95365.

Previously, legacy URLs would not be redirected.
Now, legacy URLs force a redirect.

Previously, the sidebar and search pointed to the legacy URLs, which
required a redirect.
Now, the sidebar and search leverage the new URLs and pass along `state`
info.
andrewshie-sentry pushed a commit that referenced this pull request Jul 21, 2025
Follow-up to #95442, which updated sidebar and search routing behavior
but did not update the footer navigation.

This PR refactors the story footer cards to use the new URL scheme
rather than the old query scheme.
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants