-
Notifications
You must be signed in to change notification settings - Fork 200
task done #529
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
Closed
Closed
task done #529
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,175 @@ | ||
| # Daily Activity Reminder System - Feature Documentation | ||
|
|
||
| ## Overview | ||
|
|
||
| The Daily Activity Reminder System is a new enhancement to the GitHub Tracker dashboard that motivates users to maintain consistent contribution streaks. It provides real-time insights into your GitHub activity, tracks contribution streaks, and displays motivational reminders to encourage daily contributions. | ||
|
|
||
| ## Features | ||
|
|
||
| ### 1. **Daily Activity Status** | ||
| - **Real-time Activity Tracking**: Monitors commits, pull requests, issues, and other GitHub activities throughout the day | ||
| - **Activity Count**: Shows how many contributions you've made today | ||
| - **Last Activity Date**: Displays when your last contribution was | ||
|
|
||
| ### 2. **Contribution Streak** | ||
| - **Streak Counter**: Tracks consecutive days with GitHub contributions | ||
| - **Visual Indicator**: 🔥 Flame emoji indicates active streaks | ||
| - **Risk Detection**: Alerts you when your streak is at risk (if you haven't contributed today) | ||
| - **Motivational Messages**: | ||
| - 1-day streak: 🎯 Keep it going! | ||
| - 7-day streak: 🔥 You're on a roll! | ||
| - 30-day streak: 🚀 Amazing consistency! | ||
| - 100+ days: 👑 Legendary contributor! | ||
|
|
||
| ### 3. **Productivity Score** | ||
| - **Dynamic Calculation**: Based on daily activity metrics | ||
| - **Weighted System**: | ||
| - 25% each for commits, PRs, merges, and issues | ||
| - Bonus points for consecutive streaks (7, 30, 100+ days) | ||
| - **Visual Progress Bar**: Shows score with color coding: | ||
| - Red: 0-50% (Needs improvement) | ||
| - Orange: 50-75% (Good) | ||
| - Green: 75-100% (Excellent) | ||
|
|
||
| ### 4. **Motivational Reminders** | ||
| - **Inactivity Alerts**: Reminds you when you haven't contributed today | ||
| - **Activity-Specific Messages**: | ||
| - 📌 "Time to make your first contribution today" | ||
| - 🚀 "You haven't committed today" | ||
| - 💻 "No pull requests opened today" | ||
| - 📝 "Consider creating or working on an issue" | ||
| - **Positive Reinforcement**: Congratulatory messages when you're active | ||
|
|
||
| ### 5. **Activity Breakdown** | ||
| - **Visual Status Indicators**: Quick checklist of today's contributions: | ||
| - Commits | ||
| - Pull Requests Opened | ||
| - Pull Requests Merged | ||
| - Issues Created | ||
| - **Color-Coded**: Green checkmarks for completed activities, gray for pending | ||
|
|
||
| ## How It Works | ||
|
|
||
| ### Data Collection | ||
| The system analyzes GitHub activity data from the last 30 days by default and identifies: | ||
| - **Commits**: Estimated from PR creation activity | ||
| - **Pull Requests**: Tracked separately as opened and merged | ||
| - **Issues**: Issues created or interacted with | ||
| - **Daily Activity**: All contributions made within a 24-hour period | ||
|
|
||
| ### Streak Calculation | ||
| - Streaks are calculated by checking for consecutive days with at least one contribution | ||
| - A streak requires activity every day to maintain continuity | ||
| - If you miss a day, your streak resets | ||
|
|
||
| ### Display Logic | ||
| The Activity Reminder appears on the Tracker page when: | ||
| 1. You've successfully fetched GitHub data (entered username and token) | ||
| 2. Data has been loaded (not in loading state) | ||
| 3. You have at least some GitHub activity (issues or PRs) | ||
|
|
||
| ## Using the Feature | ||
|
|
||
| ### Step 1: Access the Tracker | ||
| Navigate to the **Tracker** page in the GitHub Tracker application. | ||
|
|
||
| ### Step 2: Authenticate | ||
| 1. Enter your GitHub username | ||
| 2. Enter your Personal Access Token (PAT) | ||
| 3. Click "Fetch Data" | ||
|
|
||
| ### Step 3: View Your Activity | ||
| Once data is loaded, the Daily Activity Status section appears above the data table with: | ||
| - Today's contribution count | ||
| - Current streak | ||
| - Productivity score | ||
| - Motivational reminders | ||
| - Activity breakdown | ||
|
|
||
| ### Step 4: Respond to Reminders | ||
| Use the motivational reminders as guidance to: | ||
| - Plan your contributions for the day | ||
| - Maintain your contribution streak | ||
| - Reach productivity goals | ||
|
|
||
| ## Token Requirements | ||
|
|
||
| **Authentication with a Personal Access Token (PAT) is required** to view and use the ActivityReminder UI. The component is only displayed when you have successfully authenticated with both a GitHub username and a valid PAT. | ||
|
|
||
| Your PAT should have the following permissions: | ||
| - `public_repo` (access to public repositories) | ||
| - `repo` (access to private repositories - if tracking private repos) | ||
|
|
||
| Without valid authentication, the Daily Activity Status reminder widget will not be accessible. | ||
|
|
||
| ## Technical Details | ||
|
|
||
| ### Components | ||
| - **`useGitHubActivity` Hook**: Analyzes activity data and returns activity status | ||
| - **`ActivityReminder` Component**: Displays the reminder UI with all statistics | ||
| - **Utility Functions** (`activityReminders.ts`): | ||
| - `generateReminders()` - Creates motivational alert messages | ||
| - `generateStreakData()` - Calculates streak and generates streak messages | ||
| - `getActivitySummary()` - Generates text summary of daily activities | ||
| - `getActivityColor()` - Returns color coding based on activity level | ||
| - `calculateProductivityScore()` - Computes dynamic productivity score (0-100%) | ||
| - `getMotivationLevel()` - Determines motivation tier based on streak | ||
|
|
||
| ### API Integration | ||
| The feature leverages the existing GitHub API integration through: | ||
| - `useGitHubData` hook for fetching issues and PRs | ||
| - `useGitHubAuth` hook for authentication | ||
| - Octokit client for GitHub API requests | ||
|
|
||
| ### Data Processing | ||
| - Activity timestamps are extracted from GitHub API responses | ||
| - Daily activity is compared against the current date (00:00-23:59) | ||
| - Streak calculation traverses activity history backward in time | ||
| - Scores are calculated based on weighted activity metrics | ||
|
|
||
| ## Limitations | ||
|
|
||
| 1. **Commit Detection**: Direct commit data requires the `/repos/{owner}/{repo}/commits` endpoint, which is not currently used. Commits are estimated from PR activity. | ||
| 2. **Historical Data**: Only analyzes the last 30 days of issues and PRs due to GitHub API pagination limits. | ||
| 3. **Rate Limiting**: GitHub API has rate limits (60 requests/hour for unauthenticated, 5000/hour with token). | ||
| 4. **Timezone**: Activity is determined based on UTC timezone (when GitHub timestamps are recorded). | ||
|
|
||
| ## Future Enhancements | ||
|
|
||
| Potential improvements for future versions: | ||
| - [ ] Weekly productivity heatmap | ||
| - [ ] Monthly contribution statistics | ||
| - [ ] Achievement badges (First commit, 100-day streak, etc.) | ||
| - [ ] Custom notification preferences | ||
| - [ ] Email/browser notifications for streak reminders | ||
| - [ ] Integration with GitHub contributions graph | ||
| - [ ] Detailed contribution analytics | ||
| - [ ] Goal setting and tracking | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Activity Reminder not showing | ||
| - Ensure you've entered your GitHub username and token | ||
| - Click "Fetch Data" to load your GitHub activity | ||
| - Check that you have at least one issue or PR in your GitHub history | ||
|
|
||
| ### Streak not updating | ||
| - Wait for the page to fully load data | ||
| - The streak is calculated based on your GitHub activity timestamps | ||
| - Ensure your GitHub activity has timestamps from recent days | ||
|
|
||
| ### Incorrect productivity score | ||
| - Scores are recalculated based on daily activity (commits, PRs, issues) | ||
| - The score includes bonus points for longer streaks | ||
| - Refresh the page to recalculate with latest data | ||
|
|
||
| ## Contact & Feedback | ||
|
|
||
| If you encounter issues or have suggestions for improvements, please: | ||
| 1. Check the existing GitHub issues | ||
| 2. Create a new issue with detailed information | ||
| 3. Include screenshots if relevant | ||
|
|
||
| --- | ||
|
|
||
| **Happy contributing! Keep your streak alive!** 🔥 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 54
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 193
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 50700
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 8203
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 17521
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 2688
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 6979
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 8198
🏁 Script executed:
Repository: GitMetricsLab/github_tracker
Length of output: 10694
Correct the “last 30 days by default” documentation
ACTIVITY_REMINDER_FEATURE.mdsays the feature analyzes “the last 30 days by default”, but the code does not enforce any fixed 30-day lookback in GitHub queries:useGitHubDataonly appliescreated:>=startDate/created:<=endDatewhen filters are provided, whilesrc/pages/Tracker/Tracker.tsxcallsfetchData(username, page + 1, ROWS_PER_PAGE)with no filters.issues/prsclient-side (default is empty), so this is not a hard-coded “last 30 days” window.Tracker.tsx(username && !loading && (issues.length > 0 || prs.length > 0)).🤖 Prompt for AI Agents