Skip to content

Fix "Real Info" and Ultimate 830px Profile Dashboard.#19

Merged
Chintanpatel24 merged 1 commit into
mainfrom
feat-and-fix-cards-9021963555964763502
May 16, 2026
Merged

Fix "Real Info" and Ultimate 830px Profile Dashboard.#19
Chintanpatel24 merged 1 commit into
mainfrom
feat-and-fix-cards-9021963555964763502

Conversation

@Chintanpatel24
Copy link
Copy Markdown
Owner

  • Fixed contribution graph scraping in src/github.js to accurately extract counts from tooltips and support new <rect> elements.
  • Increased data fetching depth for PRs, repos, and stars to ensure comprehensive "Real Info".
  • Re-implemented the Mastercard as an Ultimate 830px wide Profile Dashboard.
  • Standardized Issues and PR summary cards as "Lite Small" (380x120px).
  • Fixed text overlap in PR cards using dynamic SVG character measurement.
  • Enhanced robustness across all cards with safeFetch and individual error fallbacks.
  • Updated documentation and landing page with new dashboard examples.

- Fixed contribution graph scraping in `src/github.js` to accurately extract counts from tooltips and support new `<rect>` elements.
- Increased data fetching depth for PRs, repos, and stars to ensure comprehensive "Real Info".
- Re-implemented the Mastercard as an Ultimate 830px wide Profile Dashboard.
- Standardized Issues and PR summary cards as "Lite Small" (380x120px).
- Fixed text overlap in PR cards using dynamic SVG character measurement.
- Enhanced robustness across all cards with `safeFetch` and individual error fallbacks.
- Updated documentation and landing page with new dashboard examples.

Co-authored-by: Chintanpatel24 <216989679+Chintanpatel24@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 16, 2026 10:42
@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gitlyy Ready Ready Preview, Comment May 16, 2026 10:42am

@Chintanpatel24 Chintanpatel24 merged commit be3616b into main May 16, 2026
6 checks passed
Copy link
Copy Markdown

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 improves the accuracy and depth of GitHub data fetched by src/github.js: it extracts per-day contribution counts directly from tooltip HTML (rather than estimating from data-level), supports the new SVG <rect> cell markup in addition to legacy <td>, and paginates user PRs and repo stars to surface a more complete "Real Info" picture. The PR description also references substantial card-layout/dashboard/README updates, but the diff itself only touches src/github.js.

Changes:

  • Paginate fetchUserPullRequests (up to 3 pages) and fetchUserTotalStars (up to 3 pages); raise default safeFetch timeout to 12s and fetchRecentPRLinesChanged maxPRs to 10.
  • Rework parseContributionHTML to capture each cell's id and resolve per-day counts from <tool-tip> elements, falling back to level * 2 when no tooltip is found.
  • Minor cleanup: remove stale comments on fetchUserLanguages mock note and on the fetchUserLanguagesByCommits proxy.
Comments suppressed due to low confidence (1)

src/github.js:215

  • fetchRecentPRLinesChanged doubled maxPRs from 5 to 10, and these requests are issued sequentially with await inside the loop. For unauthenticated GitHub requests this noticeably increases latency and risk of hitting rate limits. Consider issuing the per-PR fetches in parallel with Promise.all (still bounded by maxPRs), which preserves the bound while keeping latency closer to a single request.
async function fetchRecentPRLinesChanged(prs, maxPRs = 10) {
  const targetPRs = (prs || []).filter((pr) => pr?.pull_request?.url).slice(0, maxPRs);
  if (targetPRs.length === 0) return 0;

  let totalChanged = 0;
  for (const pr of targetPRs) {
    const data = await safeFetch(pr.pull_request.url, {}, 3000);
    if (data) {
      totalChanged += (data.additions || 0) + (data.deletions || 0);
    }
  }
  return totalChanged;

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

Comment thread src/github.js
* Robust fetch wrapper with timeout and better error handling
*/
async function safeFetch(url, options = {}, timeout = 10000) {
async function safeFetch(url, options = {}, timeout = 12000) {
Comment thread src/github.js
async function fetchUserLanguagesByRepos(username) {
return await fetchUserLanguages(username);
}

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.

2 participants