devtrack icon indicating copy to clipboard operation
devtrack copied to clipboard

[GOOD FIRST ISSUE] Display total commit count on public profile page header

Open Priyanshu-byte-coder opened this issue 6 months ago • 11 comments

Summary

The public profile page (/u/[username]) shows contribution graph and streak stats but no single headline number. Add a total commit count to the page header.

Current Behaviour

Header shows only @username's Profile and "GitHub activity and coding stats".

Expected Behaviour

Header includes a line: "X total commits in the last 365 days" using data already fetched by the page (profile.contributions.total).

Acceptance Criteria

  • [ ] Rendered server-side (no extra fetch — data is already in profile.contributions.total)
  • [ ] Formatted with locale separator: toLocaleString()
  • [ ] Styled with text-[var(--muted-foreground)]
  • [ ] Shows nothing (or hides the line) if total === 0

Files to Touch

src/app/u/[username]/page.tsx — update the header JSX only.

Priyanshu-byte-coder avatar May 16 '26 18:05 Priyanshu-byte-coder

hiii @Priyanshu-byte-coder i would like to work on this issue please assign it to me under GSSoC'26.

seffhunnn avatar May 16 '26 20:05 seffhunnn

@seffhunnn Please see the note left on #90 — mass-requesting assignment across multiple issues at once won't result in any assignments. Pick one issue, share your approach, and we'll go from there.

Priyanshu-byte-coder avatar May 16 '26 20:05 Priyanshu-byte-coder

I would like to work on this issue under GSSoC 2026.

I reviewed the requirement and this enhancement would improve the profile page by giving users an immediate high-level summary of their GitHub activity without introducing additional API calls or layout complexity.

Proposed Approach

I’ll update the header section in:

src/app/u/[username]/page.tsx

to display:

X total commits in the last 365 days

using the already available server-side data:

profile.contributions.total

Planned Implementation

Render server-side only (no additional fetches or client-side requests)

Format commit counts using locale separators:

profile.contributions.total.toLocaleString()

Match existing design system styling:

className="text-[var(--muted-foreground)]"

Conditionally render the line only when:

profile.contributions.total > 0

so empty profiles remain clean and uncluttered.

Example JSX

{profile.contributions.total > 0 && (
  <p className="text-[var(--muted-foreground)]">
    {profile.contributions.total.toLocaleString()} total commits in the last 365 days
  </p>
)}

Additional Considerations

  • Preserve existing header layout and spacing
  • Ensure responsive alignment across screen sizes
  • Maintain accessibility/readability with muted foreground styling
  • Avoid unnecessary re-renders or data transformations

This is a lightweight but impactful UX improvement that makes profile statistics more immediately visible to users.

If this sounds good, please assign this issue to me under GSSoC 2026 with relevant labels such as:

Looking forward to contributing

SHRUTIDHEPE avatar May 17 '26 07:05 SHRUTIDHEPE

/assign me under gssoc'26

abhinavkcodes avatar Jun 17 '26 17:06 abhinavkcodes

@abhinavkcodes This issue is already taken by @SHRUTIDHEPE. Check other open issues!

github-actions[bot] avatar Jun 17 '26 17:06 github-actions[bot]

Reassigning to @abhinavkcodes — this issue had no PR and no activity for over a month, so it's going to the next person who asked for it (first come, first served).

@abhinavkcodes it's yours: please open a PR within 7 days or it'll be released again. If you're no longer interested, just say so and I'll pass it on.

Priyanshu-byte-coder avatar Jul 29 '26 17:07 Priyanshu-byte-coder

Hey @abhinavkcodes — this issue was assigned a while back with no recent activity. Unassigning so it's available for Hacktoberfest contributors. Still working on it? Comment and we'll reassign you.

Priyanshu-byte-coder avatar Oct 14 '26 18:10 Priyanshu-byte-coder

Assigned to @Priyanshu-byte-coder! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!

github-actions[bot] avatar Oct 14 '26 18:10 github-actions[bot]

Hi @Priyanshu-byte-coder, I'd like to take this one. It's the only issue I'm claiming in this repo.

Plan: in src/app/u/[username]/page.tsx, I'll add a server-rendered line to the header that reads {profile.contributions.total.toLocaleString()} total commits in the last 365 days. It will use the existing profile.contributions.total with no extra fetch and be styled with text-[var(--muted-foreground)]. The line will be hidden when total === 0.

I expect to open a PR within the next few days. Could you assign it to me? If I'm not able to get to it, I'll say so here so it can be released.

michellejtan avatar Nov 01 '26 01:11 michellejtan

Assigned to @michellejtan! You have 7 days to open a PR. No PR after 7 days = auto-unassigned so others can pick it up. Good luck!

github-actions[bot] avatar Nov 01 '26 01:11 github-actions[bot]

Hey @michellejtan — this issue was assigned 7 days ago with no PR opened. Unassigning so others can pick it up.

Still working on it? Drop a comment and request re-assignment.

github-actions[bot] avatar Nov 08 '26 08:11 github-actions[bot]