Skip to content

feat(tracker): enhance UI improved header, filters, and dark-mode f…#335

Open
swati-204 wants to merge 2 commits into
GitMetricsLab:mainfrom
swati-204:feat/tracker-ui
Open

feat(tracker): enhance UI improved header, filters, and dark-mode f…#335
swati-204 wants to merge 2 commits into
GitMetricsLab:mainfrom
swati-204:feat/tracker-ui

Conversation

@swati-204
Copy link
Copy Markdown

@swati-204 swati-204 commented May 19, 2026

Related Issue

  • Closes: #<256>

Description

Polished the Tracker UI: hero/header with gradient, descriptive copy, and an overview panel showing loaded vs visible items.
Added a visibility progress bar and active-filter summary to help users understand filter impact.
Improved authentication card: helper link to GitHub PAT docs, rounded inputs, clearer fetch button state.
Refined filter bar and empty states clearer messaging and a prominent Clear action.
Table improvements: smoother hover affordance, row click opens item in GitHub, rounded repo chips, and clearer state badges.
Resolved upstream merge conflicts and fixed duplicate/garbled imports.
All functional logic (hooks, data fetching) remains unchanged; only src/pages/Tracker/Tracker.tsx was modified.

How Has This Been Tested?

Started dev server (npm run dev) and confirmed Vite serves the app without parse/build errors.

Visually inspected the Tracker page in both light and dark themes to confirm contrast and layout.

Exercised filters (search, repo, date range), tab switching (Issues / Pull Requests), and token helper link.

Verified no TypeScript/JSX diagnostics for the touched file.

Screenshots (if applicable)

image image image

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • New Features

    • Advanced filtering: issue/PR state, title search, repo substring, and date range.
    • Improved data view: active-filter counts, progress indicators, and enhanced stats cards.
    • Table enhancements: clickable rows (open in new tab), status icons/chips, outlined repo chips, and locale-formatted dates with tooltips.
  • UI / Refactor

    • Redesigned Tracker layout with Material-styled hero, auth card, tabs, alerts, loading indicators, and skeleton states.
    • Clear filtering flow with conditional “Clear” action and contextual empty/no-data messaging.

Review Change Stack

Copilot AI review requested due to automatic review settings May 19, 2026 15:50
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 8135809
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0d3256f202b60008bdb792
😎 Deploy Preview https://deploy-preview-335--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 19, 2026

📝 Walkthrough

Walkthrough

Redesign of the Tracker page: adds StatCard, expanded Material UI components, memoized filter logic for issues/PRs, new filter UI state (status, title, repo, dates, hasFetched), themed hero/auth cards, alerts, tabs, filter bar, conditional content states, and an enhanced results table with chips, tooltips, and row navigation.

Changes

Tracker Page UI Redesign

Layer / File(s) Summary
Styling and Component Infrastructure
src/pages/Tracker/Tracker.tsx
React import adds useMemo. Material UI and icon imports expanded (progress, alerts, tabs, form controls, typography, chips, tooltips, skeletons, layout helpers). A reusable StatCard component is added and theme-based dark-mode styling (isDark) is computed.
Filter State and UI Layout Redesign
src/pages/Tracker/Tracker.tsx
Adds filter UI state (issue state, PR state, title search, repo substring, from/to dates) and hasFetched. Introduces memoized filterData and computed stats (open/closed/merged, active filters). Reworks layout: themed gradient hero, auth card with disabled fetch/button spinner, errors alert area, tabs and state dropdown, filter bar with conditional Clear, conditional content rendering (skeletons, no-data, no-results, table). Table shows status icons/state chips, repo as outlined chips, locale-formatted created dates in tooltips, and row-click navigation (window.open). Pagination integrated in the table container.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 I hopped through cards with tiny paws,
Filters hummed and quieted the noise,
Chips that glint, tooltips that sing,
Memoized numbers, a dashboard spring,
A rabbit cheers the new UI joys.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title describes a major UI enhancement to the Tracker page, but is partially truncated (ends with 'f…'), making it incomplete and vague about the full scope. Complete the title to clearly describe the main change without truncation (e.g., 'feat(tracker): enhance UI with gradient header, improved filters, and dark-mode support').
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description provides comprehensive details including related issue, clear feature summary, testing methodology, and screenshots demonstrating the UI improvements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🎉 Thank you @swati-204 for your contribution. Please make sure your PR follows https://github.com/GitMetricsLab/github_tracker/blob/main/CONTRIBUTING.md#-pull-request-guidelines

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR polishes the Tracker page UI in src/pages/Tracker/Tracker.tsx, introducing a new hero/header layout, improved auth card, richer filter bar/empty states, and enhanced table presentation (chips, badges, hover affordances).

