Skip to content

Premium Profile Dashboard and Polished Stats.#16

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

Premium Profile Dashboard and Polished Stats.#16
Chintanpatel24 merged 1 commit into
mainfrom
feat-and-fix-cards-9021963555964763502

Conversation

@Chintanpatel24
Copy link
Copy Markdown
Owner

  • Implemented the Mastercard as a "Premium Full-Width Dashboard" (820px).
  • Dashboard features: Hero stats (Commits, Stars, Contributions, PRs, Issues), Performance metrics, Languages grid, Activity list, and Full-width Heatmap.
  • Fixed text overlap in PR cards with dynamic truncation.
  • Standardized Issues and PR Summary cards as "Lite Small" (380x120px).
  • Robust data fetching with safeFetch and timeouts to prevent crashes.
  • Updated documentation and landing page with new dashboard examples.

- Implemented the Mastercard as a "Premium Full-Width Dashboard" (820px).
- Dashboard features: Hero stats (Commits, Stars, Contributions, PRs, Issues), Performance metrics, Languages grid, Activity list, and Full-width Heatmap.
- Fixed text overlap in PR cards with dynamic truncation.
- Standardized Issues and PR Summary cards as "Lite Small" (380x120px).
- Robust data fetching with `safeFetch` and timeouts to prevent crashes.
- 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 15, 2026 15:59
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

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

Project Deployment Actions Updated (UTC)
gitlyy Ready Ready Preview, Comment May 15, 2026 3:59pm

@Chintanpatel24 Chintanpatel24 merged commit 6ddb8b5 into main May 15, 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 updates the “Master” profile dashboard card to a new full-width (820px) layout, reorganizing the displayed stats/sections and adjusting the backing API to fetch a few metrics more efficiently.

Changes:

  • Refreshed the master dashboard SVG layout (header, hero metrics, languages, performance, repo activity/status, heatmap).
  • Updated /api/master data aggregation (new cache key version, open PR count via dedicated search call, reduced PRs used for “lines changed”).
  • Tweaked streak calculation and repo activity derivation for the master dashboard.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/svg-master.js Reworked the master dashboard SVG structure, labels, spacing, and which metrics are displayed.
api/master.js Adjusted dashboard data fetching/caching and the computed metrics used by the SVG.
Comments suppressed due to low confidence (1)

api/master.js:94

  • repoList is now built from only the first 50 PRs. Given GitHub search results aren’t explicitly sorted by recency, this can make the “Projects Activity” section unstable/inaccurate. If you’re limiting for performance, consider sorting PRs by updated_at/created_at first and then taking the most recent 50, or derive this from aggregated counts (e.g. via the existing groupPRsByRepo).
        const repoMap = {};
        (prs || []).slice(0, 50).forEach(pr => {
          if (pr.repository_url) {
            const name = pr.repository_url.split("/repos/")[1];
            repoMap[name] = (repoMap[name] || 0) + 1;
          }
        });

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

Comment thread api/master.js
fetchUserTotalStars,
fetchRecentPRLinesChanged
fetchRecentPRLinesChanged,
fetchOpenPullRequests // Added this
Comment thread api/master.js
for (let i = sortedDays.length - 1; i >= 0; i--) {
if (sortedDays[i].count > 0) currentStreak++;
else break;
else if (i < sortedDays.length - 1) break;
Comment thread api/master.js
Comment on lines 99 to 104
data = {
username: profile?.login || username,
totalPRs: prs?.length || 0,
openPRs: (prs || []).filter(pr => pr.state === "open").length,
openPRs: openPRCount || 0,
mergedPRs: mergedPRCount || 0,
repoCount: profile?.public_repos || 0,
Comment thread api/master.js
Comment on lines +71 to 72
const linesChanged = await fetchRecentPRLinesChanged(prs, 5);

Comment thread src/svg-master.js
Comment on lines +17 to +20
username, totalPRs = 0, openPRs = 0, mergedPRs = 0, repoCount = 0,
languages = [], contributions = 0, totalCommits = 0, repoList = [],
contributionDays = [], currentStreak = 0, longestStreak = 0,
totalIssues = 0, openIssues = 0, closedIssues = 0, totalStars = 0,
Comment thread src/svg-master.js
});
sections += `</g></g></g></g>`;
<g transform="translate(0, 136)">
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="13" font-weight="600" fill="#${textColor}">Lines Changed <tspan fill="#8b949e" font-weight="400" font-size="11">(recent)</tspan></text>
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