From 3fa396d7dbd27e7eaeeed2c47c943c50f413d412 Mon Sep 17 00:00:00 2001 From: Tien Nguyen Minh Date: Sun, 19 Apr 2026 09:09:25 +0700 Subject: [PATCH] docs: resync remaining stale references after S-tier + demo changes (#5) - deployment-guide.md: embed example now lists all 14 cards (was 9). - codebase-summary.md: FetchProductive row includes Weekday / WeekdayAllTime; shared helpers list adds renderWeekday, renderHeatmap, mixHex/parseHex. - system-architecture.md: per-commit fetch diagram shows the weekday bucket alongside the hour bucket. --- docs/codebase-summary.md | 7 +++++-- docs/deployment-guide.md | 6 ++++++ docs/system-architecture.md | 8 +++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/codebase-summary.md b/docs/codebase-summary.md index c3f75198..d4870ed8 100644 --- a/docs/codebase-summary.md +++ b/docs/codebase-summary.md @@ -59,7 +59,7 @@ All network I/O. Exposes a `*Client` with three fetchers; every call takes a `co | --- | --- | --- | | `FetchProfile(ctx, login, opts)` | username, visibility flags | Profile basics, totals, owned-repos aggregation, last-year daily calendar, `TopRepos` | | `FetchContributionsAllTime(ctx, p, opts)` | Profile | `SeedRepos`, `DailyContributionsAllTime`, `TotalCommitsAllTime` | -| `FetchProductive(ctx, p, repos, loc, cap)` | Profile + seed + tz + cap | `Productive`, `CommitsByLanguage`, `ProductiveAllTime`, `CommitsByLanguageAllTime` | +| `FetchProductive(ctx, p, repos, loc, cap)` | Profile + seed + tz + cap | `Productive`, `Weekday`, `CommitsByLanguage`, `ProductiveAllTime`, `WeekdayAllTime`, `CommitsByLanguageAllTime` | Call order in `main.go`: Profile → AllTime → Productive. `Client.query` handles GitHub rate limits transparently — on 429 or 403 with `X-RateLimit-Remaining: 0`, it honors `Retry-After` / `X-RateLimit-Reset` (capped at 5 minutes) and retries once. @@ -78,8 +78,11 @@ type Card interface { Shared helpers: - `renderDonutCard` — language donut + legend (used by 3 language cards) -- `renderProductiveTime` — 24h bar chart (used by both productive cards) +- `renderProductiveTime` — 24h bar chart (used by both productive-time cards) +- `renderWeekday` — 7-bar day-of-week chart (used by both productive-weekday cards) - `renderContributions` — smooth area chart (used by both contributions cards) +- `renderHeatmap` — 7×N calendar grid with `mixHex`-derived intensity ramp +- `mixHex` / `parseHex` — `#rrggbb` blending (used by heatmap, by-year, weekday for peak-vs-dim bars) - `header`, `footer` — SVG chrome - `niceTicks`, `formatTick` — axis math diff --git a/docs/deployment-guide.md b/docs/deployment-guide.md index 95203cec..67e601a5 100644 --- a/docs/deployment-guide.md +++ b/docs/deployment-guide.md @@ -56,10 +56,16 @@ Create one at → "Generate new token (clas ![most-commit-language](./output/dracula/most-commit-language.svg) ![stats](./output/dracula/stats.svg) ![productive-time](./output/dracula/productive-time.svg) +![productive-weekday](./output/dracula/productive-weekday.svg) ![contributions](./output/dracula/contributions.svg) +![contributions-heatmap](./output/dracula/contributions-heatmap.svg) +![top-starred-repos](./output/dracula/top-starred-repos.svg) +![streak](./output/dracula/streak.svg) ![most-commit-language-all-time](./output/dracula/most-commit-language-all-time.svg) ![productive-time-all-time](./output/dracula/productive-time-all-time.svg) +![productive-weekday-all-time](./output/dracula/productive-weekday-all-time.svg) ![contributions-all-time](./output/dracula/contributions-all-time.svg) +![contributions-by-year](./output/dracula/contributions-by-year.svg) ``` The Action commits SVGs to `output//` on the default branch. GitHub serves them from the raw URL the README references. diff --git a/docs/system-architecture.md b/docs/system-architecture.md index 94e7d4f0..b1d11afa 100644 --- a/docs/system-architecture.md +++ b/docs/system-architecture.md @@ -46,9 +46,11 @@ FetchContributionsAllTime(ctx, profile, opts) FetchProductive(ctx, profile, profile.SeedRepos, loc, commitsPerRepo) │ commitHistoryQuery × (#seeds × pages) │ per commit: t = committedDate in loc - │ ProductiveAllTime[t.Hour]++ + language votes - │ if t.After(yearAgo): Productive[t.Hour]++ + language votes - │ yields: Productive, ProductiveAllTime, + │ ProductiveAllTime[t.Hour]++ + │ WeekdayAllTime[t.Weekday]++ + language votes + │ if t.After(yearAgo): Productive[t.Hour]++ + │ Weekday[t.Weekday]++ + language votes + │ yields: Productive, Weekday, ProductiveAllTime, WeekdayAllTime, │ CommitsByLanguage, CommitsByLanguageAllTime │ ▼