Skip to content

Added the Percentage#203

Closed
Rustix69 wants to merge 0 commit into
CCExtractor:mainfrom
Rustix69:feat/percentage-tracker-filter
Closed

Added the Percentage#203
Rustix69 wants to merge 0 commit into
CCExtractor:mainfrom
Rustix69:feat/percentage-tracker-filter

Conversation

@Rustix69
Copy link
Copy Markdown
Contributor

Description

Added completion percentage display in Project and Tag filter dropdowns to help users quickly track task progress at a glance.

Key Features:

  • Displays completion stats in format: {completed}/{total} ({percentage}%)
  • Shows percentage for each project/tag directly in the dropdown menu
  • Automatically updates when tasks are completed, deleted, or synced
  • Performance optimized using useMemo hooks
  • Excludes deleted tasks from calculations
  • Fully backward compatible

Screenshot

image

Files Modified:

  • frontend/src/components/utils/types.ts - Added FilterStats interface

  • frontend/src/components/HomeComponents/Tasks/tasks-utils.ts - Added calculation functions

  • frontend/src/components/ui/multiSelect.tsx - Enhanced to display stats

  • frontend/src/components/HomeComponents/Tasks/Tasks.tsx - Integrated stats calculation

  • Fixes: #(replace_with_the_issue_fixed)

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend) - N/A (no backend changes)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable - N/A (feature addition, existing tests pass)
  • Verified all tests pass
  • Updated documentation, if needed - N/A (UI enhancement, self-explanatory)

Additional Notes

Implementation Details:

  • Stats are calculated dynamically using calculateProjectStats() and calculateTagStats() utility functions
  • Percentage is rounded to 1 decimal place for precision
  • Deleted tasks are excluded from both completed and total counts
  • Uses React useMemo for efficient recalculation only when tasks/filters change
  • Clean, maintainable code with JSDoc comments
  • Zero linter errors
  • Successfully builds without warnings (except existing chunk size warning)

return Math.abs(hash).toString(36);
};

/**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

seems to be too convoluted. the UI elements inside ./ui must remain as - is to Avoid breaking changes. imo.. this feature can be implemented via Tailwind Classes, and a simple Round function inside that

@its-me-abhishek its-me-abhishek self-requested a review November 19, 2025 15:29
@Rustix69 Rustix69 closed this Nov 25, 2025
@Rustix69 Rustix69 force-pushed the feat/percentage-tracker-filter branch from d6536df to 28e2825 Compare November 25, 2025 15:30
@Rustix69 Rustix69 deleted the feat/percentage-tracker-filter branch November 25, 2025 15:31
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.

Show Completion Percentage Next to Filters in Dropdown

2 participants