Skip to content

stories: implement programmatic pagination detection #95397

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Jul 12, 2025

Implement programmatic pagination detection in the story tree, which won't require manual link maintenance.

@JonasBa JonasBa requested a review from a team as a code owner July 12, 2025 15:27
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 12, 2025
Copy link

@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: Story Pagination Fails Due to Property Mismatch

The findPreviousAndNextStory function incorrectly compares s.story.filesystemPath (from StoryTreeNode) with story.filename (from StoryDescriptor). This property name mismatch means the values may differ, preventing the current story from being found. As a result, the function returns null, breaking story pagination and preventing previous/next navigation links from being displayed.

static/app/stories/view/storyFooter.tsx#L77-L78

const s = stories[i]!;
if (s.story.filesystemPath === story.filename) {

Fix in CursorFix in Web


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

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.

1 participant