Skip to content

Add direct link for PAT generate#313

Open
firoziya wants to merge 1 commit into
GitMetricsLab:mainfrom
firoziya:patch-2
Open

Add direct link for PAT generate#313
firoziya wants to merge 1 commit into
GitMetricsLab:mainfrom
firoziya:patch-2

Conversation

@firoziya
Copy link
Copy Markdown

@firoziya firoziya commented May 18, 2026

Feature #305 Done

Related Issue


Description

Add GItHub PAT generate direct link on the Page


Screenshots (if applicable)

image

Type of Change

  • New feature
  • Code style update

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Clear all filters" button for easier filter management.
    • Enhanced empty-state messaging with contextual information.
  • Bug Fixes

    • Fixed repository filtering to be case-insensitive.
  • Refactor

    • Redesigned Tracker page with improved card-based layout, collapsible filter headers, and enhanced table styling.
    • Updated status labels with improved visual design.
    • Added skeleton loading states and improved error messaging.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 62f0dec
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0a9a0bc893ec00083279eb
😎 Deploy Preview https://deploy-preview-313--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

The 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.

Changes

Tracker Page UI and Filtering Redesign

Layer / File(s) Summary
Dependencies and UI state setup
src/pages/Tracker/Tracker.tsx
Import reorganization for octicons and expansion of MUI component imports (Chip, Card, Divider, Stack, IconButton, Tooltip, Fade, and icons); addition of two new UI state variables for token visibility and filter panel visibility.
Filter reset and data filtering logic
src/pages/Tracker/Tracker.tsx
Introduces clearFilters handler to reset all filter state, refactors formatDate to use locale-based formatting, updates filterData to handle merged/closed/open status branches, adds date/title filtering, and implements case-insensitive repository matching.
Status rendering helpers and derived data
src/pages/Tracker/Tracker.tsx
Introduces getStatusIcon helper to select appropriate icons for PR (merged/closed/open) vs. issue (closed/open) states, adds getStatusChip function to render MUI chips with status-mapped colors, computes derived data (currentFilteredData, totalCount), derives hasActiveFilters flag, and begins the render structure with card-based auth form and collapsible filter panel.
Tabs and filter controls redesign
src/pages/Tracker/Tracker.tsx
Rebuilds the Tabs area to display Issues/Pull Requests with octicon + count chips, updates the state filter Select control to use FormControl/InputLabel with improved chip-based styling while preserving underlying filter logic.
Table and content area card-based layout
src/pages/Tracker/Tracker.tsx
Replaces the error/loading/empty/table sections with card-based structure: combined auth/data error Alert, skeleton loading rows in a bordered card, context-aware "No Data Found" card that uses hasActiveFilters, sticky-header table with updated row cells (status icon + title link, repository chip, status chip, formatted date with Tooltip), and pagination within the new layout.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

gssoc25, level2, quality:clean

Poem

🐰 The page hops fresh in cards so bright,
With filters cleared and icons right,
Chips and status, tables sticky,
Data flows smooth, never tricky,
Tracker bounds on UI's might!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Significant discrepancy exists: the PR title and description indicate a PAT link update, but the raw_summary shows extensive Tracker.tsx UI refactoring unrelated to adding a direct PAT link. Clarify the actual changes made—either the title/description should match UI refactoring changes, or the code changes should only implement the PAT link feature from issue #305.
Out of Scope Changes check ⚠️ Warning The raw_summary describes major UI refactoring of Tracker.tsx (Chip components, card layouts, filter logic) that appears unrelated to the stated objective of adding a PAT generation link. Review whether the extensive Tracker.tsx refactoring is necessary for issue #305 or represents scope creep; limit changes to PAT link update if unrelated.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title directly describes the main change: adding a direct link for PAT generation, which aligns with issue #305's objective.
Description check ✅ Passed The description includes the required sections (Related Issue, Description, Screenshots, Type of Change) and clearly references issue #305 with appropriate context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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 win

End-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 using setUTCHours(23, 59, 59, 999) instead of setHours() 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17610 and 62f0dec.

📒 Files selected for processing (1)
  • src/pages/Tracker/Tracker.tsx

Comment on lines +301 to +307
<IconButton
onClick={() => setShowToken(!showToken)}
edge="end"
size="small"
>
{showToken ? <VisibilityOff /> : <Visibility />}
</IconButton>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 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.tsx

Repository: 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.

Suggested change
<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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature Enhancement : Improve UX by redirecting the PAT link directly to the GitHub Token Generation page

1 participant