Skip to content

feat: add developer profile summary export#460

Merged
Priyanshu-byte-coder merged 9 commits into
Priyanshu-byte-coder:mainfrom
Srushti-Kamble14:feat/issue-433-dev-stats-export
May 22, 2026
Merged

feat: add developer profile summary export#460
Priyanshu-byte-coder merged 9 commits into
Priyanshu-byte-coder:mainfrom
Srushti-Kamble14:feat/issue-433-dev-stats-export

Conversation

@Srushti-Kamble14
Copy link
Copy Markdown
Contributor

Summary

Added an enhanced developer productivity summary export feature to the dashboard.

Brief description of what this PR does.

Users can now:

Copy a professional productivity summary to clipboard
Download a formatted PDF summary for sharing

The export now includes:

Current streak
Longest streak
Total contributions
Best day
Best week
Most active month
PR merge rate
Top repository details
Repository activity
Goals progress

Closes #433

Type of Change

New feature

Changes Made

Updated ExportButton.tsx
Added clipboard summary export functionality
Added improved PDF export functionality
Added longest streak, best day, best week, and most active month to exports
Improved PDF formatting and pagination
Fixed Unicode/icon rendering issues in PDFs
Added safer API response handling
Improved repository contribution parsing
Reduced unnecessary API calls to avoid rate-limit issues
Added fallback handling for inconsistent backend response structures

How to Test

Steps for the reviewer to verify this works:

1.Open the dashboard
2.Click Copy Profile Summary
3.Verify the copied summary contains all productivity metrics
4.Click Download PDF
5.Verify the PDF downloads successfully
6.Check that the PDF content is properly formatted and readable
7.Verify streaks, contributions, repository activity, and goals display correct values

Screenshots (if UI change)

Screenshot 2026-05-20 211141 Screenshot 2026-05-20 211206 Screenshot 2026-05-20 211243

Checklist

  • [✓ ] Linked issue in summary
  • [ ✓] npm run lint passes locally
  • [ ✓] No TypeScript errors (npm run type-check)
  • [ ✓] Self-reviewed the diff
  • [ ✓] Added/updated tests if applicable

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

@Srushti-Kamble14 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.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature labels May 20, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

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

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required fixes before merge:

  1. CSV export regression — must restore. The existing exportCSV function and "Export CSV" button were removed. Issue #433 only asks for a profile summary — it does not authorize removing CSV export. Restore both.

  2. Debug console.log in production. Remove:

    console.log("RAW REPOS RESPONSE:", reposJson);
  3. alert() instead of toast. alert("Profile summary copied to clipboard!") and alert("Failed to export PDF.") block the UI thread. Use the project's existing toast/notification system.

  4. Dead code — remove unused variables.

    • repoCommits is computed but never used in the summary or PDF.
    • completedGoals is computed but never appears in the output despite the PR description claiming "Goals progress" is included.
  5. any cast in sort comparatorreposData is already typed as RepoData[], no cast needed.

  6. Missing EOF newline on ExportButton.tsx.

@Priyanshu-byte-coder Priyanshu-byte-coder added the level:intermediate GSSoC: Intermediate difficulty (35 pts) label May 20, 2026
@Srushti-Kamble14
Copy link
Copy Markdown
Contributor Author

Ok @Priyanshu-byte-coder I'm working on it

@Srushti-Kamble14
Copy link
Copy Markdown
Contributor Author

Hey @Priyanshu-byte-coder , I’ve made the required changes. Please review them once and let me know if any further changes are needed.

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress made — console.log removed, alert() replaced, dead code cleaned. Two remaining issues:

  1. CSV export not restored. The "Export CSV" button now exports the plain-text social summary into a .csv file (wrong MIME content). The original structured CSV (PR metrics, commit activity, goals rows with headers) must be restored as a separate function alongside the new summary copy feature. Replacing CSV with a summary dump is not the same as restoring it.

  2. Missing EOF newline on ExportButton.tsx.

@Srushti-Kamble14
Copy link
Copy Markdown
Contributor Author

Sorry for the inconvenience. I’ve now restored the original structured CSV export functionality instead of exporting the summary text into a .csv file.

The CSV now correctly includes:

  • PR Metrics
  • Contribution Metrics
  • Goals data with proper headers
  • NA fallback when no goals exist

I also fixed the missing EOF newline issue in ExportButton.tsx.

Please review the changes and let me know if anything still needs improvement.

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues:

  1. Missing EOF newline on src/components/ExportButton.tsx. Add a newline after the last line.

  2. CSV export regression — the previous CSV implementation exported structured data with named columns. Please verify the new exportCSV function produces valid CSV with headers and rows, not summary/narrative text.

@Srushti-Kamble14
Copy link
Copy Markdown
Contributor Author

@Priyanshu-byte-coder

Missing EOF newline — Fixed. Added newline after the last line in ExportButton.tsx

CSV export validation — Verified the exportCSV function produces valid, structured CSV output with:

PR Metrics section with headers: Open,Merged,Avg Review Hours,Merge Rate
Commit Activity section with headers: Date,Commits
Goals section with headers: Label,Current,Target,Progress (%)
Proper CSV MIME type (text/csv)
Correct column names and formatted data rows (not narrative/summary text)

The CSV now properly exports structured metrics with headers and rows as in the original implementation. Ready for review!

@Priyanshu-byte-coder Priyanshu-byte-coder merged commit 9dee298 into Priyanshu-byte-coder:main May 22, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

@Priyanshu-byte-coder Priyanshu-byte-coder added the gssoc:approved GSSoC: PR approved for scoring label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) type:feature GSSoC type bonus: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add a button that copies / download pdf of a short developer stats summary to clipboard.

2 participants