Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
packages/twenty-front/src/modules/activities/tasks/components/TaskGroups.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
2 issues found across 10 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsx">
<violation number="1" location="packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsx:12">
P1: The `totalCount` prop receives the total count of ALL tasks instead of the count for the specific status group. Each `TaskList` grouped by status will incorrectly display the total count (e.g., showing 'TODO 10' when there are only 5 TODO tasks out of 10 total). Consider using `tasksByStatus.length` or a per-status count from the API.</violation>
</file>
<file name="packages/twenty-front/src/modules/activities/notes/components/NotesCard.tsx">
<violation number="1" location="packages/twenty-front/src/modules/activities/notes/components/NotesCard.tsx:58">
P2: Changing the loading condition from `loading && isNotesEmpty` to just `loading` may cause existing notes to disappear and be replaced with a skeleton loader during refetch scenarios. Other similar components (`FilesCard`, `EmailsCard`, `CalendarEventsCard`) specifically check for initial load only to avoid this UX issue. Consider keeping the original condition or using a separate `firstQueryLoading` state.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| title: string; | ||
| tasks: Task[]; | ||
| button?: ReactElement | false; | ||
| totalCount: number; |
There was a problem hiding this comment.
P1: The totalCount prop receives the total count of ALL tasks instead of the count for the specific status group. Each TaskList grouped by status will incorrectly display the total count (e.g., showing 'TODO 10' when there are only 5 TODO tasks out of 10 total). Consider using tasksByStatus.length or a per-status count from the API.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/activities/tasks/components/TaskList.tsx, line 12:
<comment>The `totalCount` prop receives the total count of ALL tasks instead of the count for the specific status group. Each `TaskList` grouped by status will incorrectly display the total count (e.g., showing 'TODO 10' when there are only 5 TODO tasks out of 10 total). Consider using `tasksByStatus.length` or a per-status count from the API.</comment>
<file context>
@@ -9,6 +9,7 @@ type TaskListProps = {
title: string;
tasks: Task[];
button?: ReactElement | false;
+ totalCount: number;
};
</file context>
✅ Addressed in ba7d4a3
packages/twenty-front/src/modules/activities/notes/components/NotesCard.tsx
Outdated
Show resolved
Hide resolved
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:51303 This environment will automatically shut down when the PR is closed or after 5 hours. |
@lucasbordeau thank you for you review with pertinent human-emitted (so old fashion, so hilarious!!) comments 🙏 I reverted changes on tasks. We can't add pagination on task as we need to fetch task with a given 'status' + taskTarget related to a given personId. Waiting for nested filters |
| targetableObjects, | ||
| activityTargetsOrderByVariables: FIND_MANY_TIMELINE_ACTIVITIES_ORDER_BY, | ||
| limit: 30, | ||
| limit: 200, |
There was a problem hiding this comment.
Is this hardcoded value validated with Charles ? Seems like someone could create more than 200 tasks, we should maybe create a follow-up issue ?
There was a problem hiding this comment.
@lucasbordeau I add the max. I'll check with Charles. You're right I open a follow up issue
Before this PR, tasks and notes were limited at 60 records.
After this PR, tasks is limited at 200 (to be validated) and notes are paginated.
|
Hey @etiennejouan! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |


fixes : #16320