feat(blog): add Refactron npm package announcement post#133
Conversation
Covers v2.0 TypeScript rewrite, npm distribution, blast radius analysis, temporal safety intelligence from git history, and multi-language support.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds a new blog post entry and sitemap URL, introduces an announcement banner component and hook integrated into PageLayout and NavigationBar, updates HeroSection to cycle installer commands with copy/animation behavior, and adds industry-aware icons for blog components. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant PL as PageLayout
participant HB as useAnnouncementBanner
participant AB as AnnouncementBanner
participant NB as NavigationBar
participant SS as sessionStorage
U->>PL: Load page
PL->>HB: call useAnnouncementBanner()
HB->>SS: read dismissal key
SS-->>HB: dismissal state
alt not dismissed & enabled
HB-->>PL: { visible: true, dismiss() }
PL->>AB: render AnnouncementBanner (onDismiss=dismiss)
PL->>NB: render NavigationBar(bannerVisible=true)
U->>AB: click CTA / close
AB->>HB: call dismiss()
HB->>SS: write dismissal key
HB-->>PL: visible=false
PL->>NB: update NavigationBar(bannerVisible=false)
else dismissed or disabled
HB-->>PL: { visible: false }
PL->>NB: render NavigationBar(bannerVisible=false)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
|
👋 Thanks for opening this pull request! A maintainer will review it soon. Please make sure all CI checks pass. |
There was a problem hiding this comment.
Pull request overview
Adds a new marketing/blog announcement post for the Refactron npm package release and updates SEO sitemap coverage so the new post URL is discoverable.
Changes:
- Added a new blog post entry (
refactron-is-now-a-nodejs-package) to the in-repo post registry. - Updated
public/sitemap.xmlto include the new blog post URL.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/data/posts.ts | Adds the new npm package announcement post content and metadata (slug/title/tags/body). |
| public/sitemap.xml | Adds the new blog URL so it’s included in the main domain sitemap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@public/sitemap.xml`:
- Line 1: The sitemap was manually edited but is auto-generated by
scripts/generate-sitemap.js (invoked via package.json prebuild), so revert
changes in public/sitemap.xml and let the generator recreate it; ensure the new
blog post exists in src/data/posts.ts with the correct slug (e.g.,
"refactron-is-now-a-nodejs-package"), then run node scripts/generate-sitemap.js
and commit the regenerated public/sitemap.xml instead of manual edits.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 92559cda-a7e9-4d1b-a8d8-175070777f8a
📒 Files selected for processing (2)
public/sitemap.xmlsrc/data/posts.ts
| @@ -1 +1 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://refactron.dev/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url><url><loc>https://refactron.dev/blog</loc><changefreq>weekly</changefreq><priority>0.9</priority></url><url><loc>https://refactron.dev/about</loc><changefreq>monthly</changefreq><priority>0.6</priority></url><url><loc>https://refactron.dev/changelog</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://refactron.dev/security</loc><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>https://refactron.dev/privacy-policy</loc><changefreq>yearly</changefreq><priority>0.3</priority></url><url><loc>https://refactron.dev/terms-of-service</loc><changefreq>yearly</changefreq><priority>0.3</priority></url><url><loc>https://refactron.dev/blog/i-ran-refactron-on-djangos-codebase</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-vs-cursor-vs-codeant</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/why-we-built-verification-engine-first</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/legacy-code-ai-refactoring</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-on-requests-library</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/real-cost-of-not-refactoring</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-on-fastapi</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/how-to-safely-refactor-python-code-you-didnt-write</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/why-refactron-runs-locally</loc><changefreq>monthly</changefreq><priority>0.8</priority></url></urlset> No newline at end of file | |||
| <?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://refactron.dev/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url><url><loc>https://refactron.dev/blog</loc><changefreq>weekly</changefreq><priority>0.9</priority></url><url><loc>https://refactron.dev/about</loc><changefreq>monthly</changefreq><priority>0.6</priority></url><url><loc>https://refactron.dev/changelog</loc><changefreq>weekly</changefreq><priority>0.7</priority></url><url><loc>https://refactron.dev/security</loc><changefreq>monthly</changefreq><priority>0.5</priority></url><url><loc>https://refactron.dev/privacy-policy</loc><changefreq>yearly</changefreq><priority>0.3</priority></url><url><loc>https://refactron.dev/terms-of-service</loc><changefreq>yearly</changefreq><priority>0.3</priority></url><url><loc>https://refactron.dev/blog/i-ran-refactron-on-djangos-codebase</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-vs-cursor-vs-codeant</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/why-we-built-verification-engine-first</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/legacy-code-ai-refactoring</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-on-requests-library</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/real-cost-of-not-refactoring</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-on-fastapi</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/how-to-safely-refactor-python-code-you-didnt-write</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/why-refactron-runs-locally</loc><changefreq>monthly</changefreq><priority>0.8</priority></url><url><loc>https://refactron.dev/blog/refactron-is-now-a-nodejs-package</loc><changefreq>monthly</changefreq><priority>0.8</priority></url></urlset> No newline at end of file | |||
There was a problem hiding this comment.
Avoid manual edits to auto-generated sitemap.xml.
This sitemap file is automatically generated by scripts/generate-sitemap.js during the build process (see package.json line 48: "prebuild": "node scripts/generate-sitemap.js"). The script extracts all blog post slugs from src/data/posts.ts and regenerates the entire sitemap file from scratch, which will overwrite any manual changes.
Since you've already added the blog post to src/data/posts.ts, the sitemap entry will be automatically generated on the next build. This manual edit is unnecessary and will be lost.
🔄 Recommended workflow
Instead of manually editing public/sitemap.xml, regenerate it using the automated script:
# Remove the manual edit to sitemap.xml and regenerate it
node scripts/generate-sitemap.jsThis ensures consistency between src/data/posts.ts and the sitemap, and avoids the confusion of manual edits being overwritten during builds.
Run the following script to verify that the sitemap generation script will include the new blog post:
#!/bin/bash
# Description: Verify that the sitemap generation script correctly includes the new blog post slug
# Check if the slug exists in posts.ts
echo "=== Checking for new blog post slug in posts.ts ==="
rg -n "slug:\s*['\"]refactron-is-now-a-nodejs-package['\"]" src/data/posts.ts
# Run the sitemap generation script
echo -e "\n=== Running sitemap generation script ==="
node scripts/generate-sitemap.js
# Verify the new entry is in the generated sitemap
echo -e "\n=== Verifying new entry in generated sitemap ==="
cat public/sitemap.xml | grep -o '<loc>https://refactron.dev/blog/refactron-is-now-a-nodejs-package</loc>'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@public/sitemap.xml` at line 1, The sitemap was manually edited but is
auto-generated by scripts/generate-sitemap.js (invoked via package.json
prebuild), so revert changes in public/sitemap.xml and let the generator
recreate it; ensure the new blog post exists in src/data/posts.ts with the
correct slug (e.g., "refactron-is-now-a-nodejs-package"), then run node
scripts/generate-sitemap.js and commit the regenerated public/sitemap.xml
instead of manual edits.
- Fixed pink announcement banner above navbar, auto-dismisses on click - Easy config block for toggling/updating announcements - Hero install command cycles between pip and npm with fixed width - Added Release industry with package SVG icon for npm post
Summary by CodeRabbit
New Features
Documentation