Skip to content

Add token auth persistence and fix Linux HTML stats rendering#7

Open
SpiritGun91 wants to merge 26 commits intoQuantumByteStudios:mainfrom
SpiritGun91:feature/token-auth-image-fixes
Open

Add token auth persistence and fix Linux HTML stats rendering#7
SpiritGun91 wants to merge 26 commits intoQuantumByteStudios:mainfrom
SpiritGun91:feature/token-auth-image-fixes

Conversation

@SpiritGun91
Copy link
Copy Markdown

Overview

This PR improves reliability, usability, and Linux compatibility for GitHub user data extraction and HTML report viewing.


Highlights

  • Added authenticated GitHub API support via personal access token.
  • Persisted token across runs using a local token file.
  • Fixed Linux HTML viewer path so the generated report opens correctly.
  • Suppressed noisy dconf and MESA startup warnings in Linux viewer flow.
  • Fixed broken stats images by embedding fetched images as base64 data URIs.
  • Replaced paused stats endpoints with working alternatives.

What Changed

Authentication and Rate Limits

  • Added authenticated request headers when GITHUB_TOKEN is present.
  • Kept graceful fallback behavior when no token is provided.

Token Persistence

  • Added token load and save flow in startup prompt logic.
  • Added local token file to git ignore rules to avoid accidental secret commits.

Linux Viewer Reliability

  • Updated Linux viewer to open the generated index.html through an absolute path.
  • Added Linux environment defaults to reduce terminal warning noise.

Stats Rendering Fixes

  • Added fetch + base64 data URI fallback for stats images.
  • Switched Top Languages and GitHub Stats providers to github-profile-summary-cards endpoints.

Why These Changes

  • Unauthenticated GitHub API usage quickly hits strict rate limits.
  • Re-entering a token every run is inconvenient.
  • Linux viewer had path and startup noise issues.
  • External image URLs can fail under local file rendering; data URIs improve consistency.
  • Previous stats provider endpoint was paused and caused broken image sections.

Validation

  • Ran the application successfully on Linux.
  • Confirmed token is loaded from saved file on subsequent runs.
  • Confirmed HTML report generation and viewer launch flow.
  • Confirmed Top Languages, GitHub Stats, and Streak sections render correctly in the local viewer.

Notes

  • Existing unauthenticated behavior is preserved if no token is provided.
  • Token file remains local and untracked by git.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 10, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 15 complexity · 0 duplication

Metric Results
Complexity 15
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

SpiritGun91 added 25 commits May 9, 2026 22:30
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