Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2026-04-03

### Added

- Coding personality badge (Builder, Reviewer, Collaborator, Maker, All-Rounder) based on contribution mix
- Quick insights row: average contributions per active day, velocity trend indicator, own/fork ratio
- Contribution velocity tracking (compares last 4 weeks vs previous 4 weeks)
- Repo growth timeline bar chart showing repository creation history by year
- Profile comparison section when viewing someone else's profile (contributions, stars, repos, PRs diff)
- Viewer stats persistence for profile comparison across sessions
- Heatmap legend (Less/More scale)
- Most active weekday highlight in activity chart
- Error state with retry button for failed API calls
- Stat card tooltips showing exact values on hover

### Changed

- Donut chart enlarged for better readability (64px to 80px)
- Small percentages now show "<1%" instead of rounding to "0%"
- Busiest day count uses locale-formatted numbers
- Member since year shown in header badge
- Repo names use flex-based truncation instead of fixed max-width
- Removed unused organizations query from GraphQL (no longer needs read:org scope)

## [1.0.0] - 2026-03-28

### Added
Expand All @@ -30,4 +54,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Privacy policy (PRIVACY.md)
- Manifest V3

[1.1.0]: https://github.com/Sagargupta16/GitScope/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/Sagargupta16/GitScope/releases/tag/v1.0.0
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
## Features

- **Stats Grid** - Total stars, yearly contributions, current/longest streak, merged PRs, repository count
- **Coding Personality** - Badge like "Builder", "Reviewer", or "Collaborator" based on contribution mix
- **Quick Insights** - Avg contributions per active day, velocity trend, own/fork ratio
- **Language Breakdown** - Color-coded bar chart and legend showing language distribution
- **Top Repositories** - Top 5 repos by stars with language and star count
- **Activity Heatmap** - Compact 20-week contribution heatmap
- **Activity Heatmap** - Compact 20-week contribution heatmap with Less/More legend
- **Contribution Donut** - Commits, PRs, reviews, and issues breakdown chart
- **Activity by Day** - Bar chart showing which day of the week you're most active
- **Repo Growth Timeline** - Bar chart showing repository creation history by year
- **Profile Comparison** - Compare any profile against your own stats (contributions, stars, repos, PRs)
- **Footer Stats** - Busiest day of the year, starred repos count
- **Error State** - Friendly error message with retry button
- **Loading Skeleton** - Shimmer animation while data loads
- **Dark Theme** - Automatically adapts to GitHub's light/dark theme
- **SPA Navigation** - Works across GitHub page transitions (turbo:load)
Expand Down
187 changes: 184 additions & 3 deletions src/css/insights.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
background: var(--bgColor-default, #ffffff);
padding: 12px 8px;
text-align: center;
cursor: default;
}

.gpi-stat-value { font-size: 18px; font-weight: 700; color: var(--fgColor-default, #24292f); line-height: 1.2; }
Expand Down Expand Up @@ -95,7 +96,8 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 140px;
flex: 1;
min-width: 0;
}

.gpi-repo-name:hover { text-decoration: underline; }
Expand Down Expand Up @@ -129,7 +131,7 @@
/* Contribution Donut */
.gpi-contrib-section { padding: 12px 16px; }
.gpi-contrib-content { display: flex; align-items: center; gap: 16px; }
.gpi-donut { width: 64px; height: 64px; flex-shrink: 0; }
.gpi-donut { width: 80px; height: 80px; flex-shrink: 0; }
.gpi-contrib-stats { display: flex; flex-direction: column; gap: 4px; }

.gpi-contrib-row {
Expand Down Expand Up @@ -163,6 +165,135 @@
}

.gpi-weekday-label { font-size: 9px; color: var(--fgColor-muted, #656d76); margin-top: 4px; }
.gpi-weekday-bar-active { background: var(--fgColor-accent, #0969da) !important; }
.gpi-weekday-label-active { color: var(--fgColor-accent, #0969da); font-weight: 600; }

/* Heatmap Legend */
.gpi-heatmap-legend {
display: flex;
align-items: center;
gap: 3px;
justify-content: flex-end;
margin-top: 6px;
font-size: 10px;
color: var(--fgColor-muted, #656d76);
}

.gpi-heatmap-legend .gpi-heatmap-cell {
display: inline-block;
}

/* Personality + Quick Insights Row */
.gpi-insights-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}

.gpi-personality {
display: flex;
flex-direction: column;
gap: 2px;
}

.gpi-personality-label {
font-size: 13px;
font-weight: 600;
color: var(--fgColor-default, #24292f);
}

.gpi-personality-desc {
font-size: 11px;
color: var(--fgColor-muted, #656d76);
}

.gpi-quick-stats {
display: flex;
gap: 10px;
flex-wrap: wrap;
}

.gpi-quick-stat {
font-size: 11px;
color: var(--fgColor-muted, #656d76);
background: var(--bgColor-muted, #f6f8fa);
padding: 2px 8px;
border-radius: 12px;
white-space: nowrap;
}

.gpi-trend-up { color: #238636; }
.gpi-trend-down { color: #da3633; }
.gpi-trend-neutral { color: var(--fgColor-muted, #656d76); }

/* Repo Growth Timeline */
.gpi-timeline {
display: flex;
gap: 3px;
align-items: flex-end;
height: 40px;
}

.gpi-timeline-col {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
justify-content: flex-end;
}

.gpi-timeline-bar {
width: 100%;
background: #40c463;
border-radius: 2px 2px 0 0;
min-height: 2px;
transition: height 0.3s ease;
}

.gpi-timeline-label {
font-size: 9px;
color: var(--fgColor-muted, #656d76);
margin-top: 3px;
}

/* Profile Comparison */
.gpi-compare-grid {
display: flex;
flex-direction: column;
gap: 6px;
}

.gpi-compare-row {
display: flex;
align-items: center;
font-size: 12px;
gap: 8px;
}

.gpi-compare-label {
flex: 1;
color: var(--fgColor-muted, #656d76);
}

.gpi-compare-theirs {
font-weight: 600;
color: var(--fgColor-default, #24292f);
min-width: 45px;
text-align: right;
}

.gpi-compare-diff {
font-size: 11px;
min-width: 50px;
text-align: right;
color: var(--fgColor-muted, #656d76);
}

.gpi-diff-pos { color: #238636; }
.gpi-diff-neg { color: #da3633; }

/* Footer stats */
.gpi-footer-stats {
Expand All @@ -176,6 +307,33 @@
/* Token Prompt */
.gpi-prompt-text { font-size: 13px; color: var(--fgColor-default, #24292f); margin: 0; line-height: 1.5; }

.gpi-feature-list {
margin: 8px 0 0 0;
padding-left: 18px;
font-size: 12px;
color: var(--fgColor-muted, #656d76);
line-height: 1.8;
}

/* Error State */
.gpi-error-section { text-align: center; padding: 16px; }
.gpi-error-text { font-size: 13px; color: var(--fgColor-muted, #656d76); margin-bottom: 10px; }

.gpi-retry-btn {
padding: 6px 16px;
font-size: 12px;
font-weight: 600;
border: 1px solid var(--borderColor-default, #d0d7de);
border-radius: 6px;
background: var(--bgColor-default, #ffffff);
color: var(--fgColor-default, #24292f);
cursor: pointer;
}

.gpi-retry-btn:hover {
background: var(--bgColor-muted, #f6f8fa);
}

/* Loading Skeleton */
.gpi-skeleton-line {
background: linear-gradient(90deg,
Expand All @@ -196,12 +354,35 @@
100% { background-position: -200% 0; }
}

/* Dark theme */
/* Dark theme - uses GitHub's data-color-mode attribute */
[data-color-mode="dark"] .gpi-heatmap-cell[data-level="0"],
[data-dark-theme="dark"] .gpi-heatmap-cell[data-level="0"] { background: #161b22; }
[data-color-mode="dark"] .gpi-heatmap-cell[data-level="1"],
[data-dark-theme="dark"] .gpi-heatmap-cell[data-level="1"] { background: #0e4429; }
[data-color-mode="dark"] .gpi-heatmap-cell[data-level="2"],
[data-dark-theme="dark"] .gpi-heatmap-cell[data-level="2"] { background: #006d32; }
[data-color-mode="dark"] .gpi-heatmap-cell[data-level="3"],
[data-dark-theme="dark"] .gpi-heatmap-cell[data-level="3"] { background: #26a641; }
[data-color-mode="dark"] .gpi-heatmap-cell[data-level="4"],
[data-dark-theme="dark"] .gpi-heatmap-cell[data-level="4"] { background: #39d353; }
[data-color-mode="dark"] .gpi-weekday-bar,
[data-dark-theme="dark"] .gpi-weekday-bar { background: #26a641; }
[data-color-mode="dark"] .gpi-weekday-bar-active,
[data-dark-theme="dark"] .gpi-weekday-bar-active { background: #58a6ff !important; }
[data-color-mode="dark"] .gpi-timeline-bar,
[data-dark-theme="dark"] .gpi-timeline-bar { background: #26a641; }
[data-color-mode="dark"] .gpi-quick-stat,
[data-dark-theme="dark"] .gpi-quick-stat { background: #161b22; }

/* Fallback for system preference */
@media (prefers-color-scheme: dark) {
.gpi-heatmap-cell[data-level="0"] { background: #161b22; }
.gpi-heatmap-cell[data-level="1"] { background: #0e4429; }
.gpi-heatmap-cell[data-level="2"] { background: #006d32; }
.gpi-heatmap-cell[data-level="3"] { background: #26a641; }
.gpi-heatmap-cell[data-level="4"] { background: #39d353; }
.gpi-weekday-bar { background: #26a641; }
.gpi-weekday-bar-active { background: #58a6ff !important; }
.gpi-timeline-bar { background: #26a641; }
.gpi-quick-stat { background: #161b22; }
}
2 changes: 1 addition & 1 deletion src/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h1>GitScope</h1>
</div>

<div class="footer">
<a href="https://github.com/Sagargupta16/github-profile-insights" target="_blank">GitHub</a>
<a href="https://github.com/Sagargupta16/GitScope" target="_blank">GitHub</a>
&middot; v1.0.0
</div>

Expand Down
4 changes: 1 addition & 3 deletions src/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ const PROFILE_QUERY = `
following { totalCount }
starredRepositories { totalCount }
gists { totalCount }
organizations(first: 5) {
nodes { login avatarUrl name }
}
repositories(first: 100, ownerAffiliations: OWNER, orderBy: {field: STARGAZERS, direction: DESC}) {
totalCount
nodes {
Expand All @@ -24,6 +21,7 @@ const PROFILE_QUERY = `
stargazerCount
forkCount
primaryLanguage { name color }
createdAt
updatedAt
isArchived
isFork
Expand Down
3 changes: 1 addition & 2 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
.then(data => {
if (data?.errors) {
console.error("[GPI] GraphQL errors:", JSON.stringify(data.errors, null, 2));
// Still return partial data if available
sendResponse(data?.data || null);
} else {
sendResponse(data?.data || null);
Expand All @@ -24,7 +23,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
console.error("[GPI] Fetch error:", err);
sendResponse(null);
});
return true; // keep channel open for async response
return true;
}

if (message.type === "GPI_FETCH_USER") {
Expand Down
Loading