Add direct link for PAT generate#313
Conversation
Feature GitMetricsLab#305 Done
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe Tracker page undergoes a comprehensive UI refactoring that modernizes the layout with MUI card-based components, adds intelligent filtering controls, and introduces status-aware rendering with chips and icons. Filter reset functionality, case-insensitive repository matching, and richer date formatting enhance usability, while the redesigned table with sticky headers and skeleton loaders improves data display. ChangesTracker Page UI and Filtering Redesign
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/Tracker/Tracker.tsx (1)
162-165:⚠️ Potential issue | 🟠 Major | ⚡ Quick winEnd-date filter currently excludes items created later on the selected end date.
new Date(endDate)from the HTML5 date input resolves to 00:00:00 UTC, so items created after midnight on the end date are excluded. Consider usingsetUTCHours(23, 59, 59, 999)instead ofsetHours()to avoid timezone-dependent behavior, or add one full day and use strict less-than comparison instead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/Tracker/Tracker.tsx` around lines 162 - 165, The end-date filter using new Date(endDate) excludes items later on that day because the input date is midnight UTC; update the filter in Tracker (where filtered, endDate and item.created_at are used) to compare against an end-of-day timestamp instead of midnight—either convert new Date(endDate) to endOfDay via setUTCHours(23,59,59,999) (preferred to avoid local timezone shifts) or add one day to the endDate and change the comparison to item.created_at < nextDay; ensure the comparison uses the same Date conversion for item.created_at and the adjusted end timestamp.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/Tracker/Tracker.tsx`:
- Around line 301-307: Add accessible labeling and pressed state to the token
visibility toggle: update the IconButton (the component using showToken and
setShowToken with Visibility/VisibilityOff) to include an aria-label that
describes the action (e.g., "Toggle token visibility" or context-specific "Show
token" / "Hide token") and add aria-pressed={showToken} so assistive tech can
read the current state; ensure the aria-label reflects the current state if you
prefer dynamic labels, and keep the onClick handler using setShowToken(...)
as-is.
---
Outside diff comments:
In `@src/pages/Tracker/Tracker.tsx`:
- Around line 162-165: The end-date filter using new Date(endDate) excludes
items later on that day because the input date is midnight UTC; update the
filter in Tracker (where filtered, endDate and item.created_at are used) to
compare against an end-of-day timestamp instead of midnight—either convert new
Date(endDate) to endOfDay via setUTCHours(23,59,59,999) (preferred to avoid
local timezone shifts) or add one day to the endDate and change the comparison
to item.created_at < nextDay; ensure the comparison uses the same Date
conversion for item.created_at and the adjusted end timestamp.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a7703031-fd65-4b7b-a1d2-e5ca2e380a25
📒 Files selected for processing (1)
src/pages/Tracker/Tracker.tsx
| <IconButton | ||
| onClick={() => setShowToken(!showToken)} | ||
| edge="end" | ||
| size="small" | ||
| > | ||
| {showToken ? <VisibilityOff /> : <Visibility />} | ||
| </IconButton> |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify token toggle IconButton lacks an explicit aria-label in current code.
rg -n -C3 'onClick=\{\(\) => setShowToken\(!showToken\)\}' src/pages/Tracker/Tracker.tsxRepository: GitMetricsLab/github_tracker
Length of output: 381
Add accessible label and pressed state to token visibility toggle.
The IconButton lacks aria-label and aria-pressed attributes. Assistive technology users cannot identify the button's action or its current state.
Fix
<InputAdornment position="end">
<IconButton
onClick={() => setShowToken(!showToken)}
+ aria-label={showToken ? "Hide personal access token" : "Show personal access token"}
+ aria-pressed={showToken}
edge="end"
size="small"
>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <IconButton | |
| onClick={() => setShowToken(!showToken)} | |
| edge="end" | |
| size="small" | |
| > | |
| {showToken ? <VisibilityOff /> : <Visibility />} | |
| </IconButton> | |
| <IconButton | |
| onClick={() => setShowToken(!showToken)} | |
| aria-label={showToken ? "Hide personal access token" : "Show personal access token"} | |
| aria-pressed={showToken} | |
| edge="end" | |
| size="small" | |
| > | |
| {showToken ? <VisibilityOff /> : <Visibility />} | |
| </IconButton> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/Tracker/Tracker.tsx` around lines 301 - 307, Add accessible
labeling and pressed state to the token visibility toggle: update the IconButton
(the component using showToken and setShowToken with Visibility/VisibilityOff)
to include an aria-label that describes the action (e.g., "Toggle token
visibility" or context-specific "Show token" / "Hide token") and add
aria-pressed={showToken} so assistive tech can read the current state; ensure
the aria-label reflects the current state if you prefer dynamic labels, and keep
the onClick handler using setShowToken(...) as-is.
Feature #305 Done
Related Issue
Description
Add GItHub PAT generate direct link on the Page
Screenshots (if applicable)
Type of Change
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Refactor