Skip to content

[WEB-7181] fix: empty comment quick-actions menu in work item activity#9024

Open
b-saikrishnakanth wants to merge 2 commits intopreviewfrom
fix-comment-quick-actions-empty-menu
Open

[WEB-7181] fix: empty comment quick-actions menu in work item activity#9024
b-saikrishnakanth wants to merge 2 commits intopreviewfrom
fix-comment-quick-actions-empty-menu

Conversation

@b-saikrishnakanth
Copy link
Copy Markdown
Collaborator

@b-saikrishnakanth b-saikrishnakanth commented May 6, 2026

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

  • Bug fix (non-breaking change which fixes an issue)

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • Improvements
    • The comments quick actions menu now automatically hides inapplicable options, showing only actions relevant to the current context.
    • If no actions apply, the quick actions menu does not render, reducing visual clutter and improving reliability.

@makeplane
Copy link
Copy Markdown

makeplane Bot commented May 6, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 993bd46e-6a3e-4e76-b388-f10596f55192

📥 Commits

Reviewing files that changed from the base of the PR and between 8ccb387 and f4f3d98.

📒 Files selected for processing (1)
  • apps/web/core/components/comments/quick-actions.tsx

📝 Walkthrough

Walkthrough

The 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.

Changes

Menu Item Conditional Rendering

Layer / File(s) Summary
Data Shape / Memo
apps/web/core/components/comments/quick-actions.tsx
MENU_ITEMS produced by useMemo is post-processed with .filter(item => item.shouldRender !== false) to remove non-renderable items.
Rendering Guard
apps/web/core/components/comments/quick-actions.tsx
Added early if (MENU_ITEMS.length === 0) return null to avoid rendering when nothing remains.
Renderer Simplification
apps/web/core/components/comments/quick-actions.tsx
Render mapping removed internal shouldRender checks and maps over the already filtered MENU_ITEMS directly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A quick little hop through the menu tree,
I filter the branches so only true leaves I see.
If nothing remains, I curl up and rest,
Clean render, light heart — that feels the best.
✨🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing the empty comment quick-actions menu display in work item activity.
Description check ✅ Passed The description includes the main required sections: Description, Type of Change (bug fix checked), and covers the core purpose, but is missing Test Scenarios details.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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-comment-quick-actions-empty-menu

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c1bdd1 and 8ccb387.

📒 Files selected for processing (1)
  • apps/web/core/components/comments/quick-actions.tsx

Comment thread apps/web/core/components/comments/quick-actions.tsx
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