Skip to content

fix(TopRepos): show repo description as native tooltip on name hover (#214)#410

Open
Jyoti1-pog wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Jyoti1-pog:feat/214-toprepos-description-tooltip
Open

fix(TopRepos): show repo description as native tooltip on name hover (#214)#410
Jyoti1-pog wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Jyoti1-pog:feat/214-toprepos-description-tooltip

Conversation

@Jyoti1-pog
Copy link
Copy Markdown

Summary

Fixes #214TopRepos listed repository names but never surfaced the
description the GitHub API already returns. Hovering a repo name now shows
its description as a native browser tooltip. Repos with no description
(null or "") correctly show no tooltip at all.

Changes

  • src/components/TopRepos.tsx — added description: string | null to
    the Repo type; set the repo name link's
    title={repo.description || undefined}.
  • src/app/api/metrics/repos/route.ts — threaded description through
    the GitHub search response type, the repoMap projection, the
    RepoSummary type, and the multi-account mergeRepoCommits merge. The
    field was being dropped at every step of the API → component pipeline.

Using || undefined (not "") makes React omit the title attribute
entirely when there is no description, so no empty tooltip renders.

Verification

Confirmed against the live GitHub API that search/commits returns
repository.description, and verified end-to-end on the dashboard that a
repo with a description shows the tooltip while a repo with a null
description shows none.

Tooltip shows on hover (repo with a description):

Screenshot 2026-05-20 021225

No tooltip (repo with null/empty description):

Screenshot 2026-05-20 021557

Note

The repo name link previously had title={repo.name} (full org/repo
path on hover). An element can carry only one title, and the issue
explicitly specifies title={repo.description || undefined} on the name
element, so that prior tooltip is now replaced by the description — this is
the behaviour the issue asks for.

Closes #214

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

Someone is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Thanks for your first PR on DevTrack! 🎉

A maintainer will review it within 48 hours. While you wait:

  • Make sure CI is passing (type-check + lint)
  • Double-check the PR description is filled out and the issue is linked
  • Feel free to ask questions in Discussions if you need help

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Show repo description as tooltip on name hover in TopRepos

1 participant