feat(website): add Star on GitHub button to hero CTA row#316
Conversation
Hero only had START IN 60 SECONDS + SEE IT MOVE. Missing the obvious
CTA for visitors who landed via X/Reddit and want to bookmark before
installing.
Adds GitHubStarButton component next to the existing ghost button:
- ghost-style button matching the existing visual register
(no new design surface introduced)
- star icon (inline SVG, currentColor) + STAR label + live
star count
- count fetches once on mount from api.github.com/repos/<repo>
(unauthenticated, 60 req/h limit per IP — fine for a marketing page)
- 30-minute localStorage cache keyed by repo so repeat visits don't
re-hit the API
- graceful degradation: if fetch fails (offline, rate-limited,
blocked), button still renders without the count
Only client-side ("use client") because we want the live count.
No deps added. Build clean (Next 16 static export).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a new GitHub Star Button component that fetches stargazer counts via GitHub API with localStorage caching, integrates it into the hero section, and updates build metadata for version 0.9.10 with 898 passing tests. ChangesGitHub Star Button Feature
Sequence DiagramsequenceDiagram
participant GitHubStarButton
participant LocalStorage
participant GitHubAPI
participant UI as Rendered UI
GitHubStarButton->>LocalStorage: Check cached stars (30-min TTL)
alt Cache hit and valid
LocalStorage-->>GitHubStarButton: Return cached count
else Cache miss or expired
GitHubStarButton->>GitHubAPI: Fetch repo stargazers_count
GitHubAPI-->>GitHubStarButton: Return count
GitHubStarButton->>LocalStorage: Update cache with new count
end
GitHubStarButton->>GitHubStarButton: Format count to "k" notation
GitHubStarButton->>UI: Render button with formatted count
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… website star button (#317) Three landed PRs since v0.9.10: - #311 — Codex plugin support (manifest + marketplace + Codex-shaped hooks subset, sharing the same scripts as the Claude Code plugin via CLAUDE_PLUGIN_ROOT OOTB-compat injection on Codex's hook engine) - #310 — OpenClaw plugins.slots.memory now actually claimed via api.registerMemoryCapability({ promptBuilder }); older builds without the capability API still load via the existing hook-only path - #316 — Star on GitHub button in the website hero CTA row, live stargazer count via api.github.com, 30-minute localStorage cache, graceful degrade on API failure Bumping 0.9.10 -> 0.9.11 across the 8 standard files: - package.json - packages/mcp/package.json - plugin/.claude-plugin/plugin.json - plugin/.codex-plugin/plugin.json - src/version.ts - src/types.ts (ExportData.version literal) - src/functions/export-import.ts (supportedVersions) - test/export-import.test.ts (round-trip expectation) - CHANGELOG.md (new 0.9.11 entry) 877 / 877 tests pass. Build clean.
Why
Hero CTA row had START IN 60 SECONDS + SEE IT MOVE but no GitHub star path. Visitors landing from X / Reddit / HN have nowhere obvious to bookmark before they leave to install.
What
Adds
GitHubStarButtonnext to the existing ghost button.api.github.com/repos/rohitg00/agentmemory(unauthenticated, 60 req/h per IP — plenty for a marketing page)localStoragecache keyed by repo so repeat visits don't re-hit the API"use client"because the count is live. No deps added.Files
website/components/GitHubStarButton.tsx— newwebsite/components/GitHubStarButton.module.css— newwebsite/components/Hero.tsx— adds<GitHubStarButton repo="rohitg00/agentmemory" />afterSEE IT MOVETest plan
cd website && npm run build— Next 16 static export clean, no type errors.https://github.com/rohitg00/agentmemoryin new tab.Summary by CodeRabbit
Release Notes