Skip to content

Conversation

@ShivaGupta-14
Copy link
Contributor

Description

  • Add isOverdue utility function to tasks-utils.ts for shared usage
  • Update ReportsView to categorize pending tasks with past due dates as overdue
  • Add overdue bar (red #F33434) to ReportChart component
  • Update Tasks.tsx to import isOverdue from shared utility
  • Add comprehensive test coverage for overdue categorization

Categorization logic:

  • status === 'completed' -> Completed (pink)
  • status === 'pending' && due < today -> Overdue (red)
  • status === 'pending' && (due >= today || no due) -> Ongoing (blue)

Fixes: #341

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Additional Notes

Video:

Screen.Recording.2025-12-30.at.1.16.45.AM.mov

- Add isOverdue utility function to tasks-utils.ts for shared usage
- Update ReportsView to categorize pending tasks with past due dates as overdue
- Add overdue bar (red #F33434) to ReportChart component
- Update Tasks.tsx to import isOverdue from shared utility
- Add comprehensive test coverage for overdue categorization

Categorization logic:
- status === 'completed' -> Completed (pink)
- status === 'pending' && due < today -> Overdue (red)
- status === 'pending' && (due >= today || no due) -> Ongoing (blue)

Fixes: CCExtractor#341
@github-actions
Copy link

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the mockData and add test for overdue bar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update test and add new test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add test case for isOverdue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new overdue bar (red color)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

counting overdue task correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move isOverdue function to this and make it a shared utility, DRY principle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import isOverdue function from shared utility and removes duplicate code

Copy link
Contributor Author

@ShivaGupta-14 ShivaGupta-14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self review done! ready for review

@its-me-abhishek its-me-abhishek merged commit 38bc4f5 into CCExtractor:main Dec 29, 2025
5 checks passed
@ShivaGupta-14 ShivaGupta-14 deleted the feat/341-add-overdue-category branch December 29, 2025 20:16
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.

feat(reports): Add "Overdue" as a third category in Reports charts

2 participants