Skip to content

Highlight Pro friendly license model#103

Merged
justin808 merged 3 commits into
mainfrom
jg-conductor/pro-links-visibility
May 21, 2026
Merged

Highlight Pro friendly license model#103
justin808 merged 3 commits into
mainfrom
jg-conductor/pro-links-visibility

Conversation

@justin808

@justin808 justin808 commented May 12, 2026

Copy link
Copy Markdown
Member

Summary:

  • Highlights the Friendly License Model on the Pro page, homepage Pro flow, and examples upgrade path.
  • Preserves Pro pricing links during docs prep, updates generated docs-home license copy, and stops audit from flagging the pricing domain.
  • Adds prep regression tests and escapes the upstream node-renderer <50ms table value so Docusaurus can build.

Validation:

  • node --test scripts/*.test.mjs
  • npm run audit:docs -- --fail-on error
  • npm 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.com is 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 for pro/node-renderer.md (<50ms -> &lt;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

    • Added Pro Pricing & Sign Up links throughout documentation
    • Introduced "Friendly license model" section with updated licensing guidance
  • Documentation

    • Updated messaging regarding evaluating React on Rails Pro without requiring a token
    • Refined upgrade path descriptions with clearer step-by-step guidance
  • Style

    • Updated upgrade grid layout from 2-column to 3-column design
    • Added new license strip and highlight styling components
  • Tests

    • Added comprehensive test suite for documentation processing workflows
  • Chores

    • Updated documentation validation and processing scripts

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 522da96c-f9cd-430d-9dc5-0f96ac621b87

📥 Commits

Reviewing files that changed from the base of the PR and between 91f9e2a and 92f06c6.

📒 Files selected for processing (9)
  • prototypes/docusaurus/docusaurus.config.ts
  • prototypes/docusaurus/src/pages/examples.tsx
  • prototypes/docusaurus/src/pages/index.module.css
  • prototypes/docusaurus/src/pages/index.tsx
  • prototypes/docusaurus/src/pages/pro.module.css
  • prototypes/docusaurus/src/pages/pro.tsx
  • scripts/audit-docs.mjs
  • scripts/prepare-docs.mjs
  • scripts/prepare-docs.test.mjs

Walkthrough

This 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.

Changes

Pro Licensing Marketing Content

Layer / File(s) Summary
Footer link and examples page updates
prototypes/docusaurus/docusaurus.config.ts, prototypes/docusaurus/src/pages/examples.tsx
Added Pro Pricing & Sign Up link to footer navigation and updated examples page to describe token-free Pro evaluation before production licensing.
Index page licensing messaging and layout
prototypes/docusaurus/src/pages/index.module.css, prototypes/docusaurus/src/pages/index.tsx
Updated personas and upgrade flow descriptions to emphasize token-free Pro evaluation; added new license strip UI component with pricing link and expanded upgrade steps; updated grid layout to 3 columns and added .licenseStrip styling.
Pro page content and license highlighting
prototypes/docusaurus/src/pages/pro.module.css, prototypes/docusaurus/src/pages/pro.tsx
Updated hero section, primary actions, and friendly license model card to clarify token-free development/testing evaluation, unlicensed-mode logging behavior, and production license requirements with fallback option; added .licenseHighlight CSS styling.

Documentation Processing Scripts & Testing

Layer / File(s) Summary
Docs preparation script refactoring and exports
scripts/prepare-docs.mjs
Added fixProNodeRendererMdx helper for HTML escaping in table cells; exported utility functions for testability; updated link-rewriting logic and switched friendly license injection terminology from "evaluation policy" to "license model"; added module import guard to prevent auto-execution.
Suspicious link detection update
scripts/audit-docs.mjs
Updated validation to flag legacy Pro docs URLs under www.shakacode.com/react-on-rails-pro/docs/ instead of the dead pro.reactonrails.com subdomain.
Test suite for documentation processing
scripts/prepare-docs.test.mjs
Added comprehensive Node test suite covering link rewriting, license model injection, homepage generation, and HTML escaping with temporary directory fixture management.

🎯 2 (Simple) | ⏱️ ~12 minutes

🐰 The Pro licensing model hops into view,
Token-free in dev, but production's true—
With clarity sewn through each friendly stripe,
The marketing copy takes shape and type.
From footer to page, the message rings clear,
Hop along to pricing, evaluation's here!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-conductor/pro-links-visibility

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Cloudflare preview deployed.

…s-visibility

* origin/main:
  Clarify LocalHub example copy (#105)
  [codex] Surface public RSC performance demo (#104)

# Conflicts:
#	prototypes/docusaurus/src/pages/examples.tsx
#	prototypes/docusaurus/src/pages/pro.tsx
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>
@justin808 justin808 marked this pull request as ready for review May 21, 2026 02:59
@justin808 justin808 merged commit edf827e into main May 21, 2026
4 of 5 checks passed
@justin808 justin808 deleted the jg-conductor/pro-links-visibility branch May 21, 2026 03:00
@greptile-apps

greptile-apps Bot commented May 21, 2026

Copy link
Copy Markdown

Greptile Summary

This 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 https://pro.reactonrails.com/. It also updates the docs-prep pipeline to stop rewriting that domain to /docs/pro/, removes the audit rule that flagged it as dead, fixes the <50ms MDX escaping issue in pro/node-renderer.md, and exports four prepare-docs.mjs functions so the new regression test suite can cover them.

  • UI/copy changes: pro.tsx, index.tsx, examples.tsx, and both CSS modules gain the friendly-license-model callout pattern; docusaurus.config.ts adds a navbar "Pro Pricing & Sign Up" link pointing to the external domain.
  • Tooling changes: prepare-docs.mjs stops rewriting pro.reactonrails.com links, upgrades the docs-home section-replacement regex, and guards main() behind an import.meta.url equality check so the module is safely importable by tests.
  • Tests: prepare-docs.test.mjs adds four focused regression tests that run with node --test.

Confidence Score: 4/5

Safe 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

Filename Overview
scripts/prepare-docs.mjs Removes pro.reactonrails.com rewrites, exports functions for testability, adds fixProNodeRendererMdx and updated docsHomeMarkdown; minor: replace() vs replaceAll() and fragile section-last lookahead in docsHomeMarkdown
scripts/prepare-docs.test.mjs New regression test file covering external Pro pricing link preservation, friendly-license-model notice injection, docs-home copy replacement, and MDX escaping
scripts/audit-docs.mjs Removes the audit rule that flagged pro.reactonrails.com as a dead subdomain, aligning the auditor with the now-intentional use of that domain
prototypes/docusaurus/src/pages/index.tsx Adds licenseStrip banner and a third migration card to the UpgradeSection; grid updated to 3 columns; copy updated throughout to mention token-free non-production evaluation
prototypes/docusaurus/src/pages/pro.tsx Adds licenseHighlight callout block in the hero, renames Friendly evaluation policy card to Friendly license model, updates secondary CTA to pro.reactonrails.com
prototypes/docusaurus/docusaurus.config.ts Adds Pro Pricing & Sign Up navbar link pointing to https://pro.reactonrails.com/
prototypes/docusaurus/src/pages/index.module.css Extends upgradeGrid to 3 columns and adds .licenseStrip styles (flex callout with left-border accent)
prototypes/docusaurus/src/pages/pro.module.css Adds .licenseHighlight callout styles matching the left-border accent pattern from index.module.css
prototypes/docusaurus/src/pages/examples.tsx Updates the Move from OSS to Pro evaluation path description to mention token-free non-production evaluation

Reviews (1): Last reviewed commit: "Add Pro pricing link to footer" | Re-trigger Greptile

Comment thread scripts/prepare-docs.mjs
Comment on lines +272 to +274
export function fixProNodeRendererMdx(content) {
return content.replace("Direct render: <50ms", "Direct render: &lt;50ms");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
export function fixProNodeRendererMdx(content) {
return content.replace("Direct render: <50ms", "Direct render: &lt;50ms");
}
export function fixProNodeRendererMdx(content) {
return content.replaceAll("Direct render: <50ms", "Direct render: &lt;50ms");
}

Comment thread scripts/prepare-docs.mjs
.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`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/prepare-docs.mjs
Comment on lines +467 to 469
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}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant