Conversation
Every post ended with a bare avatar image, and most also carried a hand-written "Written by [@kixelated](...)" line that had drifted -- some pointed at GitHub, some at a mailto for an address that isn't the one I hand out. Replace both with a single <Author /> component so there's one place to change. The component renders the avatar plus icon links for email, X, Bluesky, LinkedIn, and Discord. Icons live in public/social/ as single-path SVGs filled with the same green as public/layout/, so hand-drawn versions can replace them one file at a time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…nt-18883f' into claude/github-stars-social-links-dae52a
GitHub and Discord move below a divider in the sidebar, each with a live count underneath: stars from the GitHub API and members from the Discord invite API, fetched in the browser and cached in localStorage for an hour. The personal social links from the <Author /> sign-off join them as a row of small icons, sharing one list in src/socials.ts. The repeated nav markup is now a NavLink component, and pro.svg is renamed pro-word.svg to match the other word images. Use Cases on the home page become a Feature list with an icon each. The four use-case icons are placeholders, same as the social icons, until hand-drawn versions replace them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Discord echoes the requesting origin in Access-Control-Allow-Origin but marks the response cacheable without Vary: Origin, so a response cached for moq.dev fails the CORS check on doc.moq.dev for five minutes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8cb73177c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // links around them still work. | ||
| export async function renderStats() { | ||
| const stats = readCache() ?? (await fetchStats()); | ||
| if (stats.stars !== undefined || stats.chatters !== undefined) writeCache(stats); |
There was a problem hiding this comment.
Preserve the original timestamp on cache hits
When a visitor returns or navigates within the one-hour TTL, readCache() supplies the cached stats but this unconditional call writes them back with at: Date.now(). Consequently, anyone who loads a page at least once per hour continually extends the cache and may never receive updated community counts; only write the cache after fetchStats() returns fresh data.
Useful? React with 👍 / 👎.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (10)
📒 Files selected for processing (35)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe PR adds shared author and social-link components, then applies the Author component across blog posts and site pages. It replaces global navigation anchors with NavLink components and adds cached GitHub and Discord statistics. It expands Feature artwork for four homepage use cases and renders those use cases with Feature components. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The navigation, author attribution, statistics, and homepage feature updates have no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (33 skipped: 33 unsupported.)
✨ Finishing Touches✨ Simplify code
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 |
Builds on #135 (merged into this branch, so this supersedes it).
What changed
1,515 stars,1,495 chatters), then a row of Email/X/Bluesky/LinkedIn icons. The divider is hidden on mobile where the nav wraps.src/stats.ts). Both APIs allow anonymous CORS. If a fetch fails the text stays empty and the links still work.nav-link.astro; the socials list lives insrc/socials.ts, shared by the nav and<Author />;pro.svgis renamedpro-word.svgto match the other word images.<Feature>list with an icon each. The four icons inpublic/home/use-case/are placeholders, same aspublic/social/, until hand-drawn versions replace them.Gotchas
Access-Control-Allow-Originand caches for 5 minutes withoutVary: Origin, so a response cached for moq.dev would fail CORS on doc.moq.dev. Both fetches usecache: "no-store"./blog//src/...) because ofvite.base: "./". Pre-existing and production is unaffected, but counts won't render on blog pages underjust dev. Separate fix.just checkandbun run buildpass. Companion PR for doc.moq.dev: moq-dev/moq#3677.🤖 Generated with Claude Code
(written by Claude Opus 5)