fix(site): correct stale package index and broken page metadata - #57
Conversation
Two independent defects, both shipping on the live site. 1. Stale generated directory. src/data/directory/directory.json is generated from the package manifests but committed, and nothing regenerated it when PR #22 bumped paranoid-passwd to 3.7.0 — so the index kept advertising 3.6.5 for all three packagers. Regenerated, and added a CI step that re-runs the generator and fails on any diff, so the committed copy can no longer drift from the manifests silently. The step pins Node via .nvmrc. 2. Broken <head> metadata inherited from the upstream Astro template: - og:image / twitter:image pointed at /og/<slug>.png, but this site generates no OG images at all — every page advertised a 404, and the home page emitted literal "og/undefined.png" (no slug prop). Removed the image tags and switched twitter:card to `summary`, which renders correctly without an image. getOGImage.ts and the unused @vercel/og dependency are deleted rather than left orphaned. - og:url pointed every page at the site root; now a real per-page canonical URL, and <link rel="canonical"> is emitted. - favicon and sitemap used root-absolute paths that 404 under the /pkgs base; now base-aware. - description was the template's hardcoded "Astro description"; now the per-page description callers already passed. - twitter:domain was the template's leftover codeagents.dev. `slug` was threaded through Article/Listing solely to feed getOGImage, so it is removed end-to-end rather than left as an unused prop. Verified: astro check clean, build green, node 2/2, ruby 5/5, homebrew + scoop validators pass, and the emitted HTML confirmed to contain per-page canonicals, /pkgs-based asset paths, real descriptions, and zero og:image or "undefined" references. Drift guard tested both ways: passes in sync, fails on a simulated manifest bump.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Review Summary
This PR successfully addresses two production defects with comprehensive fixes:
1. Package Index Synchronization ✅
The CI step added in .github/workflows/validate-packages.yml properly guards against directory.json drift by regenerating and comparing with git diff. This prevents the exact issue where paranoid-passwd showed 3.6.5 when 3.7.0 had shipped.
2. Metadata Corrections ✅
The BaseLayout changes fix multiple SEO and metadata issues inherited from the Astro template:
- Per-page canonical URLs now work correctly instead of all pointing to site root
- Base-aware asset paths prevent 404s under the
/pkgssubdirectory - Twitter card downgraded to
summary(appropriate since no OG images are generated) - Description metadata now uses actual page descriptions instead of hardcoded "Astro description"
- Unused
@vercel/ogdependency and related code properly cleaned up
All changes are well-structured and the implementation correctly achieves the stated goals. No blocking issues found.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Two independent defects, both currently shipping on the live site.
1. The package index was advertising a stale version
src/data/directory/directory.jsonis generated from the package manifests but committed to the repo. Nothing regenerated it when #22 bumped paranoid-passwd to 3.7.0, so the site kept advertising 3.6.5 for chocolatey, homebrew-formula, and scoop.Regenerated — and added a CI step that re-runs the generator and fails on any diff, so the committed copy can no longer drift silently. Tested both directions:
2.
<head>metadata inherited from the upstream Astro template/og/<slug>.png— no OG images are generated at all, every page advertised a 404twitter:card→summaryog/undefined.png(noslugprop)og:url<link rel="canonical">emitted/pkgs"Astro description"twitter:domaincodeagents.devjonbogaty.comgetOGImage.tsand the unused@vercel/ogdependency are deleted rather than left orphaned, andslug— threaded through Article/Listing only to feedgetOGImage— is removed end-to-end.Verification
Emitted HTML confirmed, not just assumed:
astro checkclean · build green · node 2/2 · ruby 5/5 · homebrew + scoop validators pass.Note: radioactive-ralph deliberately NOT bumped
The tap ships ralph 0.8.2 while tags exist up to v0.25.0 — but every release above 0.8.2 is a draft or has zero assets. Draft assets are not publicly downloadable, so bumping would produce a manifest whose URL 404s for users. 0.8.2 still resolves HTTP 200. This needs fixing in
jbcom/radioactive-ralph's release pipeline, not here.