refactor: remove recent tasks section#1577
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe task notification menu is refactored from a two-section Recent/Past Tasks layout to a single Past Tasks section. State management simplifies to one toggle; recent vs. past filtering is removed; the UI displays only ChangesTask Notification Menu Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
frontend/components/task-notification-menu.tsx (1)
51-55: ⚡ Quick winConsider renaming
isRecentTasksExpandedin the context.The context property name
isRecentTasksExpandedno longer aligns with its usage—it now controls the "Past Tasks" section. Consider renaming it toisPastTasksExpandedor a more generic name likeisTerminalTasksExpandedto avoid confusion.🤖 Prompt for 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. In `@frontend/components/task-notification-menu.tsx` around lines 51 - 55, The prop/context name is misleading: update every usage and declaration of isRecentTasksExpanded to a clearer name (e.g., isPastTasksExpanded or isTerminalTasksExpanded) so it matches its role controlling the "Past Tasks" panel; specifically rename the identifier in the context/provider and in this component where useEffect watches isRecentTasksExpanded and sets isPastOpen, and update any types/props, imports, and tests that reference isRecentTasksExpanded (ensure renaming preserves runtime behavior and adjust the dependency array in the useEffect to the new name).
🤖 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 `@frontend/components/task-notification-menu.tsx`:
- Around line 82-93: The effect in useEffect that reads terminalTasks is running
every render because terminalTasks is recomputed inline; wrap the terminalTasks
computation (the filter/sort derived from tasks) in a useMemo with [tasks] so
the reference is stable, then keep the existing useEffect that checks
selectedTaskId, selectedTaskTrigger vs lastHandledSelectionTriggerRef.current
and calls setIsPastOpen when a match is found; update imports if needed to
include useMemo and ensure terminalTasks used in useEffect refers to the
memoized variable.
---
Nitpick comments:
In `@frontend/components/task-notification-menu.tsx`:
- Around line 51-55: The prop/context name is misleading: update every usage and
declaration of isRecentTasksExpanded to a clearer name (e.g.,
isPastTasksExpanded or isTerminalTasksExpanded) so it matches its role
controlling the "Past Tasks" panel; specifically rename the identifier in the
context/provider and in this component where useEffect watches
isRecentTasksExpanded and sets isPastOpen, and update any types/props, imports,
and tests that reference isRecentTasksExpanded (ensure renaming preserves
runtime behavior and adjust the dependency array in the useEffect to the new
name).
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: adccfea9-9623-4cc5-b755-d63ecd3e4ed2
📒 Files selected for processing (2)
frontend/components/task-notification-menu.tsxfrontend/tests/core/tasks-unified-panel.spec.ts
|
Doing a functional test now |
lucaseduoli
left a comment
There was a problem hiding this comment.
LGTM, tested and it's working perfectly
Recent vs Past tasks sections get confusing and noisy this removes the recent section and all completed tasks are in the past section
Summary by CodeRabbit
Refactor
Tests