-
Notifications
You must be signed in to change notification settings - Fork 73
[Feature] Add role selection admin / employee / manager when sending invitations #3956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add role selection admin / employee / manager when sending invitations #3956
Conversation
""" WalkthroughThis update introduces role selection functionality to the team invitation flow, allowing admins to specify a role when inviting new members. The change propagates the Changes
Sequence Diagram(s)sequenceDiagram
participant AdminUser
participant InviteModal
participant RolesHook
participant InviteService
participant API
AdminUser->>InviteModal: Open invite modal
InviteModal->>RolesHook: Fetch available roles (if admin)
RolesHook-->>InviteModal: Return roles list
AdminUser->>InviteModal: Fill email, name, select role
InviteModal->>InviteService: inviteUser(email, name, roleId)
InviteService->>API: POST /invite { email, name, roleId, ... }
API-->>InviteService: Success/Failure
InviteService-->>InviteModal: Result
InviteModal-->>AdminUser: Show success/error
Estimated code review effort3 (~45 minutes) Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
yarn install v1.22.22 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ 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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Please review these files and clean up the unused code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR implements role selection functionality for team invitations, allowing administrators to assign specific roles (Admin, Employee, Manager) when inviting new team members. The feature adds a role dropdown to invitation forms that is only visible to admin and super admin users, while maintaining Employee as the default role for backward compatibility.
Key changes include:
Backend Integration: The IInviteRequest
interface now includes a roleId
field, and the invitation service was updated to use the provided role ID or fall back to the Employee role. The team invitations hook was extended to accept and pass through the roleId
parameter.
UI Components: Two main invitation modals (invite-form-modal.tsx
and invite-modal.tsx
) were enhanced with role selection dropdowns that appear only for admin users. The components implement proper state management for role selection with validation to ensure a role is selected before submission.
Internationalization: Comprehensive localization support was added across all supported languages (Arabic, Bulgarian, Chinese, Dutch, English, French, German, Hebrew, Italian, Polish, Portuguese, Russian, Spanish) with two new translation keys: TEAM_MEMBER_ROLE
for the form field label and SELECT_ROLE
for validation error messages.
Minor Optimizations: Some components were refactored for performance, including switching from the useAuthenticateUser
hook to direct atom access in team-members.tsx
, and the TeamMemberSection
component was changed from default to named export for better module organization.
The implementation maintains security by restricting role selection to admin users only and preserves existing functionality through proper fallback mechanisms.
Confidence score: 2/5
• This PR has implementation issues that could cause runtime errors and inconsistent behavior
• State management inconsistencies in invite modals where form data doesn't sync with role selection state, missing roleId in initialValues causing type mismatches, and potential undefined values being passed to APIs
• Files needing attention: apps/web/core/components/features/teams/invite-modal.tsx
and apps/web/core/components/features/teams/invite-form-modal.tsx
for state management fixes
21 files reviewed, 4 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🔭 Outside diff range comments (1)
apps/web/core/components/features/teams/invite-form-modal.tsx (1)
143-145
: Add missing dependency to useCallback.The
handleSubmit
callback should includeselectedRoleId
in its dependency array since it's used in the validation logic.-[selectedEmail, teamInvitations, closeModal, t, inviteUser, resendTeamInvitation] +[selectedEmail, teamInvitations, closeModal, t, inviteUser, resendTeamInvitation, selectedRoleId]
🧹 Nitpick comments (3)
apps/web/locales/es.json (1)
1074-1076
: Unintended change to VALID_EMAIL?
"VALID_EMAIL"
is flagged as modified although its text is identical. Make sure this wasn’t a formatting-only change that could create noisy diffs in future PRs.
Also, consider using the same punctuation style as the earlier"SELECT_ROLE"
undercommon
(Por favor, selecciona un rol
) for consistency.apps/web/locales/he.json (1)
1074-1076
: Consistency of error stringsThe new error string
"SELECT_ROLE": "אנא בחר תפקיד"
looks good.
Minor: a trailing period (.
) is used in several other error messages in this section—worth adding here for stylistic consistency.apps/web/locales/de.json (1)
1075-1076
: Error messages consistentBoth
"VALID_EMAIL"
and"SELECT_ROLE"
follow the existing style. Consider using exactly the same wording for"SELECT_ROLE"
if the string also appears in other sections to avoid subtle inconsistencies, but this is optional.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
apps/web/core/components/common/team-member.tsx
(1 hunks)apps/web/core/components/features/teams/invite-form-modal.tsx
(4 hunks)apps/web/core/components/features/teams/invite-modal.tsx
(4 hunks)apps/web/core/components/pages/teams/team/team-members.tsx
(3 hunks)apps/web/core/components/teams/invite/invite-email-dropdown.tsx
(1 hunks)apps/web/core/hooks/organizations/teams/use-team-invitations.ts
(3 hunks)apps/web/core/hooks/roles/use-roles.ts
(2 hunks)apps/web/core/services/client/api/organizations/teams/invites/invite.service.ts
(1 hunks)apps/web/core/types/interfaces/user/invite.ts
(1 hunks)apps/web/locales/ar.json
(2 hunks)apps/web/locales/bg.json
(2 hunks)apps/web/locales/de.json
(2 hunks)apps/web/locales/en.json
(2 hunks)apps/web/locales/es.json
(2 hunks)apps/web/locales/fr.json
(2 hunks)apps/web/locales/he.json
(2 hunks)apps/web/locales/it.json
(2 hunks)apps/web/locales/nl.json
(2 hunks)apps/web/locales/pl.json
(2 hunks)apps/web/locales/pt.json
(2 hunks)apps/web/locales/ru.json
(2 hunks)apps/web/locales/zh.json
(2 hunks)
🧠 Learnings (22)
📓 Common learnings
Learnt from: CREDO23
PR: ever-co/ever-teams#3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the `useTeamMemberCard` hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
apps/web/core/components/teams/invite/invite-email-dropdown.tsx (3)
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In apps/web/components/ui/sidebar.tsx
, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
apps/web/core/components/common/team-member.tsx (8)
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3328
File: apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx:66-78
Timestamp: 2024-11-13T05:17:33.527Z
Learning: In the UserTeamActivity
component (apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx
), the overflow-hidden
class is intentionally applied only to the first Tab.Panel
because the hidden overflow is needed when the sub-component has not yet been made visible. Applying overflow-hidden
to the other Tab.Panel
components is not required.
Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: NdekoCode
PR: #3199
File: apps/web/components/app-sidebar.tsx:49-55
Timestamp: 2024-10-28T17:16:03.609Z
Learning: In apps/web/components/app-sidebar.tsx
, hardcoded sample user data is intentionally included and should not be removed.
Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom
in apps/web/app/stores/team-tasks.ts
is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable
component (apps/web/components/pages/team/tasks/TaskTable.tsx
), we do not need to add error handling for task fetching when using useTeamTasks()
.
apps/web/core/components/pages/teams/team/team-members.tsx (9)
Learnt from: NdekoCode
PR: #3199
File: apps/web/components/app-sidebar.tsx:49-55
Timestamp: 2024-10-28T17:16:03.609Z
Learning: In apps/web/components/app-sidebar.tsx
, hardcoded sample user data is intentionally included and should not be removed.
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom
in apps/web/app/stores/team-tasks.ts
is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable
component (apps/web/components/pages/team/tasks/TaskTable.tsx
), we do not need to add error handling for task fetching when using useTeamTasks()
.
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: NdekoCode
PR: #3328
File: apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx:66-78
Timestamp: 2024-11-13T05:17:33.527Z
Learning: In the UserTeamActivity
component (apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx
), the overflow-hidden
class is intentionally applied only to the first Tab.Panel
because the hidden overflow is needed when the sub-component has not yet been made visible. Applying overflow-hidden
to the other Tab.Panel
components is not required.
apps/web/core/services/client/api/organizations/teams/invites/invite.service.ts (1)
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
apps/web/locales/nl.json (2)
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
apps/web/locales/he.json (2)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/core/hooks/organizations/teams/use-team-invitations.ts (1)
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
apps/web/core/hooks/roles/use-roles.ts (4)
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3887
File: apps/web/core/query/keys/index.ts:41-58
Timestamp: 2025-06-07T04:31:16.865Z
Learning: The team uses a progressive migration approach for React Query implementation, where query key infrastructure is added first before implementing the hooks/services that use them. This results in intentionally unused code during intermediate migration states.
Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
apps/web/locales/es.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/ru.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/it.json (3)
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
apps/web/locales/bg.json (1)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
apps/web/locales/zh.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/pl.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/pt.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
apps/web/core/components/features/teams/invite-form-modal.tsx (4)
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:14-19
Timestamp: 2024-10-25T15:16:53.869Z
Learning: In apps/web/components/ui/sidebar.tsx
, cookie configuration enhancements including secure
and httpOnly
flags, and making cookie name and max age configurable via environment variables, have already been implemented in previous commits.
apps/web/locales/fr.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/de.json (3)
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/en.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/core/components/features/teams/invite-modal.tsx (7)
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:14-19
Timestamp: 2024-10-25T15:16:53.869Z
Learning: In apps/web/components/ui/sidebar.tsx
, cookie configuration enhancements including secure
and httpOnly
flags, and making cookie name and max age configurable via environment variables, have already been implemented in previous commits.
Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable
component (apps/web/components/pages/team/tasks/TaskTable.tsx
), we do not need to add error handling for task fetching when using useTeamTasks()
.
Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom
in apps/web/app/stores/team-tasks.ts
is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: #3392
File: apps/web/app/[locale]/reports/weekly-limit/components/group-by-select.tsx:42-51
Timestamp: 2024-12-05T09:04:08.049Z
Learning: In the GroupBySelect
component (apps/web/app/[locale]/reports/weekly-limit/components/group-by-select.tsx
), only one option can be selected at a time; two options cannot be selected simultaneously.
apps/web/locales/ar.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
🪛 GitHub Actions: Knip Review - Cleanup Unused Code - WEB
apps/web/core/types/interfaces/user/invite.ts
[error] 1-1: Unused code detected in this file.
apps/web/core/components/common/team-member.tsx
[error] 1-1: Unused code detected in this file.
apps/web/core/components/features/teams/invite-modal.tsx
[error] 1-1: Unused code detected in this file.
🧰 Additional context used
🧠 Learnings (22)
📓 Common learnings
Learnt from: CREDO23
PR: ever-co/ever-teams#3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the `useTeamMemberCard` hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
apps/web/core/components/teams/invite/invite-email-dropdown.tsx (3)
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In apps/web/components/ui/sidebar.tsx
, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
apps/web/core/components/common/team-member.tsx (8)
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3328
File: apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx:66-78
Timestamp: 2024-11-13T05:17:33.527Z
Learning: In the UserTeamActivity
component (apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx
), the overflow-hidden
class is intentionally applied only to the first Tab.Panel
because the hidden overflow is needed when the sub-component has not yet been made visible. Applying overflow-hidden
to the other Tab.Panel
components is not required.
Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: NdekoCode
PR: #3199
File: apps/web/components/app-sidebar.tsx:49-55
Timestamp: 2024-10-28T17:16:03.609Z
Learning: In apps/web/components/app-sidebar.tsx
, hardcoded sample user data is intentionally included and should not be removed.
Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom
in apps/web/app/stores/team-tasks.ts
is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable
component (apps/web/components/pages/team/tasks/TaskTable.tsx
), we do not need to add error handling for task fetching when using useTeamTasks()
.
apps/web/core/components/pages/teams/team/team-members.tsx (9)
Learnt from: NdekoCode
PR: #3199
File: apps/web/components/app-sidebar.tsx:49-55
Timestamp: 2024-10-28T17:16:03.609Z
Learning: In apps/web/components/app-sidebar.tsx
, hardcoded sample user data is intentionally included and should not be removed.
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom
in apps/web/app/stores/team-tasks.ts
is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable
component (apps/web/components/pages/team/tasks/TaskTable.tsx
), we do not need to add error handling for task fetching when using useTeamTasks()
.
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: NdekoCode
PR: #3328
File: apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx:66-78
Timestamp: 2024-11-13T05:17:33.527Z
Learning: In the UserTeamActivity
component (apps/web/lib/features/team/user-team-card/user-team-card-activity.tsx
), the overflow-hidden
class is intentionally applied only to the first Tab.Panel
because the hidden overflow is needed when the sub-component has not yet been made visible. Applying overflow-hidden
to the other Tab.Panel
components is not required.
apps/web/core/services/client/api/organizations/teams/invites/invite.service.ts (1)
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
apps/web/locales/nl.json (2)
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
apps/web/locales/he.json (2)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/core/hooks/organizations/teams/use-team-invitations.ts (1)
Learnt from: CREDO23
PR: #3532
File: apps/web/components/pages/team/tasks/DropdownMenuTask.tsx:20-21
Timestamp: 2025-01-21T18:44:28.130Z
Learning: In the Ever Teams application, task assignment operations require member information obtained through the useTeamMemberCard
hook, which needs the team member object as an argument. This member object is typically found by matching the current user's ID with the employee user ID in the active team's members list.
apps/web/core/hooks/roles/use-roles.ts (4)
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3887
File: apps/web/core/query/keys/index.ts:41-58
Timestamp: 2025-06-07T04:31:16.865Z
Learning: The team uses a progressive migration approach for React Query implementation, where query key infrastructure is added first before implementing the hooks/services that use them. This results in intentionally unused code during intermediate migration states.
Learnt from: CREDO23
PR: #3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
apps/web/locales/es.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/ru.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/it.json (3)
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
apps/web/locales/bg.json (1)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
apps/web/locales/zh.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/pl.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/pt.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
apps/web/core/components/features/teams/invite-form-modal.tsx (4)
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:14-19
Timestamp: 2024-10-25T15:16:53.869Z
Learning: In apps/web/components/ui/sidebar.tsx
, cookie configuration enhancements including secure
and httpOnly
flags, and making cookie name and max age configurable via environment variables, have already been implemented in previous commits.
apps/web/locales/fr.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/de.json (3)
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/locales/en.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
apps/web/core/components/features/teams/invite-modal.tsx (7)
Learnt from: CREDO23
PR: #3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In apps/web/lib/features/task/task-input.tsx
, prefer using useRef
over useState
for assignees
in the AssigneesSelect
component to prevent re-renders on change.
Learnt from: CREDO23
PR: #3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx
, within the ProjectDropDown
component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The onChange
function carries the parent state, and setSelected
maintains the selected state in the child component.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In apps/web/components/ui/sidebar.tsx
, modifications to the keyboard shortcut implementation within React.useEffect
can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: #3189
File: apps/web/components/ui/sidebar.tsx:14-19
Timestamp: 2024-10-25T15:16:53.869Z
Learning: In apps/web/components/ui/sidebar.tsx
, cookie configuration enhancements including secure
and httpOnly
flags, and making cookie name and max age configurable via environment variables, have already been implemented in previous commits.
Learnt from: NdekoCode
PR: #3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the TaskTable
component (apps/web/components/pages/team/tasks/TaskTable.tsx
), we do not need to add error handling for task fetching when using useTeamTasks()
.
Learnt from: NdekoCode
PR: #3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The favoriteTasksAtom
in apps/web/app/stores/team-tasks.ts
is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: #3392
File: apps/web/app/[locale]/reports/weekly-limit/components/group-by-select.tsx:42-51
Timestamp: 2024-12-05T09:04:08.049Z
Learning: In the GroupBySelect
component (apps/web/app/[locale]/reports/weekly-limit/components/group-by-select.tsx
), only one option can be selected at a time; two options cannot be selected simultaneously.
apps/web/locales/ar.json (3)
Learnt from: CREDO23
PR: #3309
File: apps/web/locales/es.json:335-337
Timestamp: 2024-11-11T23:24:14.299Z
Learning: When reviewing additions of new translation keys in apps/web/locales/
, ensure to verify whether the keys have been added to all relevant locale files before suggesting they are missing.
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/it.json:554-571
Timestamp: 2024-11-03T08:34:33.295Z
Learning: In the Italian localization (apps/web/locales/it.json
), use "Registro ore" as the translation for "timesheet" instead of "Foglio presenze".
Learnt from: Innocent-Akim
PR: #3225
File: apps/web/locales/de.json:549-551
Timestamp: 2024-11-03T08:12:30.164Z
Learning: In apps/web/locales/de.json
, the maintenance
section should remain in Dutch.
🪛 GitHub Actions: Knip Review - Cleanup Unused Code - WEB
apps/web/core/types/interfaces/user/invite.ts
[error] 1-1: Unused code detected in this file.
apps/web/core/components/common/team-member.tsx
[error] 1-1: Unused code detected in this file.
apps/web/core/components/features/teams/invite-modal.tsx
[error] 1-1: Unused code detected in this file.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: deploy
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (34)
apps/web/locales/bg.json (1)
1047-1047
: Translations Consistency VerifiedAll 13 locale files in
apps/web/locales/
now include bothTEAM_MEMBER_ROLE
andSELECT_ROLE
. The Bulgarian entries are accurate and placement is correct. No further action required.apps/web/core/components/teams/invite/invite-email-dropdown.tsx (1)
51-51
: Good styling improvement using relative units.The change from fixed pixel height (
h-[54px]
) to relative rem units (h-[3rem]
) is a positive improvement that:
- Provides better scalability with user font preferences
- Maintains consistent sizing relative to the base font size
- Follows modern CSS best practices for responsive design
apps/web/core/types/interfaces/user/invite.ts (1)
67-67
: Approve interface change & dismiss unused‐code alertThe new required
roleId: string
onIInviteRequest
correctly enforces role selection and is actively used in the invitation flow. Verified references include:
apps/web/core/services/client/api/organizations/teams/invites/invite.service.ts
(imported and used ininviteByEmails
)apps/web/core/types/schemas/user/invite.schema.ts
(commented as the source forIInviteRequest
)The pipeline’s “unused code” warning is a false positive—this interface is consumed by the invitation service. Everything looks good to merge.
apps/web/locales/nl.json (1)
1046-1046
: LGTM! Dutch translations are accurate and well-placed.The new localization keys for role selection functionality are correctly translated and placed in appropriate sections:
"TEAM_MEMBER_ROLE": "Teamlidrol"
in the form section for UI labels"SELECT_ROLE": "Selecteer een rol"
in the errors section for validation messagesThe Dutch translations are contextually appropriate and maintain consistency with the localization patterns used in other locale files.
Also applies to: 1075-1075
apps/web/core/components/pages/teams/team/team-members.tsx (2)
1-1
: LGTM: Import changes align with global state management approachThe replacement of
useAuthenticateUser
hook withuserState
atom is consistent with the PR's architectural shift towards centralized state management using Jotai atoms.Also applies to: 19-19
50-50
: LGTM: User access updated to use global stateThe change from hook-based user retrieval to
useAtomValue(userState)
properly implements the architectural shift while maintaining the same variable interface within the component.apps/web/core/services/client/api/organizations/teams/invites/invite.service.ts (1)
50-50
: LGTM: Role ID priority correctly updated for role selection featureThe change reverses the priority to respect explicitly provided
data.roleId
over the default employee role, which is essential for the role selection functionality. The fallback toemployeeRole.data.id
maintains backward compatibility.apps/web/locales/fr.json (2)
1049-1049
: LGTM: Accurate French translation for team member role labelThe translation "Rôle du membre de l'équipe" is grammatically correct and appropriately placed in the form section for UI labels.
1078-1078
: LGTM: Accurate French translation for role selection validationThe translation "Veuillez sélectionner un rôle" is the correct French validation message and is properly placed in the errors section.
apps/web/locales/en.json (2)
1049-1049
: LGTM: Clear English label for team member roleThe translation "Team member role" is concise and appropriate for form field labels.
1078-1078
: LGTM: Standard validation message for role selectionThe translation "Please select a role" is a clear and standard validation message for required role selection.
apps/web/locales/es.json (1)
1046-1048
: All locale files include theTEAM_MEMBER_ROLE
key
I’ve verified thatTEAM_MEMBER_ROLE
is defined in everyapps/web/locales/*.json
file. No further action needed.apps/web/locales/he.json (1)
1045-1047
: All locales includeTEAM_MEMBER_ROLE
Verified via a scan of allapps/web/locales/*.json
files—no instances of the key missing. No further action needed.apps/web/locales/it.json (2)
1075-1076
: Comma fix + new error key – LGTMThe trailing comma issue is resolved and the added error message (
"Seleziona un ruolo"
) reads naturally. No further action required.
1047-1047
: Translation approved and key propagation verified
- Confirmed that the new
TEAM_MEMBER_ROLE
key is present in every locale file underapps/web/locales/
.- The Italian string
"Ruolo del membro del team"
is accurate and consistent with existing translations.apps/web/locales/de.json (1)
1046-1046
: Translation approved
"Rolle des Teammitglieds"
is clear and grammatically correct.apps/web/locales/zh.json (2)
1047-1047
: 新增字段 OK
"团队成员角色"
conveys the meaning precisely. Good to go.
1075-1076
: 错误提示 OK
"请输入有效的电子邮箱"
/"请选择角色"
match the existing tone and terminology.apps/web/core/hooks/organizations/teams/use-team-invitations.ts (3)
98-99
: LGTM: Role ID properly added to invitation payloadThe
roleId
parameter is correctly added to the invitation service call, maintaining consistency with the existing payload structure.
222-222
: LGTM: Function signature updated to support role selectionThe
inviteUser
function signature correctly adds theroleId
parameter. This is a breaking change that aligns with the role selection feature requirements.
232-233
: LGTM: Role ID correctly passed to mutationThe
roleId
parameter is properly threaded through to the mutation call, completing the role selection flow from UI to backend.apps/web/locales/pt.json (2)
1047-1047
: LGTM: Portuguese translation for team member role labelThe translation "Função do membro da equipe" is appropriate for the team member role form field label.
1076-1076
: LGTM: Portuguese translation for role selection errorThe translation "Por favor, selecione uma função" correctly conveys the role selection validation message in Portuguese.
apps/web/core/hooks/roles/use-roles.ts (3)
1-1
: LGTM: Appropriate imports for role-based access controlThe new imports for
userState
andERoleName
are necessary for implementing admin-only access to roles data.Also applies to: 9-9
25-28
: LGTM: Proper admin role validationThe admin check correctly identifies users with ADMIN or SUPER_ADMIN roles, providing appropriate access control for role management functionality.
36-36
: LGTM: Security improvement with role-based query enablementRestricting role data fetching to admin users only is a good security practice. This ensures that only authorized users can access role information.
apps/web/locales/pl.json (2)
1046-1046
: LGTM: Polish translation for team member role labelThe translation "Rola członka zespołu" is appropriate for the team member role form field label in Polish.
1075-1075
: LGTM: Polish translation for role selection errorThe translation "Proszę wybrać rolę" correctly conveys the role selection validation message in Polish.
apps/web/locales/ar.json (1)
1055-1055
: LGTM! Arabic translations are correct.The added translations for role selection functionality are accurate and properly placed in their respective sections.
Also applies to: 1083-1084
apps/web/locales/ru.json (1)
1046-1046
: LGTM! Russian translations are accurate.The role selection translations are grammatically correct and consistent with the feature requirements.
Also applies to: 1074-1075
apps/web/core/components/features/teams/invite-form-modal.tsx (2)
96-97
: Function signature update looks good.The addition of
roleId
parameter tohandleInvite
properly implements the role selection feature.
119-123
: Proper role validation implementation.The validation ensures a role is selected before sending the invitation, with appropriate error messaging.
apps/web/core/components/features/teams/invite-modal.tsx (2)
87-99
: Good error handling implementation.The error handling properly covers both object-based errors and array messages from the API response.
1-1
: InviteModal usage verified – false positive in pipelineThe
InviteModal
component is imported and rendered inapps/web/core/components/teams/invite/invite-card.tsx
, confirming it isn’t unused:• apps/web/core/components/teams/invite/invite-card.tsx – contains both
import { InviteModal } from '@/core/components/features/teams/invite-modal';and JSX usage
<InviteModal … />Since the component is in use, the pipeline’s unused‐code warning can be ignored or the check adjusted. No changes to
invite-modal.tsx
are needed.
Please review these files and clean up the unused code. |
Please review these files and clean up the unused code. |
* build(deps): bump axios from 1.10.0 to 1.11.0 Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.11.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Merge pull request #3956 from ever-co/ETP-55-task-add-role-selection-admin-employee-when-sending-invitations [Feature] Add role selection admin / employee / manager when sending invitations * Feat etp 39/implement export functionality on time and activity page (#3954) * [Feature] Implement export functionality for time and activity reports - Added export options for CSV, XLSX, and PDF formats in the TimeActivityExportMenu component. - Introduced ExportProgressModal to track and display export progress. - Created utility functions for generating export filenames and handling file extensions. - Developed hooks for managing export progress and data transformation for export. - Implemented PDF generation for time and activity reports, including member-specific and general reports. - Enhanced filtering logic to support export functionality based on user permissions and selected filters. - Optimized performance settings for handling large datasets during export operations. * Enhance date range options in TimeActivity components - Renamed the 'All Times' range to 'Last Year' for better accuracy. - Added a new 'All Times' range that covers a wider span from five years ago to today. - Updated the TimeActivityExportMenu to use effective start and end dates, defaulting to the current month if not provided. - Improved date formatting and calculations for export options, including total hours, earnings, and average activity metrics in the export summary. * refactor(web): 'This Year' date range option and update loading state handling - Introduced a new predefined date range option labeled 'This Year' in the TimeActivity date range picker. - Updated the loading state management in the useTimeActivityStats hook to reflect the current loading status dynamically. * refactor(web): Updated the TimeActivityExportMenu component to disable CSV and XLSX - Removed console log statements in the TimeActivityPDF and useTimesheet hooks for cleaner code and improved performance. * fix: bots suggestions * refactor(web): Enhance TimeActivityExportMenu and useTimeActivityExport for improved data handling - Updated TimeActivityExportMenu to utilize new DailyActivityReport type, simplifying data structure handling. - Introduced type guards for distinguishing between new and legacy data structures in useTimeActivityExport. - Removed custom interfaces in favor of existing types, streamlining the codebase and improving maintainability. * refactor(web): Enhance MustBeAManager component for improved loading and redirection handling - Introduced useOrganizationTeams hook to manage team loading state. - Updated loading logic to ensure both user and team data are fully loaded before proceeding with authorization checks. - Added state management for redirection to improve user experience during access control checks. - Enhanced loading indicators to provide feedback during data fetching and redirection processes. * refactor(web): Improve useTimeActivityExport for better data handling - Updated the calculation of hourly rate to handle potential undefined values more gracefully. - Revised the activity level calculation to utilize actual data from employeeData, providing a more accurate representation. - Cleaned up comments for clarity and consistency in the codebase. * Fix/etp 61 member card dropdown shows restricted actions to unauthorized users (#3960) * fix(Web): user team card menu logic to correctly identify team creator role for member removal action * refactor(web): improve user team card menu logic to filter active menu items * feat(web): add ManagerIcon and CreatorIcon components; update UserInfo to display role icons * [Feature] Show rejected expired and other non accepted invitations in the pending list with clear status indicators (#3959) * map / add invitation status displays constants * add status badge on user invite card * update getTeamInvitation to fetch all invitations * show only invitations that are not accepted * clean up * add ai bot suggestions * invalidate team invitation data on mutation success * fix(web): Enhance progress bar color logic and improve task estimation handling - Added a neutral state color for the progress bar when no estimation exists. - Updated the task estimation calculation to return 0 when no estimation data is available, improving clarity in task statistics. - Adjusted layout in TeamOutstandingNotifications component for better spacing. * refactor(web): update styling for task filters and date range components - Adjusted class names in TaskFilter and TaskStatusFilter components for improved layout and consistency. - Modified height properties for dropdowns and date picker to enhance visual alignment. - Ensured proper spacing and margins for better user experience across task filtering UI. * [Optimization] Optimize team members update handlers | removeFromTeam , makeManager , unmakeManager (#3955) * refactor: optimize team role management and remove duplicated logic * add ai bot sugggestions * update yarn lock * Merge pull request #3963 from ever-co/fix-ETP-67-bug-web-add-manual-time-modal-unexpected-closure-poor-ux Fix etp 67 bug web add manual time modal unexpected closure poor ux * Merge pull request #3958 from ever-co/ETP-57-bug-pending-invitations-list-is-hidden-when-theres-only-one-team-member [Fix bug] Show pending invitations even when the team has only one member * Feat etp 68 task web performance optimization for user profile task component (#3966) * refactor(web): optimize user profile task component and pagination logic - Enhanced the UserProfileTask component by introducing a new TaskList subcomponent to reduce re-renders and improve performance. - Implemented memoization techniques to optimize task filtering and badge class name calculations. - Updated the useScrollPagination hook to handle item initialization and scrolling more efficiently, ensuring smoother user experience during pagination. * refactor(web): enhance user profile task component with virtualization and memoization - Introduced advanced memoization techniques for task filtering to optimize performance. - Implemented TanStack Virtual for efficient rendering of large task lists, improving responsiveness. - Updated the UserProfileTask component to support virtualization and dynamic task updates. - Added a new useMemoizedCache hook for better cache management in task filtering operations. * refactor(web): enhance task filtering and virtualization for improved performance - Optimized task filtering logic with intelligent caching and memoization techniques. - Implemented window-based virtualization for large task lists to enhance rendering performance. - Updated UserProfileTask and UserTeamCard components to support new virtualization features. - Enhanced useTaskVirtualization hook to automatically choose between container and window virtualization based on task count. * fix(web): update scrolling indicator styling in user profile tasks component - Adjusted the height property of the scrolling indicator for better visual consistency. - Maintained existing styles while enhancing the overall appearance in dark mode. * refactor(web): introduce constant for virtualization threshold in user team card - Added ITEMS_LENGTH_TO_VIRTUALIZED constant to define the threshold for enabling virtualization in task lists. - Updated UserTeamCard component to utilize the new constant for improved maintainability and clarity in virtualization logic. * fix(web): improve daily plans loading state handling and task filtering - Updated DailyPlanTaskInfoCell to adjust task info cell width for better layout. - Enhanced UserProfilePlans component to implement loading state logic, ensuring daily plans display correctly during data fetching. - Fixed synchronization issue in useDailyPlan hook by changing the dependency to prevent premature empty state. - Improved task filtering logic in useTaskFilter to correctly extract tasks from daily plans, enabling full functionality in the task filter system. * feat(web): enhance daily plan header with delete functionality and layout improvements - Integrated delete plan functionality into the PlanHeader component for better user experience. - Updated layout logic to conditionally display the delete button based on user permissions and plan mode. - Refactored task time calculations for improved readability and performance. - Enhanced task filtering and display logic in the FutureTasks and OutstandingFilterDate components to align with new header features. * refactor(web): optimize task rendering in OutstandingFilterDate component - Introduced useMemo and useCallback for improved performance in the OutstandingFilterDate component. - Created optimized style objects and rendering functions to reduce unnecessary re-renders. - Simplified task rendering logic by extracting it into a dedicated function, enhancing code readability and maintainability. - Adjusted styles in the SelectComponent for better layout consistency. * style(web): update task content width in daily plan components - Added taskContentClassName to AllPlans, FutureTasks, and PastTasks components to standardize task content width. - Enhanced layout consistency across daily plan components for improved user experience. * style(web): enhance layout consistency in daily plan components - Updated taskContentClassName in AllPlans, FutureTasks, and PastTasks components for standardized card width. - Improved layout consistency across daily plan components to enhance user experience. - Refactored UserTeamActivity component for better alignment and spacing in the activity display. * feat(web): implement virtualization for user tasks in UserWorkedTaskTab - Enhanced UserWorkedTaskTab component to support virtualization for improved performance with large task lists. - Introduced VirtualizedList component to handle rendering of tasks efficiently, reducing re-renders and optimizing memory usage. - Added logic to conditionally use virtualization based on task count, improving user experience during task navigation. - Updated task rendering logic to maintain layout consistency while leveraging virtualization features. * feat(web): enhance virtualization performance in UserWorkedTaskTab and VirtualizedList - Updated UserWorkedTaskTab to improve task rendering with a larger buffer size and enhanced scrolling indicator for better user experience. - Refactored VirtualizedList to utilize dynamic configuration for cache size and overscan multiplier, optimizing performance for varying list sizes. - Introduced adaptive buffer zones that respond to scroll speed, reducing white space and improving visual continuity during scrolling. - Preserved original spacing structure in rendered items to maintain layout consistency across components. * feat(web): implement shared virtualization cache and enhance VirtualizedList performance - Introduced a shared virtualization cache to improve performance across multiple instances of VirtualizedList, allowing for efficient data retrieval and rendering. - Enhanced VirtualizedList to support dynamic pagination for large datasets, optimizing rendering based on item count and scroll direction. - Implemented debounced cache warming and improved buffer zone calculations to reduce visual artifacts during scrolling. - Updated virtualization configuration to adaptively manage cache size and overscan multiplier, enhancing user experience with large lists. * feat(web): enhance task rendering and introduce lazy loading in UserWorkedTaskTab - Updated UserWorkedTaskTab to utilize LazyTaskCard for improved performance and reduced initial load time. - Implemented memoization techniques with useCallback and useMemo to optimize rendering and prevent unnecessary re-renders. - Added LazyUserWorkedTaskTab for dynamic import of user tasks, enhancing user experience with lazy loading. - Introduced TaskCardBlockSKeleton for consistent loading states across task components. - Refactored VirtualizedList to support flexible renderItem signatures, improving compatibility with various item rendering functions. * feat(web): add UserTeamActivity component with lazy loading and skeleton support - Introduced LazyUserTeamActivity for dynamic import, enhancing performance by reducing initial load time. - Added UserTeamActivitySkeleton for consistent loading states while the component is being fetched. - Updated UserTeamCard to utilize LazyUserTeamActivity, improving user experience with lazy loading. - Refactored imports in user-team-card-activity to streamline component usage. * feat(web): refactor component imports for optimized loading and performance - Added new optimized components for lazy loading, consolidating imports for better performance across various pages. - Replaced direct dynamic imports with centralized imports from optimized-components, enhancing code maintainability. - Introduced new Tabs component for improved tabbed navigation in UserTeamActivity, streamlining the user interface. - Updated package.json to include @radix-ui/react-tabs for tab functionality. * chore(deps): update @radix-ui/react-tabs to version 1.1.12 in yarn.lock * feat(web): refactor component imports for optimized loading and performance - Consolidated dynamic imports into centralized optimized components for improved performance across various pages. - Replaced direct dynamic imports with imports from optimized-components, enhancing code maintainability and reducing initial load times. - Updated multiple components including calendar, dashboard, kanban, reports, and settings to utilize the new optimized imports. - Improved user experience by ensuring consistent loading states through skeleton components. * style(web): enhance styling in daily plan components for improved layout - Updated AccordionContent styles in AllPlans, FutureTasks, OutstandingFilterDate, and PastTasks components to include consistent padding and background color. - Improved visual consistency across daily plan components, enhancing overall user experience. * fix: spelling errors * feat(web): refactor page-component for optimized lazy loading and component imports - Updated page-component to utilize lazy loading for various team-related components, enhancing performance and reducing initial load times. - Consolidated imports from optimized-components, improving code maintainability and ensuring consistent loading states with skeleton components. - Removed deprecated optimized-components file to streamline the codebase. * feat(web): enhance drag-and-drop functionality in OutstandingFilterDate component - Introduced local state management with useState and useEffect to handle drag-and-drop operations more effectively. - Updated rendering logic to utilize the new local state for improved performance and consistency. - Ensured that the accordion component only opens the first item, aligning behavior with other tabs for a better user experience. * feat(web): enhance shared virtualization cache with cleanup and error handling - Added a cleanup interval to manage expired cache entries and prevent memory leaks. - Implemented a destroy method to clear resources when no instances are left. - Introduced error handling during instance registration and unregistration to improve robustness. - Added cleanup on page unload to ensure proper resource management. * fix: bots suggestions * feat(web): introduce OptimizedTaskAccordion component for enhanced task display - Added OptimizedTaskAccordion to display tasks in an accordion format, showing the first five tasks directly and the remaining tasks in a collapsible section. - Implemented intelligent caching and virtualization for improved performance with large task lists. - Updated UserWorkedTaskTab to utilize the new OptimizedTaskAccordion for better organization of tasks. - Enhanced README documentation to include details about the new component and its features. * feat(web): implement optimized activity tabs for improved performance - Introduced new components for optimized activity tabs: OptimizedScreenshotsTab, OptimizedAppsTab, OptimizedVisitedSitesTab, and OptimizedTasksTab, leveraging intelligent caching to enhance performance during tab switches. - Updated UserTeamActivity to utilize the new optimized tabs, replacing legacy components for better organization and efficiency. - Created a custom hook, useOptimizedActivityTabs, to manage caching and data retrieval for tasks, screenshots, apps, and visited sites. - Enhanced caching strategies in use-time-daily-activity and use-time-slots hooks for improved data management and reduced recalculation on tab switches. * refactor(web): improve task filtering and caching mechanisms - Updated task filtering logic in UserProfileTask to enhance readability. - Modified useTaskFilterCache to utilize specific task types for better type safety. - Refactored useEnhancedVirtualization to prevent memory leaks by caching only data, not React components, and optimized cache cleanup to avoid infinite re-renders. - Introduced helper functions for cache management in useEnhancedVirtualization, improving performance and usability. * fix(web): update EmptyPlans logic to prevent display when active tasks are present - Enhanced EmptyPlans component to accept an optional title prop for custom messages. - Modified task list logic to prevent showing EmptyPlans when there are active tasks, improving user experience and reducing confusion in task-related tabs. * refactor(web): enhance virtualization and error handling in task components (#3970) - Updated OptimizedTaskAccordion to improve task rendering and virtualization performance. - Modified VirtualizedList to include safety checks for virtual items, preventing runtime errors. - Implemented better error handling and validation in useTanStackVirtual and useEnhancedVirtualization hooks to ensure robust performance with large datasets. - Adjusted virtualization settings to optimize rendering and scrolling behavior, enhancing user experience. * [Feature] Support invitation-based onboarding for users without a workspace (#3961) * Add all necessary keys for i18 * fix auth layout * add registration form for invitee without wrkspc * fix build issues * add invitation expired message card * add workspace not found message card * add for validation & form submit handler * show conditionally the message card or complete registration form * redirect user to home page or create new workspace * update the invite callback URL -> accept-invite * support validateByCode & validateByToken query keys for invitations api calls * update invite schamas * redirect user to home page after accepting the invite * update user schema * add accept invite skelethon * add conditionnally tenantId and organizationId to the body * update i18 keys for invitation registration form * update i18 files * set password input auto complete to 'off' * add user email in the payload when accepting the invite * add a workspace loader after accept invite was successfull * clean up the accept invite page component * add on success callback for accept invitation mutation * fix spelling errors * fix build issues * update invite schemas * build(deps): bump linkifyjs from 4.3.1 to 4.3.2 (#3967) Bumps [linkifyjs](https://github.com/nfrasser/linkifyjs/tree/HEAD/packages/linkifyjs) from 4.3.1 to 4.3.2. - [Release notes](https://github.com/nfrasser/linkifyjs/releases) - [Changelog](https://github.com/nfrasser/linkifyjs/blob/main/CHANGELOG.md) - [Commits](https://github.com/nfrasser/linkifyjs/commits/v4.3.2/packages/linkifyjs) --- updated-dependencies: - dependency-name: linkifyjs dependency-version: 4.3.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump form-data from 4.0.2 to 4.0.4 in /apps/mobile (#3968) Bumps [form-data](https://github.com/form-data/form-data) from 4.0.2 to 4.0.4. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](form-data/form-data@v4.0.2...v4.0.4) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [Fix bug] Fix UI update for subscribed components after task mutation (#3969) * fix(tasks): update UI after task mutation * return the cache data shape after computing new cache data * fix task estimate update after mutation * fix types * fix build isses * add ai bot suggestions --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thierry CH. <thierrybakera12@gmail.com> Co-authored-by: Arick Bulakali <85836702+NdekoCode@users.noreply.github.com> Co-authored-by: NdekoCode <arickbulakali@gmail.com>
Description
✅ Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Localization
Style