Skip to content

Branch name: feature/github-stars-banner#5

Merged
jaydeeprusia merged 1 commit into
masterfrom
features/jaydeep/github-stars-banner
May 12, 2026
Merged

Branch name: feature/github-stars-banner#5
jaydeeprusia merged 1 commit into
masterfrom
features/jaydeep/github-stars-banner

Conversation

@jaydeeprusia
Copy link
Copy Markdown
Owner

Add GitHub stars badge across public pages

  • Add reusable GitHubStarsLink component
  • Fetch and cache GitHub star count in localStorage
  • Format large star counts with compact notation
  • Add GitHub stars link to landing and auth pages
  • Add GitHub stars link to app shell and contact page
  • Improve header and footer layout formatting
  • Remove unused navigation dependency from app shell
  • Add abort handling for GitHub API requests

What changed?

Added a reusable GitHub stars badge component that fetches and displays the current repository star count. The badge is now shown across key public-facing pages including landing, auth, contact, and app shell screens.

Why?

Improve open-source visibility and social proof for the project by making the GitHub repository more discoverable across the product experience.

Type of change

  • Feature
  • Bug fix
  • Refactor with no behavior change
  • Docs or chore
  • Cherry-pick from local_setup

Verification

  • Verified GitHub star count loads correctly from the GitHub API

  • Verified cached star count is reused when API requests fail

  • Verified badge renders correctly on landing, auth, contact, and app shell pages

  • Verified external GitHub link opens in a new tab

  • Backend tests or relevant API checks

  • Frontend build or relevant browser check

  • Screenshots for meaningful UI changes

Safety checklist

  • No .env file is committed.
  • No real credentials, tokens, AWS keys, OAuth secrets, or JWT secrets are committed.
  • Provider abstractions in backend/auth_provider.py and backend/llm_provider.py remain intact.
  • backend/.env.example keeps open-source-safe placeholder values.
  • I read [BRANCHING.md](../BRANCHING.md) if this touches auth, LLM routing, env files, dependencies, or CI.

Rollback plan

Revert the GitHubStarsLink component and remove its usage from shared layouts and public pages.

Add GitHub stars badge across public pages

* Add reusable GitHubStarsLink component
* Fetch and cache GitHub star count in localStorage
* Format large star counts with compact notation
* Add GitHub stars link to landing and auth pages
* Add GitHub stars link to app shell and contact page
* Improve header and footer layout formatting
* Remove unused navigation dependency from app shell
* Add abort handling for GitHub API requests
Copilot AI review requested due to automatic review settings May 12, 2026 08:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a reusable GitHub stars badge component and integrates it across several public-facing pages/layouts to promote the project’s GitHub presence.

Changes:

  • Introduces GitHubStarsLink component that fetches and displays repo star count with localStorage caching.
  • Adds the stars badge to navigation areas in landing, auth, contact, shared diagnosis, and app shell pages.
  • Cleans up app shell layout formatting and removes an unused useNavigate import.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/components/GitHubStarsLink.jsx New reusable GitHub stars badge with fetch + localStorage cache + abort handling.
frontend/src/pages/Landing.jsx Adds stars badge to landing page nav.
frontend/src/pages/AuthForm.jsx Adds stars badge to auth form header.
frontend/src/pages/AuthCallback.jsx Adds fixed-position stars badge during auth callback screen.
frontend/src/pages/ContactFeedback.jsx Adds stars badge to contact/feedback page header.
frontend/src/pages/SharedDiagnosis.jsx Adds stars badge to shared diagnosis top bar.
frontend/src/pages/AppShell.jsx Adds stars badge to app shell header; removes unused navigation dependency and reformats layout/footer markup.

Comment on lines +20 to +26
React.useEffect(() => {
let ignore = false;

const cachedStars = window.localStorage.getItem(GITHUB_STARS_CACHE_KEY);
if (cachedStars && !Number.isNaN(Number(cachedStars))) {
setStarCount(Number(cachedStars));
}
Comment on lines +28 to +33
const controller = new AbortController();

fetch(`https://api.github.com/repos/${GITHUB_REPO}`, {
signal: controller.signal,
})
.then((res) => {
Comment on lines 143 to +146
<div className="flex items-center gap-2">
<GitHubStarsLink
className="hidden lg:flex items-center gap-2 text-[15px] font-medium tracking-tight text-zinc-600 hover:text-zinc-950 transition-colors"
/>
@jaydeeprusia jaydeeprusia self-assigned this May 12, 2026
@jaydeeprusia jaydeeprusia added the enhancement New feature or request label May 12, 2026
@jaydeeprusia jaydeeprusia merged commit ce0e34f into master May 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants