Fix #137: calm owners page + star counts #141

Merged
crueber merged 2 commits from fix/issue-137 into main 2026-09-05 16:08:26 +00:00
Owner

Owners page was cards-in-cards (intro card + one big card per owner); every repo row now also shows its star count.

Calm layout (web/src/pages/Owners.jsx, 12 §2.3.1): per-owner .card sections flatten to a divide-y divider stack with a quieter text-sm owner heading. Intro card, newest-first order, caps (MAX_OWNERS 50 / MAX_REPOS_PER_OWNER 10), and overflow links (+N more →, showing-newest-N) from #117 are unchanged. Links stay plain anchors (keyboard flow unchanged); shared .muted/emerald-link classes carry dark + light.

Star counts (new web/src/components/StarCount.jsx + web/src/lib/stars.js): every repo row on / and /:owner renders (N ⭐) beside the link via the existing GET …/api/social (07 §7, no backend change) under the shared social:{o}/{r} 30 s useData key — single-flighted, LRU-capped, so the two pages share fetches and repeat visits within the TTL cost zero GETs. Links render first with a muted (…) placeholder, so counts never block page render; worst case stays bounded by the #117 caps (50×10 = 500 GETs cold, each independent). Headless cover: web/test/unit/stars.test.js (fmtStars + SOCIAL_TTL contract).

Scope audit: org page has no repo listing; starred lists are SDK-only (no listing UI yet); repo chrome already shows its count via the star toggle — so / + /:owner is everywhere a repo list renders.

Verification: node --test full unit suite 313/313 green; real-browser drive (isolated headless-shell on own CDP port, scratch binary + filesystem store, seeded acme/{demo,web} + jane/blog) — owners + owner pages in dark and light, star counts render, zero console errors. Note: ⭐ renders as tofu in the minimal headless-shell font set; fine on real systems. No new npm deps; no backend change (Go gates N/A).

Owners page was cards-in-cards (intro card + one big card per owner); every repo row now also shows its star count. **Calm layout** (`web/src/pages/Owners.jsx`, 12 §2.3.1): per-owner `.card` sections flatten to a `divide-y` divider stack with a quieter `text-sm` owner heading. Intro card, newest-first order, caps (`MAX_OWNERS` 50 / `MAX_REPOS_PER_OWNER` 10), and overflow links (`+N more →`, showing-newest-N) from #117 are unchanged. Links stay plain anchors (keyboard flow unchanged); shared `.muted`/emerald-link classes carry dark + light. **Star counts** (new `web/src/components/StarCount.jsx` + `web/src/lib/stars.js`): every repo row on `/` and `/:owner` renders `(N ⭐)` beside the link via the existing `GET …/api/social` (07 §7, no backend change) under the shared `social:{o}/{r}` 30 s `useData` key — single-flighted, LRU-capped, so the two pages share fetches and repeat visits within the TTL cost zero GETs. Links render first with a muted `(…)` placeholder, so counts never block page render; worst case stays bounded by the #117 caps (50×10 = 500 GETs cold, each independent). Headless cover: `web/test/unit/stars.test.js` (`fmtStars` + `SOCIAL_TTL` contract). **Scope audit**: org page has no repo listing; starred lists are SDK-only (no listing UI yet); repo chrome already shows its count via the star toggle — so `/` + `/:owner` is everywhere a repo list renders. **Verification**: `node --test` full unit suite 313/313 green; real-browser drive (isolated headless-shell on own CDP port, scratch binary + filesystem store, seeded acme/{demo,web} + jane/blog) — owners + owner pages in dark and light, star counts render, zero console errors. Note: ⭐ renders as tofu in the minimal headless-shell font set; fine on real systems. No new npm deps; no backend change (Go gates N/A).
Sign in to join this conversation.
No description provided.