Skip to content

Use self-starred repos as the home-screen feature signal #79

Description

@schmug

Problem

The home screen (desktop icons on OSShell, springboard tiles on MobileShell) shows a manually curated set of GitHub repos, defined in src/apps/featuredRepos.ts. Adding or removing a featured project requires editing the file and opening a PR — the only way to "feature" a repo is via code change.

GitHub already provides a curation primitive: stars. I currently star my own repos that I consider portfolio-worthy. That signal is a much lower-friction "feature this" lever than a hardcoded list.

Proposal

Derive the featured array on /api/projects.json from GET /users/schmug/starred filtered to owner.login === 'schmug', instead of from a hand-maintained config.

Star a repo → it shows up on the home screen on the next deploy. Unstar → it disappears. No code change needed to curate.

A spot check via gh api users/schmug/starred --paginate --jq '.[] | select(.owner.login == \"schmug\")' returns 25 repos today, including everything currently in featuredRepos.ts (scubascore, FeedBat, opml-backup, untitledgoogetool, school-calendar) plus more (dmarcheck, donthype-me, qr-me, apartment-stager, govpeer, AntArt, Conway3.0, etc). So this would also expand the home screen to reflect the actual portfolio.

Scope

  • Add fetchSelfStarred(username) to src/lib/github.ts that paginates /users/{username}/starred?per_page=100 and returns entries where owner.login === username. Reuse the same GITHUB_TOKEN + headers + 0-results-fails-loud pattern already in fetchAllRepos (per Harden build-time GitHub fetch: auth + fail loud on empty #27).
  • Update src/pages/api/projects.json.ts to call fetchSelfStarred('schmug') and pass the result through buildFeaturedRepos — the existing builder already merges live repo metadata with overrides, so the per-repo shape stays the same.
  • Decide what to do with featuredRepos config:
    • Option A (preferred): keep it as a small Record<fullName, { icon?: string; manual?: ... }> for icon overrides + private-repo manual entries. Self-stars become the inclusion signal; the config only customizes presentation.
    • Option B: drop the config entirely; pick icons by language or a default 📦. Simpler, but loses the per-repo emoji.
  • Sort the resulting list. Two reasonable choices: updated_at desc (matches fetchAllRepos's implicit order) or starred_at desc (requires Accept: application/vnd.github.star+json star-with-timestamps response). I'd default to updated_at desc for stability.
  • Update tests in src/lib/github.buildFeatured.test.ts and src/apps/featuredRepos.test.ts to cover the new code path.
  • Update the mobile springboard tile-count derivation in e2e/smoke.spec.ts — the assertion is already derived from apps.length + featuredRepos.length, so if Option A is taken and the config remains, no change needed; if Option B, swap the source.

Edge cases / risks

  • Accidental unstar silently demotes a project. Tradeoff vs. lower curation friction; acceptable.
  • Rate limits are already mitigated by GITHUB_TOKEN and the fail-loud check from Harden build-time GitHub fetch: auth + fail loud on empty #27. The starred endpoint counts the same.
  • Forks appear in my self-stars (e.g. schmug/wuphf, schmug/PhishSOC). Decide whether to filter fork === true — I'd keep them (I starred them deliberately) but flag visually via the existing fork field on FeaturedRepo.
  • Manual private-repo entry for school-calendar is currently in the config because the repo description was missing. If kept under Option A, behavior is unchanged.

Out of scope

  • Re-ranking by stargazer count, language filters, "pinned" overrides — discuss separately if desired.
  • Live (runtime) refresh of the starred set — keep build-time fetch + 1h cache-control as today.

Acceptance

  • Editing my GitHub stars (without touching the repo) and re-deploying changes the home-screen lineup.
  • All current home-screen tiles still appear after migration.
  • npm test and npm run test:e2e green; npm run build succeeds with GITHUB_TOKEN set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions