Highlight Pro friendly license model#103
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
WalkthroughThis PR updates React on Rails' website content and documentation tooling to reflect a new friendly Pro licensing model. Changes include marketing text emphasizing token-free development evaluation, new UI components for license messaging, CSS styling updates, and improved documentation processing scripts with full test coverage. ChangesPro Licensing Marketing Content
Documentation Processing Scripts & Testing
🎯 2 (Simple) | ⏱️ ~12 minutes
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
|
Cloudflare preview deployed.
|
Surfaces pricing/sign-up alongside the existing Pro footer entry so visitors can reach the purchase flow from any page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR rebrands "Friendly evaluation policy" to "Friendly license model" across the Pro page, homepage upgrade flow, and examples page, adding a callout block and a third migration card that links to
Confidence Score: 4/5Safe to merge; changes are scoped to marketing copy, CSS, and docs-prep scripting with no effect on application runtime behaviour. The UI and config changes are purely additive copy/style work. Two small fragilities exist in prepare-docs.mjs: fixProNodeRendererMdx uses replace() instead of replaceAll(), so a second occurrence of the same table cell would survive unescaped; and the docsHomeMarkdown section-replacement regex silently no-ops if the upstream file ever drops the heading that follows the target section. Neither is a build-breaker today, but both could cause hard-to-spot regressions on future upstream doc updates. scripts/prepare-docs.mjs — the fixProNodeRendererMdx helper and the docsHomeMarkdown section-replacement regex are worth a quick look before merging. Important Files Changed
Reviews (1): Last reviewed commit: "Add Pro pricing link to footer" | Re-trigger Greptile |
| export function fixProNodeRendererMdx(content) { | ||
| return content.replace("Direct render: <50ms", "Direct render: <50ms"); | ||
| } |
There was a problem hiding this comment.
String.prototype.replace() with a string pattern only replaces the first occurrence. If "Direct render: <50ms" appears more than once in the node-renderer file (e.g. duplicated table rows), subsequent occurrences would remain unescaped and still break the MDX build. Every other literal-string fix in this file that targets repeated content uses replaceAll; this one should too.
| export function fixProNodeRendererMdx(content) { | |
| return content.replace("Direct render: <50ms", "Direct render: <50ms"); | |
| } | |
| export function fixProNodeRendererMdx(content) { | |
| return content.replaceAll("Direct render: <50ms", "Direct render: <50ms"); | |
| } |
| .replaceAll("(./oss/", "(./") | ||
| .replace("](https://reactonrails.com/examples)", "](/examples)") | ||
| .replace(/\n- \[Documentation website\]\(https:\/\/reactonrails\.com\/docs\/\)\s*/g, "\n") | ||
| .replace(/## Friendly evaluation policy\n\n[\s\S]*?(?=\n## )/, `${friendlyLicenseSection}\n`) |
There was a problem hiding this comment.
Regex silently no-ops when section is last — the `(?=
)positive lookahead requires a subsequent##heading to exist. If the upstream docs-home file ever drops## Need more help?or reorders sections so## Friendly evaluation policybecomes the final section, the.replace(...)call matches nothing and the old copy is left verbatim. Adding a
*$alternative in the lookahead (or using aString.prototype.includesguard likeinjectProFriendlyNotice` does) would make the replacement robust to that structural drift.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92f06c6cd4
ℹ️ 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".
| if (!/Friendly license model/i.test(updated)) { | ||
| const notice = `> **Friendly license model**\n> Try React on Rails Pro freely in development, test, CI/CD, and staging. No token is required to evaluate. If no license is configured, Pro keeps running in unlicensed mode and logs license status instead of blocking your app. Production deployments require a paid license; see [Pro pricing and sign up](https://pro.reactonrails.com/).\n\n`; | ||
| updated = updated.replace(/^# React on Rails Pro\s*\n+/m, `# React on Rails Pro\n\n${notice}`); |
There was a problem hiding this comment.
Replace legacy notice instead of duplicating it
injectProFriendlyNotice now only checks for Friendly license model, so when upstream pro/react-on-rails-pro.md still contains the legacy Friendly evaluation policy block, this condition is true and a second policy notice is injected at the top rather than updating the existing one. That yields conflicting/duplicated licensing guidance in generated docs; the migration should match and replace the legacy section (or remove it) instead of only checking for the new phrase.
Useful? React with 👍 / 👎.
Summary:
<50mstable value so Docusaurus can build.Validation:
node --test scripts/*.test.mjsnpm run audit:docs -- --fail-on errornpm run build(exits 0 with existing broken link/anchor warnings)Note
Low Risk
Low risk: changes are limited to Docusaurus page copy/layout plus docs-prep/audit scripts; main risk is broken link rewriting or MDX escaping affecting builds.
Overview
Updates the marketing/docs UI to emphasize the Pro friendly license model (token-free non-production evaluation) across the homepage upgrade flow, examples page, and Pro landing page, and adds prominent links to
https://pro.reactonrails.com/(including a new footer link and updated Pro CTA).Adjusts docs tooling so
pro.reactonrails.comis treated as a valid external pricing domain (no longer rewritten/flagged), updates generated docs-home copy from friendly evaluation policy to friendly license model, and adds targeted docs-prep regression tests plus an MDX escape fix forpro/node-renderer.md(<50ms-><50ms).Reviewed by Cursor Bugbot for commit 92f06c6. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Documentation
Style
Tests
Chores