-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
UI: Remove duplicate status items in context menu #32901
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
base: next
Are you sure you want to change the base?
UI: Remove duplicate status items in context menu #32901
Conversation
|
Hi everyone This PR fixes #32825 The duplication in the sidebar context menu was caused by repeated status aggregation ... both summary and individual story statuses were being shown. The fix introduces a deduplication step in ContextMenu.tsx using a Map to filter out repeated link IDs while preserving order. Verified — duplicate “status” items (e.g. “1 story with warnings”) are now removed. @storybookjs/core kindly requesting review whenever you get a chance and consider merging Thanks for maintaining this amazing project! |
|
Hi @yannbf This PR (#32901 – remove duplicate status items in context menu) fixes issue #32825, all checks are passing, and it can be cleanly merged. Thanks again! |
📝 WalkthroughWalkthroughRemoved commented-out code rendering shortcuts for a context menu item. Introduced deduplication logic to merge topLinks and links arrays, filtering out duplicate items by id, and updated the tooltip to use the deduplicated result. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
✨ Finishing touches
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (4)**/*.{js,jsx,json,html,ts,tsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
code/**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{code/**,scripts/**}/**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-09-24T09:39:39.233ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
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. Comment |
This PR fixes issue #32825 by deduplicating sidebar context menu links before rendering.
It removes duplicate “status” entries such as “1 story with warnings” while preserving the menu order.
Fixes: #32825
Summary by CodeRabbit