[WEB-7181] fix: empty comment quick-actions menu in work item activity#9024
[WEB-7181] fix: empty comment quick-actions menu in work item activity#9024b-saikrishnakanth wants to merge 2 commits intopreviewfrom
Conversation
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CommentQuickActions component now pre-filters its MENU_ITEMS (removing entries with shouldRender === false) and returns null early if no items remain; mapping/rendering uses the filtered list directly. ChangesMenu Item Conditional Rendering
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/core/components/comments/quick-actions.tsx`:
- Around line 81-86: Remove the redundant dead-code check inside the map that
tests item.shouldRender === false: the array is already filtered into MENU_ITEMS
by the filter in the useMemo, so delete the inline guard (the if
(item.shouldRender === false) return null; inside the map that renders menu
items). Keep the existing early return (if (MENU_ITEMS.length === 0) return
null;) and ensure only the filtered MENU_ITEMS are mapped for rendering (refer
to MENU_ITEMS and the map callback where each item is rendered).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cdcce8a0-ec39-422c-b451-4debe28bb2ad
📒 Files selected for processing (1)
apps/web/core/components/comments/quick-actions.tsx
Description
This PR fixes the comment quick-actions menu so the menu is not shown at all when no actions are available.
This avoids rendering empty/invalid menu content in cases where all actions are unavailable.
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit