Skip to content

Fix PopoverMenu Storybook title indexing - #25

Open
matthewbirtch wants to merge 1 commit into
mainfrom
fix/popover-menu-storybook-title
Open

Fix PopoverMenu Storybook title indexing#25
matthewbirtch wants to merge 1 commit into
mainfrom
fix/popover-menu-storybook-title

Conversation

@matthewbirtch

Copy link
Copy Markdown
Collaborator

Summary

  • Use an inline string literal for meta.title in PopoverMenu.stories.tsx instead of an imported constant
  • Fixes Storybook CSF indexer crash (Cannot read properties of null (reading 'loc')) when parsing the story title

Test plan

  • Run Storybook and confirm PopoverMenu stories load without the indexing error
  • Confirm the story appears under Patterns/Popover Menu
  • Spot-check that existing PopoverMenu story renders still work

Made with Cursor

CSF static analysis cannot resolve imported title constants, which caused formatLocation to crash on null.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 025f897f-3e55-4e2a-a687-5a460d17ec7d

📥 Commits

Reviewing files that changed from the base of the PR and between b032bc7 and 2610cb3.

📒 Files selected for processing (1)
  • packages/compass-ui/src/components/PopoverMenu/PopoverMenu.stories.tsx

📝 Walkthrough

Walkthrough

The Popover Menu Storybook story now places the PopoverMenu import before the metadata declaration and replaces the title constant with the literal 'Patterns/Popover Menu'.

Changes

Popover Menu Storybook

Layer / File(s) Summary
Update Storybook metadata
packages/compass-ui/src/components/PopoverMenu/PopoverMenu.stories.tsx
Repositions the PopoverMenu import and changes the default metadata title to 'Patterns/Popover Menu'.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: fixing the PopoverMenu Storybook title/indexing issue.
Description check ✅ Passed The description directly matches the code change and explains the Storybook indexing fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/popover-menu-storybook-title

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant