Skip to content

Stage #3971

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

Merged
merged 19 commits into from
Aug 2, 2025
Merged

Stage #3971

merged 19 commits into from
Aug 2, 2025

Conversation

evereq
Copy link
Member

@evereq evereq commented Aug 2, 2025

🚀 Pull Request Title

A short and clear title that describes what this PR does.

Example:

Add Retry, Cache, and Logging Features to API Service

Description

Please describe what you did, and why.

  • What problem or feature does this PR address?
  • What changes were made?
  • Why are these changes useful?

Example:

This PR adds advanced features to the API request system:

  • Retry failed requests with exponential delay
  • Cache GET responses with TTL
  • Log all requests and responses
  • Allow cancelling requests

These features improve reliability, performance, and debugging.

What Was Changed

Major Changes

Example:

Here are the major changes in that his PR adds

  • New CookieManagement class for cookie handling
  • Cancel requests using AbortController
  • Automatically inject tenant and organization headers

Minor Changes

Example:

Here are the minor changes in that his PR adds

  • Update tast-status component style
  • Work on the theme toggler
  • Remove unused imports

How to Test This PR

Please explain clearly how to test the changes locally:

Example:

  1. Run the app with yarn web:dev
  2. Open the browser at http://localhost:3030
  3. Try navigating to a page that uses API calls (e.g., /tasks)
  4. Check:
  • Logs in the console
  • Retry works on failed requests
  • Cache works on repeated GET requests
  • Errors are handled properly
  • Cancelling navigation cancels requests
  • Remove unused imports

If this PR affects UI:

  • Include before and after screenshots
  • Explain any design or UX changes

Screenshots (if needed)

Before After
(Add screenshot) (Add screenshot)

You can also add videos or logs here.

Previous screenshots

Please add here videos or images of the previous status

Current screenshots

Please add here videos or images of the current (new) status

Related Issues

Please list related issues, tasks or discussions:

Example:

  • Closes #12343434344
  • Related to #567834232

Type of Change

  • Bug fix (fixes a problem)
  • New feature (adds functionality)
  • Breaking change (requires changes elsewhere)
  • Documentation update

✅ Checklist

Please confirm you did the following before asking for review:

  • My code follows the project coding style
  • I reviewed my own code and added comments where needed
  • I tested my changes locally
  • I updated or created related documentation if needed
  • No new warnings or errors are introduced

Notes for the Reviewer (Optional)

Add here any context, help, or known issues for the person reviewing:

  • Example: “The retry logic uses setTimeout for now – may need refinement.”
  • Example: “PostHog is disabled in dev, enable it in .env to test logs.”

⚠️⚠️⚠️ Reviewers Suggested

  • @evereq for architecture validation
  • @ndekocode for integration review
  • @Innocent-Akim for auth and cookie handling and assistance
  • @AnicetFantomas and @Sergemuhundu for mobile app and some web issues
  • @Cedric921 and @GloireMutaliko21 for complex issues

dependabot bot and others added 19 commits July 23, 2025 17:06
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] <[email protected]>
….11.0

build(deps): bump axios from 1.10.0 to 1.11.0
…admin-employee-when-sending-invitations

[Feature] Add role selection admin / employee / manager when sending invitations
…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.
…zed 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
… 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
…n 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.
- 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.
… , makeManager , unmakeManager (#3955)

* refactor: optimize team role management and remove duplicated logic

* add ai bot sugggestions

* update yarn lock
…ws-green-color-when-no-estimation-data-exists

[Web]-Fix: Enhance progress bar color logic and improve task estimation handling
…ime-modal-unexpected-closure-poor-ux

Fix etp 67 bug web add manual time modal unexpected closure poor ux
…nts (#3964)

- 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.
…list-is-hidden-when-theres-only-one-team-member

[Fix bug] Show pending invitations even when the team has only one member
…omponent (#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.
…onents (#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.
…kspace (#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
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#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
Copy link
Contributor

coderabbitai bot commented Aug 2, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@CLAassistant
Copy link

CLAassistant commented Aug 2, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ evereq
✅ NdekoCode
✅ CREDO23
❌ dependabot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@evereq evereq merged commit b4dccec into stage Aug 2, 2025
22 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants