Skip to content

✨ feat(tracker): Improve Tracker page UI/UX & add Repositories tab#658

Open
Mayank251125 wants to merge 3 commits into
GitMetricsLab:mainfrom
Mayank251125:feature/improve-tracker-ui-ux
Open

✨ feat(tracker): Improve Tracker page UI/UX & add Repositories tab#658
Mayank251125 wants to merge 3 commits into
GitMetricsLab:mainfrom
Mayank251125:feature/improve-tracker-ui-ux

Conversation

@Mayank251125
Copy link
Copy Markdown

@Mayank251125 Mayank251125 commented Jun 1, 2026

Related Issue


Description

This PR significantly improves the Tracker page UI/UX, accessibility, and overall user
experience as proposed in the linked issue. It also introduces a brand new
Repositories Tab that fetches and displays real GitHub repository data.

🎨 UI/UX Improvements

  • Redesigned search form using a responsive CSS grid layout
  • Improved spacing, padding, and visual hierarchy throughout the page
  • Consistent styling across all form controls and interactive elements
  • Enhanced dark mode aesthetics and consistency
  • Made the primary Fetch Data CTA more prominent with hover glow effect
  • Added hover, focus, and active states to all interactive elements

🚀 UX Improvements

  • Added skeleton loading rows while data is being fetched
  • Added toast notifications for loading, success, and error states
  • Meaningful empty-state messages with icons when no data is available
  • Added validation feedback and disabled state on the submit button
  • Improved filter discoverability with collapsible advanced filter panel

📊 Summary Stat Cards

  • Total Issues
  • Open Issues
  • Closed Issues
  • Pull Requests
  • Repositories (new)
  • Total Stars (new)

🗂️ New: Repositories Tab

  • Fetches real repositories via GET /users/{username}/repos using Octokit
  • Displays repos in a responsive card grid (3 cols desktop / 2 tablet / 1 mobile)
  • Each card shows: name, description, language dot, stars, forks, open issues,
    topics, license, visibility badge, fork badge, last updated (relative time)
  • Filter by programming language
  • Search by repo name or description
  • Sort by: Last updated / Stars / Forks / Open issues / Name
  • Ascending/Descending toggle
  • Hide forks toggle
  • Pagination (12 repos per page)
  • New hook: useGitHubRepos.ts

🔍 Filtering & Data Experience

  • Quick filter chips: All / Open / Closed / Merged
  • Collapsible advanced filter panel: title search, repo name, start/end date
  • Sortable table columns: Title, Repository, State, Created
  • CSV export of current filtered view
  • Result count display: "Showing N results of X total"
  • Clear filters chip when filters are active

♿ Accessibility

  • aria-label on all inputs, buttons, icons, and interactive elements
  • role="tab" and aria-selected on tab pills
  • role="status" on stat cards and empty states
  • Visible :focus-visible rings on every interactive element
  • Full keyboard navigation support (Enter/Space on tabs)
  • Screen reader compatible status icons wrapped in <span role="img">

📱 Responsiveness

  • Search form stacks vertically on mobile
  • Stat cards wrap and resize on small screens
  • Table has maxWidth breakpoints per column
  • Repo card grid collapses from 3 → 2 → 1 column on smaller viewports
  • Filter panel uses responsive grid: 4 cols → 2 → 1

How Has This Been Tested?

  • ✅ Tested on Chrome, Edge (Windows)
  • ✅ Tested with valid GitHub username (torvalds, Mayank251125)
  • ✅ Tested with and without a Personal Access Token
  • ✅ Tested with invalid username (error state shown correctly)
  • ✅ Tested all 3 tabs: Issues, Pull Requests, Repositories
  • ✅ Tested all filter chips (All / Open / Closed / Merged)
  • ✅ Tested advanced filters (title, repo, date range)
  • ✅ Tested CSV export — file downloads correctly
  • ✅ Tested sort on all 4 table columns (asc + desc)
  • ✅ Tested dark mode and light mode
  • ✅ Tested mobile view (375px) and tablet (768px)
  • ✅ Tested keyboard navigation (Tab, Enter, Space)
  • npm run dev runs without errors

Screenshots (if applicable)

Screenshot 2026-06-01 103914 Screenshot 2026-06-01 103948 Screenshot 2026-06-01 103957

Type of Change

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

Summary by CodeRabbit

  • New Features

    • Added a dedicated Repos tab to Tracker with full GitHub repository browsing.
    • Repo cards, client-side search, language filter, hide/show forks, multi-field sort, and pagination.
    • Concurrent fetching of issues/PRs and repos; first-page fetch populates full repo set and totals.
    • CSV export and advanced controls are shown conditionally (hidden on the repos tab).
  • Bug Fixes / Reliability

    • Improved loading states, empty-state messaging, and user-facing error handling for repo fetches.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 754c4e5
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a1e699f2a9db00008c663f7
😎 Deploy Preview https://deploy-preview-658--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 Jun 1, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

Adds GitHub repository tracking: a typed useGitHubRepos hook (paged + full-list support, Link-header totals, error mapping), repo formatting/util helpers, RepoCard/ReposSection UI, and Tracker integration (repos tab, repo pagination, concurrent fetch on submit).

Changes

Repository Tracking Feature

Layer / File(s) Summary
Repository data contract and hook implementation
src/hooks/useGitHubRepos.ts
GitHubRepo interface and useGitHubRepos expose repos, allRepos, totalRepos, loading, error, and fetchRepos. Fetch logic selects authenticated vs. user endpoint, parses Link header for totals, populates allRepos on first page by paging through results, and normalizes common HTTP errors.
Tracker imports and repository utilities
src/pages/Tracker/Tracker.tsx
Expanded imports and added repo-related types/constants and helpers: repo page size, language color map, date/relative-time and compact number formatters, repo name extraction, item normalization, and CSV export helpers.
Repository UI components
src/pages/Tracker/Tracker.tsx
RepoCard renders repo metadata (fork/private badges, description, topics, language badge, stars/forks/issues, license, updated time). ReposSection provides search, language filter, sort/direction, hide/show forks toggle, client-side filtering/sorting over allRepos, totals, skeleton loading, error/empty states, and pagination controls.
Tracker component state and data fetching
src/pages/Tracker/Tracker.tsx
Tracker adds repoPage state and "repos" tab, re-fetches repos on page changes when active, and submit handler concurrently fetches issues/PRs and repos (resetting pagination as needed).
Tracker render flow with repository tab support
src/pages/Tracker/Tracker.tsx
Main render adds repo summary stat cards, Repositories tab label, hides advanced filters/CSV export when in repos mode, conditionally renders ReposSection for tab === "repos", and retains issues/PRs table behavior with updated shared sort helpers.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Tracker
  participant useGitHubRepos
  participant Octokit
  User->>Tracker: submit(username, token?)
  Tracker->>useGitHubRepos: fetchRepos(username, page, perPage, token?)
  useGitHubRepos->>Octokit: GET /user/repos OR GET /users/{username}/repos
  Octokit-->>useGitHubRepos: repos page, Link header
  useGitHubRepos->>Octokit: (if page===1 && Link present) GET remaining pages with per_page=100
  Octokit-->>useGitHubRepos: remaining repo pages
  useGitHubRepos-->>Tracker: repos, allRepos, totalRepos (or error)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

level:advanced, type:feature

Poem

🐰 I hopped through pages, sorting by the sun,
Fetched every repo until the counting was done,
Cards and filters lined up in a row,
Stars and forks glittering, all set to show,
CSV bundled — off to the meadow we go!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main changes: Tracker page UI/UX improvements and a new Repositories tab feature.
Description check ✅ Passed The description comprehensively covers all required template sections with detailed implementation details, testing, and screenshots.
Linked Issues check ✅ Passed The PR fully addresses all coding objectives from issue #606: responsive form redesign, loading/empty states, accessibility enhancements, new summary cards, repositories tab, filters, sorting, CSV export, and responsiveness.
Out of Scope Changes check ✅ Passed All changes align with objectives in issue #606; no out-of-scope modifications detected beyond the specified UI/UX improvements and repositories tab.

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

@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: 7

🤖 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/hooks/useGitHubRepos.ts`:
- Around line 57-68: The catch block in useGitHubRepos.ts swallowing errors
(inside fetchRepos) only calls setError and lets the promise resolve, so callers
like Tracker.tsx's handleSubmit (which uses toast.promise) incorrectly show
success; after each setError branch in the catch, propagate the failure by
re-throwing the original error (or return Promise.reject(err)) so fetchRepos
rejects and the caller can surface the correct toast/result—update the catch in
fetchRepos to throw err (or reject) after setError.
- Around line 49-56: The code incorrectly computes totalRepos by always
multiplying the rel="last" page number by perPage; change the logic in
useGitHubRepos to parse last page via lastMatch (keep linkHeader, lastMatch,
perPage, page, response.data.length, setTotalRepos) and compute total as
(lastPage - 1) * perPage + itemsOnLastPage, where itemsOnLastPage should be
response.data.length when the current page is the last page (lastPage === page)
and perPage otherwise; if you need exact totals even when the current page is
not the last, perform an extra fetch for the last page to read its length and
then setTotalRepos accordingly.

In `@src/pages/Tracker/Tracker.tsx`:
- Around line 615-626: The pagination effects currently read the mutable
`username` input, causing refetches to use unsaved edits; create and use a
committed `submittedUsername` state set by the search submit handler, then
change both effects (the tab/page effect that calls `fetchData` and the repoPage
effect that calls `fetchRepos`, and any other related effects around the 628-649
region) to read `submittedUsername` instead of `username` and include
`submittedUsername` in their dependency arrays; ensure the submit handler
assigns the current input to `submittedUsername` so all follow-up fetches
consistently use the last submitted username.
- Around line 428-442: The current filtering/sorting logic uses the paginated
array "repos" so search/filters (in the block producing "filtered") only run
against the current page; move the filtering/sorting to operate on the full
repository set (or fetch/cache all repos) before pagination is applied: ensure
the filter conditions referencing showForks, langFilter, search and the sort
logic using sort and sortDir are executed against the complete collection (e.g.,
"allRepos" or the fetched master list) and only then slice for the page, or
alternatively perform server-side filtering so the paginated "repos" is already
the filtered result.
- Around line 877-883: The tab elements rendered with Box currently only set
tabIndex on the active tab and handle Enter/Space but lack ArrowLeft/ArrowRight
roving focus; update the Tab keyboard handler to support left/right arrow
navigation by moving focus to the previous/next tab and calling setTab(newKey)
(wrapping at ends), and ensure tabIndex is 0 for the newly focused tab and -1
for others so focus moves correctly; modify the onKeyDown for the Box (and the
container with role="tablist" if present) to handle e.key ===
"ArrowRight"/"ArrowLeft" (and optionally Home/End) and also reset page/state via
setPage(0)/setStateFilter("all") when changing tabs to match existing click
behavior.
- Around line 444-455: The UI is showing page-only aggregates (totalStars,
totalForks computed from repos) but labels them as overall totals; update the
logic in Tracker.tsx so the summary uses the true overall totals or clearly
labels them as "this page": either (A) replace totalStars/totalForks with the
global totals source (if you have a backend/parent value like
totalStarsAll/totalForksAll or a paginatedTotals object) and use those in the
labels passed to fmtNum, or (B) change the label strings where
totalStars/totalForks (and the same occurrences around symbols at lines ~681-683
and ~855-863) are used to say "this page" (e.g., "stars on this page") so they
accurately reflect repos (the current page) rather than the entire dataset;
update every usage of totalStars and totalForks in Tracker.tsx accordingly.
🪄 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: 1f1699d0-178f-4270-8ff6-0ca376a08974

📥 Commits

Reviewing files that changed from the base of the PR and between 53f820b and cb88c9c.

📒 Files selected for processing (2)
  • src/hooks/useGitHubRepos.ts
  • src/pages/Tracker/Tracker.tsx

Comment thread src/hooks/useGitHubRepos.ts Outdated
Comment thread src/hooks/useGitHubRepos.ts Outdated
Comment thread src/hooks/useGitHubRepos.ts Outdated
Comment thread src/pages/Tracker/Tracker.tsx Outdated
Comment thread src/pages/Tracker/Tracker.tsx Outdated
Comment thread src/pages/Tracker/Tracker.tsx
Comment thread src/pages/Tracker/Tracker.tsx Outdated
@Mayank251125 Mayank251125 reopened this Jun 1, 2026
- Fix 1: Switch to GET /user/repos for private repo support with PAT
- Fix 2: Correct totalRepos count (fetch last page for exact number)
- Fix 3: Re-throw errors so toast.promise shows error toast correctly
- Fix 4: Fetch allRepos on load for global search/filter across all pages
- Fix 5: Relabel stars/forks as page-only metrics
- Fix 6: Add submittedUsername ref to prevent pagination using live input
- Fix 7: Add ArrowLeft/ArrowRight roving focus to tablist for keyboard nav
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

🤖 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/hooks/useGitHubRepos.ts`:
- Around line 41-60: When token is present you currently always call 'GET
/user/repos' which returns repos for the token owner and ignores an arbitrary
username; change the logic in useGitHubRepos.ts to first, when token exists,
call the authenticated-user endpoint (e.g., octokit.rest.users.getAuthenticated
or GET /user) to obtain the token owner's login and compare it to the requested
username, and only use endpoint = 'GET /user/repos' (with visibility/affiliation
params) if the authenticated login equals username (or username is empty);
otherwise set endpoint = 'GET /users/{username}/repos' and include
params.username = username (and only include public/owner/type params
appropriate for that endpoint), then call octokit.request(endpoint, params) as
before.
🪄 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: 324087b5-b3a5-48d7-8b5e-d7c08a3efd9d

📥 Commits

Reviewing files that changed from the base of the PR and between cb88c9c and 79bb12f.

📒 Files selected for processing (2)
  • src/hooks/useGitHubRepos.ts
  • src/pages/Tracker/Tracker.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/Tracker/Tracker.tsx

Comment thread src/hooks/useGitHubRepos.ts Outdated
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

🧹 Nitpick comments (2)
src/hooks/useGitHubRepos.ts (2)

50-52: ⚡ Quick win

Consider caching the authenticated user to avoid repeated API calls.

GET /user is called on every fetchRepos invocation when a token is present. For pagination scenarios, this results in redundant API calls (one per page change). Cache the authenticated login at hook level or on first token use.

♻️ Proposed refactor
 export const useGitHubRepos = (getOctokit: () => Octokit | null) => {
   const [repos, setRepos] = useState<GitHubRepo[]>([]);
   const [allRepos, setAllRepos] = useState<GitHubRepo[]>([]);
   const [totalRepos, setTotalRepos] = useState(0);
   const [loading, setLoading] = useState(false);
   const [error, setError] = useState('');
+  const [cachedAuthLogin, setCachedAuthLogin] = useState<string | null>(null);

   const fetchRepos = useCallback(
     async (username: string, page = 1, perPage = 12, token?: string) => {
       // ...
       if (token) {
-        const authUser = await octokit.request('GET /user');
-        const authenticatedLogin = authUser.data.login.toLowerCase();
+        let authenticatedLogin = cachedAuthLogin;
+        if (!authenticatedLogin) {
+          const authUser = await octokit.request('GET /user');
+          authenticatedLogin = authUser.data.login.toLowerCase();
+          setCachedAuthLogin(authenticatedLogin);
+        }
         // ...
       }
     },
-    [getOctokit]
+    [getOctokit, cachedAuthLogin]
   );
🤖 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/hooks/useGitHubRepos.ts` around lines 50 - 52, The hook currently calls
octokit.request('GET /user') inside fetchRepos whenever token is present,
causing redundant requests; modify the useGitHubRepos hook to cache the
authenticated login (e.g., store a local variable or ref like
cachedAuthenticatedLogin at hook scope) and set it on the first successful
authUser fetch, then have fetchRepos reuse cachedAuthenticatedLogin instead of
calling octokit.request again; ensure the cache is cleared or refreshed when
token changes and keep the symbols authUser, authenticatedLogin, token,
fetchRepos and octokit as the touchpoints for the change.

139-146: ⚖️ Poor tradeoff

Unbounded concurrent requests could hit rate limits for users with many repositories.

Promise.all issues all remaining page requests simultaneously. A user with 500+ repositories triggers 5+ concurrent requests; extreme cases could exhaust the rate limit quickly or cause timeouts.

Consider batching with a concurrency limit (e.g., 3-5 parallel requests) if this feature is expected to handle users with large repo counts.

🤖 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/hooks/useGitHubRepos.ts` around lines 139 - 146, The current Promise.all
in useGitHubRepos.ts floods octokit.request for pages (see variables totalPages,
endpoint, allParams and the const rest assignment), risking rate-limit/timeouts
for large repo counts; change this to a bounded-concurrency fetcher that issues
page requests in batches (e.g., concurrency 3-5) instead of all at once—either
use a small utility like p-limit or implement a simple worker queue that
schedules requests for octokit.request(endpoint, { ...allParams, page }) and
collects results in order; ensure error handling and backoff/retry behavior is
preserved when replacing the Promise.all call.
🤖 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/hooks/useGitHubRepos.ts`:
- Around line 103-113: The current logic computes a coarse "total" and
unconditionally calls setTotalRepos(total), overwriting a previously accurate
total (from all.length) when navigating to page > 1; change the update so that
setTotalRepos is only called when there is no existing accurate total or we're
on page 1 (i.e., preserve the current totalRepos state when page > 1 and
totalRepos is already populated). Locate the block using variables total,
lastPage, perPage, page and the calls setRepos(...) and setTotalRepos(...); add
a guard so setTotalRepos(total) is skipped when page > 1 and the stored
totalRepos is already set (or is greater than zero).

---

Nitpick comments:
In `@src/hooks/useGitHubRepos.ts`:
- Around line 50-52: The hook currently calls octokit.request('GET /user')
inside fetchRepos whenever token is present, causing redundant requests; modify
the useGitHubRepos hook to cache the authenticated login (e.g., store a local
variable or ref like cachedAuthenticatedLogin at hook scope) and set it on the
first successful authUser fetch, then have fetchRepos reuse
cachedAuthenticatedLogin instead of calling octokit.request again; ensure the
cache is cleared or refreshed when token changes and keep the symbols authUser,
authenticatedLogin, token, fetchRepos and octokit as the touchpoints for the
change.
- Around line 139-146: The current Promise.all in useGitHubRepos.ts floods
octokit.request for pages (see variables totalPages, endpoint, allParams and the
const rest assignment), risking rate-limit/timeouts for large repo counts;
change this to a bounded-concurrency fetcher that issues page requests in
batches (e.g., concurrency 3-5) instead of all at once—either use a small
utility like p-limit or implement a simple worker queue that schedules requests
for octokit.request(endpoint, { ...allParams, page }) and collects results in
order; ensure error handling and backoff/retry behavior is preserved when
replacing the Promise.all call.
🪄 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: 6d8b00b8-a3cc-4f24-8615-c4a9e05e3e64

📥 Commits

Reviewing files that changed from the base of the PR and between 79bb12f and 754c4e5.

📒 Files selected for processing (1)
  • src/hooks/useGitHubRepos.ts

Comment on lines +103 to +113
} else {
total = (lastPage - 1) * perPage + perPage;
}
} else {
total = (page - 1) * perPage + (response.data as GitHubRepo[]).length;
}

const pageRepos = response.data as GitHubRepo[];

setRepos(pageRepos);
setTotalRepos(total);
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

totalRepos gets overwritten with inaccurate estimate on page > 1 fetches.

When page > 1 and a lastMatch exists, line 104 computes total = lastPage * perPage, which overestimates when the last page is partial. Line 113 unconditionally sets totalRepos to this estimate, overwriting the accurate value that was set via all.length during the initial page-1 fetch.

This causes pagination UI (context snippet at Tracker.tsx:562-578) to display incorrect page counts after navigating away from page 1.

🐛 Proposed fix: preserve totalRepos on page > 1 when already populated
+      // Only update totalRepos on page 1 or if not yet set
+      const shouldUpdateTotal = page === 1 || totalRepos === 0;
+
       const pageRepos = response.data as GitHubRepo[];
 
       setRepos(pageRepos);
-      setTotalRepos(total);
+      if (shouldUpdateTotal) {
+        setTotalRepos(total);
+      }

This preserves the accurate totalRepos (set from all.length on page 1) during subsequent pagination.

🤖 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/hooks/useGitHubRepos.ts` around lines 103 - 113, The current logic
computes a coarse "total" and unconditionally calls setTotalRepos(total),
overwriting a previously accurate total (from all.length) when navigating to
page > 1; change the update so that setTotalRepos is only called when there is
no existing accurate total or we're on page 1 (i.e., preserve the current
totalRepos state when page > 1 and totalRepos is already populated). Locate the
block using variables total, lastPage, perPage, page and the calls setRepos(...)
and setTotalRepos(...); add a guard so setTotalRepos(total) is skipped when page
> 1 and the stored totalRepos is already set (or is greater than zero).

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: Improve Tracker Page UI/UX, Accessibility, Filtering Experience & Contributor-Friendly Enhancements for GSSoC'26

1 participant