Changes:

  • Added a new header/overview panel with visibility progress, plus stat cards for open/closed/merged counts.
  • Refined authentication and filter UI (helper link, clear actions, loading affordances, and empty states).
  • Updated the table UI to be row-clickable (opens GitHub), with improved styling for title/repo/state/created cells.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/Tracker/Tracker.tsx
Comment on lines +146 to +147
!!searchTitle || !!selectedRepo || !!startDate || !!endDate ||
issueFilter !== "all" || prFilter !== "all";
Comment thread src/pages/Tracker/Tracker.tsx
}, [tab, issueFilter, prFilter, searchTitle, selectedRepo, startDate, endDate]);

const activeFilterCount = activeFilterSummary.length;
const visibleShare = totalCount ? Math.round((currentFilteredData.length / totalCount) * 100) : 0;

const activeFilterCount = activeFilterSummary.length;
const visibleShare = totalCount ? Math.round((currentFilteredData.length / totalCount) * 100) : 0;
const progressValue = Math.max(8, visibleShare || 0);
Comment on lines 400 to +407
<TextField
label="Personal Access Token"
value={token}
onChange={(e) => setToken(e.target.value)}
type="password"
sx={{ flex: 1, minWidth: 150 }}
// Helper link to guide users on generating a GitHub Personal Access Token
required
size="small"
sx={{ flex: 2, minWidth: 200, "& .MuiOutlinedInput-root": { borderRadius: "12px" } }}
Comment thread src/pages/Tracker/Tracker.tsx
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: 4

🤖 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 459-463: The empty-filter "No results match your filters." message
is shown even after a fetch/auth error; update the empty-state rendering logic
to suppress that message when authError or dataError exist. Locate the
conditional that currently checks hasFetched and emptiness of the result arrays
(e.g., hasFetched && filteredRecords.length === 0 or similar) and add a guard so
it only renders when !authError && !dataError. Make the same change for the
second occurrence referenced (the block around the 634-657 range) so both
empty-state branches require no errors before displaying the "No results..."
message.
- Around line 200-201: The progress bar's hard minimum forces a non-zero display
even when visibleShare is 0; change the logic so progressValue uses the minimum
only when visibleShare > 0. Keep visibleShare as computed (from
currentFilteredData.length and totalCount), then compute progressValue with a
conditional: if visibleShare > 0 use Math.max(8, visibleShare) otherwise 0;
update the variable progressValue (referenced in the Tracker component)
accordingly.
- Around line 701-713: The row-level onClick (which calls
window.open(item.html_url, ...)) is being triggered when the nested Link is
clicked; update the Link component (and any clickable children inside the title
cell) to stop event propagation so the row handler doesn't also run —
specifically add an onClick handler on the Link (and any inner interactive
element) that calls event.stopPropagation() (you may optionally call
event.preventDefault() only if you want to suppress Link's default navigation
and handle it manually); locate the Link in the title cell near
getStatusIcon(item) and add the stopPropagation logic there.
- Around line 167-168: The current date filtering in Tracker.tsx uses new
Date(startDate)/new Date(endDate) which treats endDate as midnight and excludes
items later that day; update the end-date comparison used by the filtered array
(the lines that currently filter on new Date(i.created_at) <= new Date(endDate))
to make the end day inclusive by computing an endOfDay for endDate (e.g., set
hours to 23:59:59.999 or advance by one day and compare with <) and use that
endOfDay in the filtered.filter call so items created anytime on the selected
"To" date are included.
🪄 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: eeae03c6-88c4-4753-9916-9d80e44abe1d

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17610 and 9a0970f.

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

Comment thread src/pages/Tracker/Tracker.tsx Outdated
Comment thread src/pages/Tracker/Tracker.tsx
Comment thread src/pages/Tracker/Tracker.tsx
Comment thread src/pages/Tracker/Tracker.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

♻️ Duplicate comments (3)
src/pages/Tracker/Tracker.tsx (3)

644-657: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Don't show the filter-empty state after a fetch error.

