Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

console: the sidebar's Star us on GitHub pill with the live star count, as the hosted console has it (#338)

github-actions[bot]250d47298566
diff --git a/ui/src/app/api/github-stars/route.ts b/ui/src/app/api/github-stars/route.ts
new file mode 100644
index 00000000..c6464c57
--- /dev/null
+++ b/ui/src/app/api/github-stars/route.ts
@@ -0,0 +1,30 @@
+// The open-source repository's star count for the sidebar's "Star us on GitHub" row. Read from
+// GitHub server-side and kept for ten minutes, so a thousand open consoles do not spend GitHub's
+// unauthenticated rate limit (sixty an hour per address) and the browser never talks to GitHub.
+// When GitHub does not answer there is no number: the row then shows no count rather than a
+// remembered or invented one.
+import { NextResponse } from 'next/server';
+
+const REPO = 'HarnessRouter/harnessrouter';
+const TTL_MS = 10 * 60 * 1000;
+let cached: { stars: number; at: number } | null = null;
+
+export const dynamic = 'force-dynamic';
+
+export async function GET() {
+ if (cached && Date.now() - cached.at < TTL_MS) return NextResponse.json({ stars: cached.stars, repo: REPO });
+ try {
+ const r = await fetch(`https://api.github.com/repos/${REPO}`, {
+ headers: { accept: 'application/vnd.github+json', 'user-agent': 'harnessrouter-console' },
+ cache: 'no-store',
+ });
+ if (!r.ok) throw new Error(`github ${r.status}`);
+ const stars = Number((await r.json())?.stargazers_count);
+ if (!Number.isFinite(stars)) throw new Error('no count');
+ cached = { stars, at: Date.now() };
+ return NextResponse.json({ stars, repo: REPO });
+ } catch (e) {
+ if (cached) return NextResponse.json({ stars: cached.stars, repo: REPO, stale: true });
+ return NextResponse.json({ detail: e instanceof Error ? e.message : 'unavailable' }, { status: 502 });
+ }
+}
diff --git a/ui/src/app/v2.css b/ui/src/app/v2.css
index d3d9b88f..85e705e1 100644
--- a/ui/src/app/v2.css
+++ b/ui/src/app/v2.css
@@ -154,7 +154,16 @@ body {
color: var(--v2-cap); background: #f5f5f4; border-radius: 999px; padding: 2px 7px;
}
-.v2-foot { flex: none; border-top: 1px solid var(--v2-div); padding: 10px 12px; position: relative; }
+/* The sidebar footer, as the hosted console has it: the repository as a bordered pill with its
+ live star count, the places we live as a row of marks under it, then the account. */
+.v2-foot { display: flex; flex-direction: column; gap: 8px; flex: none; border-top: 1px solid var(--v2-div); padding: 12px 14px 10px; position: relative; }
+.v2-starpill { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--v2-line); border-radius: 8px; text-decoration: none; color: var(--v2-ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
+.v2-starpill:hover { border-color: #c4beba; color: var(--v2-ink); text-decoration: none; }
+.v2-starpill > iconify-icon { font-size: 16px; flex: none; color: inherit; }
+.v2-star { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--v2-mono); font-size: 11.5px; color: var(--v2-sec); }
+.v2-star iconify-icon { font-size: 12px; color: inherit; }
+.menu-item-star { display: flex; align-items: center; }
+.v2-foot .v2-account { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--v2-div); border-radius: 0; }
.v2-account {
display: flex; align-items: center; gap: 10px; width: 100%;
padding: 6px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer;
diff --git a/ui/src/components/revamp/Shell.tsx b/ui/src/components/revamp/Shell.tsx
index 05766a5b..cd7d0ac5 100644
--- a/ui/src/components/revamp/Shell.tsx
+++ b/ui/src/components/revamp/Shell.tsx
@@ -82,6 +82,22 @@ const NAV_GROUPS: { label: string | null; items: NavItem[] }[] = [
.map((g) => ({ ...g, items: g.items.filter((n) => !SELF_HOSTED || (n.href && SELF_HOSTED_NAV.includes(n.href))) }))
.filter((g) => g.items.length > 0);
+/** The open-source repository's star count, from the console's own route (which reads GitHub once
+ * per ten minutes for every open console). Null until it is known, and when GitHub does not answer:
+ * the pill shows no number then, never a guessed one. 6400 reads as "6.4k". */
+function useGithubStars(): string | null {
+ const [stars, setStars] = useState<number | null>(null);
+ useEffect(() => {
+ let alive = true;
+ fetch('/api/github-stars', { cache: 'no-store' }).then((r) => (r.ok ? r.json() : null))
+ .then((d) => { if (alive && d && Number.isFinite(d.stars)) setStars(d.stars); })
+ .catch(() => {});
+ return () => { alive = false; };
+ }, []);
+ if (stars === null) return null;
+ return stars >= 1000 ? `${(stars / 1000).toFixed(stars >= 10000 ? 0 : 1)}k` : String(stars);
+}
+
export function Shell({ children, credits }: { children: React.ReactNode; credits?: number | null }) {
const pathname = usePathname() || '';
const router = useRouter();
@@ -159,6 +175,7 @@ export function Shell({ children, credits }: { children: React.ReactNode; credit
return () => mq.removeEventListener('change', sync);
}, []);
const railed = (collapseHere ? railHere : navW < 150) && !mobile;
+ const stars = useGithubStars();
const width = railed ? 64 : navW < 150 ? 268 : navW;
// The width variable must live on the ROOT, not on the aside: .v2-main is a sibling, and a
// custom property set inline on the aside never cascades to it — so the content margin stayed
@@ -458,6 +475,14 @@ export function Shell({ children, credits }: { children: React.ReactNode; credit
<div className="v2-foot" ref={acctRef}>
{/* The four places we live, as a row of marks when the sidebar has the width for it; on
the icon rail the same four move into the account menu instead. */}
+ {/* The open-source repository with its live star count, just above the marks, as the
+ hosted console has it (Richard, 2026-09-29); the icon rail has no room for a row. */}
+ {!railed && (
+ <a className="v2-starpill" href="https://github.com/HarnessRouter/harnessrouter" target="_blank" rel="noreferrer" aria-label="Star us on GitHub">
+ <iconify-icon icon="tabler:brand-github"></iconify-icon><span>Star us on GitHub</span>
+ {stars && <span className="v2-star" aria-label={`${stars} stars`}><iconify-icon icon="tabler:star"></iconify-icon>{stars}</span>}
+ </a>
+ )}
{!railed && (
<div className="v2-socials" aria-label="Community links">
{SOCIALS.map((x) => (
@@ -495,6 +520,12 @@ export function Shell({ children, credits }: { children: React.ReactNode; credit
<button className="menu-item" type="button" onClick={() => { setAcctMenu(false); router.push('/account'); }}><iconify-icon icon="tabler:settings"></iconify-icon>Account settings</button>
</>)}
<a className="menu-item" href="https://harnessrouter.ai/docs" target="_blank" rel="noreferrer"><iconify-icon icon="tabler:book-2"></iconify-icon>Docs</a>
+ {railed && (
+ <a className="menu-item menu-item-star" href="https://github.com/HarnessRouter/harnessrouter" target="_blank" rel="noreferrer">
+ <iconify-icon icon="tabler:brand-github"></iconify-icon>Star us on GitHub
+ {stars && <span className="v2-star" aria-label={`${stars} stars`}><iconify-icon icon="tabler:star"></iconify-icon>{stars}</span>}
+ </a>
+ )}
{railed && SOCIALS.map((x) => (
<a key={x.label} className="menu-item" href={x.href} target="_blank" rel="noreferrer"><iconify-icon icon={x.icon}></iconify-icon>{x.label}</a>
))}