Skip to content

feat(wakatime): split sections into independent per-facet keys#35

Merged
thisisrick25 merged 1 commit into
mainfrom
feat/wakatime-granular-sections
Jul 24, 2026
Merged

feat(wakatime): split sections into independent per-facet keys#35
thisisrick25 merged 1 commit into
mainfrom
feat/wakatime-granular-sections

Conversation

@thisisrick25

Copy link
Copy Markdown
Owner

Splits the coupled last30 and allTime WakaTime section keys into fully independent per-facet keys so each Total / Languages / Editors block is toggleable and orderable via PLUGIN_CONFIG.

New section keys (9 total)

  • last30Total - Last 30 Days total + daily average headline
  • last30Languages - Last 30 Days top languages
  • last30Editors - Last 30 Days top editors
  • allTimeTotal - lifetime total headline
  • allTimeLanguages - lifetime top languages
  • allTimeEditors - lifetime top editors
  • sinceToday - all-time-total one-liner (unchanged)
  • insightsLanguages - last-year languages (unchanged)
  • insightsEditors - last-year editors (unchanged)

Breaking change

The previous bundled last30 and allTime keys are removed (no aliases). DEFAULT_SECTIONS is now ['last30Languages'].

Implementation notes

  • Added a per-run endpoint cache so keys sharing an endpoint (e.g. the three last30* keys all read /stats/last_30_days) fetch it only once.
  • renderSection remains an exhaustive switch over the 9 keys (no default).
  • Graceful per-section degradation preserved.

Verification

  • npm run build exit 0
  • npx tsc --noEmit exit 0 (strict tsconfig satisfied)

@thisisrick25
thisisrick25 merged commit d656396 into main Jul 24, 2026
@thisisrick25
thisisrick25 deleted the feat/wakatime-granular-sections branch July 24, 2026 09:08
@thisisrick25 thisisrick25 Bot mentioned this pull request Jul 24, 2026
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.

1 participant