fix: hide "Mark as planned" for backlog tasks - #1675
Conversation
PR Summary by QodoHide redundant “Mark as planned” action for backlog tasks
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Mock return types are redundant
|
| children, | ||
| }: { | ||
| children: React.ReactNode; | ||
| }): React.JSX.Element => <div>{children}</div>, |
There was a problem hiding this comment.
1. Mock return types are redundant 📘 Rule violation ⚙ Maintainability
The new context-menu mocks explicitly annotate React.JSX.Element even though each JSX return type is directly inferable. This adds redundant TypeScript types contrary to the project's type-inference convention.
Agent Prompt
## Issue description
The newly added context-menu mocks explicitly declare `React.JSX.Element` return types that TypeScript can infer from their JSX expressions.
## Issue Context
PR Compliance ID 18 requires clear types to be inferred rather than redundantly annotated. Remove the explicit return annotations while preserving the mock behavior and necessary prop typing.
## Fix Focus Areas
- apps/web/src/components/kanban-board/task-card-context-menu/task-card-context-menu-content.test.tsx[11-42]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe task context menu now hides “Mark as planned” when a task already has planned status. New tests verify the action is absent for planned tasks and present for other statuses. ChangesPlanned task menu behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change hides the redundant “Mark as planned” action for tasks already in planned status while preserving it for other statuses. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Description
When I right-click a task that is already in the backlog, the "Mark as planned" option is still shown. Since the task is already planned, this option does nothing and is confusing.
I changed the context menu so that the "Mark as planned" option is hidden when the task status is
planned.Related Issue(s)
Fixes #1645
Type of Change
How Has This Been Tested?
Screenshots (if applicable)
Not applicable.
Checklist
Additional Notes
I added a focused test for both cases: planned tasks do not show "Mark as planned", while tasks with another status still show the option.
Summary by CodeRabbit
Bug Fixes
Tests