This issue was previously flagged and remains unresolved. After a failed auth/API request, the error alert renders correctly at lines 459-463, but this branch still displays "No results match your filters." because hasFetched is already true and the arrays are empty. That message is misleading when nothing was successfully loaded.

Add a guard to suppress this message when errors exist:

-        ) : currentFilteredData.length === 0 ? (
+        ) : !authError && !dataError && currentFilteredData.length === 0 ? (
🤖 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 644 - 657, The "No results match
your filters." empty-state is shown even after a fetch error because hasFetched
is true and arrays are empty; update the rendering condition around the
currentFilteredData.length === 0 branch to also check that there is no fetch
error (e.g., ensure error state is falsy) so the message only appears when data
was fetched successfully; modify the conditional that renders the Box
(referencing currentFilteredData, hasActiveFilters, and handleClearFilters) to
require hasFetched && !error before showing the empty-filter UI.

689-734: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Stop the title link from triggering the row click handler too.

This issue was previously flagged and remains unresolved. Clicking the title Link at lines 709-732 currently fires both the nested <Link> navigation and the row-level window.open at line 701, which opens the same GitHub item in two separate tabs.

Add stopPropagation to prevent the row handler from also running:

                         <Link
                           href={item.html_url}
                           target="_blank"
                           rel="noopener noreferrer"
+                          onClick={(e) => e.stopPropagation()}
                           underline="none"
                           sx={{
🤖 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 689 - 734, The nested Link inside
the TableRow is propagating clicks to the row-level onClick (window.open)
causing duplicate tabs; add an onClick handler to the Link (the Link rendering
item.title / CallMadeIcon) that calls event.stopPropagation() so the Link
navigation opens only once and the TableRow onClick does not run. Locate the map
over currentFilteredData, the TableRow with onClick={() => window.open(...)} and
the Link element and add the stopPropagation call on the Link's onClick
(ensuring it doesn't interfere with target="_blank").

201-201: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep the visibility bar at 0 when nothing is visible.

This issue was previously flagged and remains unresolved. When visibleShare is 0, the hard floor of 8 causes the progress bar to display 8% width while the text shows 0%.

Only apply the minimum when visibleShare > 0:

-  const progressValue = Math.max(8, visibleShare || 0);
+  const progressValue = visibleShare > 0 ? Math.max(8, visibleShare) : 0;
🤖 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` at line 201, The progressValue calculation
uses a hard floor of 8 even when visibleShare is 0; change it so the minimum
only applies when visibleShare > 0 by setting progressValue to 0 when
visibleShare is 0 and otherwise to Math.max(8, visibleShare) (update the
expression that assigns progressValue in Tracker.tsx to reference visibleShare
and Math.max accordingly).
🤖 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.

Duplicate comments:
In `@src/pages/Tracker/Tracker.tsx`:
- Around line 644-657: The "No results match your filters." empty-state is shown
even after a fetch error because hasFetched is true and arrays are empty; update
the rendering condition around the currentFilteredData.length === 0 branch to
also check that there is no fetch error (e.g., ensure error state is falsy) so
the message only appears when data was fetched successfully; modify the
conditional that renders the Box (referencing currentFilteredData,
hasActiveFilters, and handleClearFilters) to require hasFetched && !error before
showing the empty-filter UI.
- Around line 689-734: The nested Link inside the TableRow is propagating clicks
to the row-level onClick (window.open) causing duplicate tabs; add an onClick
handler to the Link (the Link rendering item.title / CallMadeIcon) that calls
event.stopPropagation() so the Link navigation opens only once and the TableRow
onClick does not run. Locate the map over currentFilteredData, the TableRow with
onClick={() => window.open(...)} and the Link element and add the
stopPropagation call on the Link's onClick (ensuring it doesn't interfere with
target="_blank").
- Line 201: The progressValue calculation uses a hard floor of 8 even when
visibleShare is 0; change it so the minimum only applies when visibleShare > 0
by setting progressValue to 0 when visibleShare is 0 and otherwise to
Math.max(8, visibleShare) (update the expression that assigns progressValue in
Tracker.tsx to reference visibleShare and Math.max accordingly).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2609da9c-867e-4310-a1b2-61cf6ca142e7

📥 Commits

Reviewing files that changed from the base of the PR and between 9a0970f and 8135809.

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

@swati-204
Copy link
Copy Markdown
Author

Hi @mehul-m-prajapati
Kindly merge the PR I have raised

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.

2 participants