feat: add switch to view done tasks in teams#187
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughAdds an “Include Done” toggle to TeamTasks. Initializes state from the status URL param, updates the param on toggle, and switches task fetching to use a params-based query (typed with GetTaskReqDto) that includes status: 'DONE' when enabled. Minor layout/import updates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as TeamTasks UI
participant Router as Router/URL
participant RQ as React Query
participant API as TasksApi
User->>UI: Toggle "Include Done"
UI->>Router: Update URL query (?status=DONE / remove)
Router-->>UI: Params changed
UI->>RQ: Recompute queryKey with queryParams
RQ->>API: getTasks(queryParams)
API-->>RQ: Tasks (filtered by status when applicable)
RQ-->>UI: Update task list
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Inconsistent Status Value Comparison ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| modules/teams/team-tasks.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
There was a problem hiding this comment.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
modules/teams/team-tasks.tsx(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
modules/teams/team-tasks.tsx (3)
api/tasks/tasks.types.ts (1)
GetTaskReqDto(39-42)api/tasks/tasks.api.ts (1)
TasksApi(17-77)components/searchbar.tsx (1)
Searchbar(9-23)
🔇 Additional comments (4)
modules/teams/team-tasks.tsx (4)
5-5: Typed query params import is a good moveImporting GetTaskReqDto strengthens the API call typing and aligns the queryKey/fn usage. Looks good.
15-16: UI control imports look correctLabel and Switch imports are appropriate for the new toggle. No concerns.
132-133: Query key/fn now reflect filter stateSwitching to TasksApi.getTasks.key(queryParams) and fn(queryParams) is correct and will cache per-filter. With the memoized queryParams (suggested above), this remains stable.
165-165: Layout adjustment LGTMAdding space for the new control beside the search bar looks fine and keeps the header compact.
7cfaa02 to
7415178
Compare
Date: 22-08-2025
Developer Name: @MayankBansal12
Issue Ticket Number
Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
demo
Screencast.from.2025-08-22.21-06-37.mp4
Description by Korbit AI
What change is being made?
Add a switch feature to allow users to toggle the visibility of completed ("done") tasks in team views and other dashboard components.
Why are these changes being made?
The feature provides users with the flexibility to decide whether to include completed tasks in their task view, enhancing the task management experience. The implementation centralizes the toggle logic using
IncludeDoneSwitchto reduce duplication and improve maintainability, ensuring consistent functionality across different components. By leveraging URL search parameters, this approach also maintains state consistency when navigating through the application.