Skip to content

Commit 42ca9c5

Browse files
justin808claude
andcommitted
Revert Prettier whitespace changes from markdown files
Remove unnecessary whitespace-only changes from markdown files that were auto-formatted by Prettier during pre-commit hooks. These changes added noise to the PR without providing value. Only keeping the actual code fixes: - spec/react_on_rails/configuration_spec.rb - eslint.config.ts - bin/ci-switch-config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 1a4f141 commit 42ca9c5

18 files changed

+115
-0
lines changed

.claude/commands/update-changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ You are helping to add an entry to the CHANGELOG.md file for the React on Rails
55
## Critical Requirements
66

77
1. **User-visible changes only**: Only add changelog entries for user-visible changes:
8+
89
- New features
910
- Bug fixes
1011
- Breaking changes
@@ -117,18 +118,21 @@ When a new version is released:
117118
### For Regular Changelog Updates
118119

119120
1. **ALWAYS fetch latest changes first**:
121+
120122
- **CRITICAL**: Run `git fetch origin master` to ensure you have the latest commits
121123
- The workspace may be behind origin/master, causing you to miss recently merged PRs
122124
- After fetching, use `origin/master` for all comparisons, NOT local `master` branch
123125

124126
2. **Determine the correct version tag to compare against**:
127+
125128
- First, check the tag dates: `git log --tags --simplify-by-decoration --pretty="format:%ai %d" | head -10`
126129
- Find the latest version tag and its date
127130
- Compare origin/master branch date to the tag date
128131
- If the tag is NEWER than origin/master, it means the branch needs to be updated to include the tag's commits
129132
- **CRITICAL**: Always use `git log TAG..BRANCH` to find commits that are in the tag but not in the branch, as the tag may be ahead
130133

131134
3. **Check commits and version boundaries**:
135+
132136
- **IMPORTANT**: Use `origin/master` in all commands below, not local `master`
133137
- Run `git log --oneline LAST_TAG..origin/master` to see commits since the last release
134138
- Also check `git log --oneline origin/master..LAST_TAG` to see if the tag is ahead of origin/master
@@ -144,17 +148,20 @@ When a new version is released:
144148
5. **Read the current CHANGELOG.md** to understand the existing structure and formatting.
145149

146150
6. **Determine where entries should go**:
151+
147152
- If the latest version tag is NEWER than origin/master branch, move entries from "Unreleased" to that version section
148153
- If origin/master is ahead of the latest tag, add new entries to "Unreleased"
149154
- Always verify the version date in CHANGELOG.md matches the actual tag date
150155

151156
7. **Add or move entries** to the appropriate section under appropriate category headings.
157+
152158
- **CRITICAL**: When moving entries from "Unreleased" to a version section, merge them with existing entries under the same category heading
153159
- **NEVER create duplicate section headings** (e.g., don't create two "### Fixed" sections)
154160
- If the version section already has a category heading (e.g., "### Fixed"), add the moved entries to that existing section
155161
- Maintain the category order as defined above
156162

157163
8. **Verify formatting**:
164+
158165
- Bold description with period
159166
- Proper PR link (NO hash symbol)
160167
- Proper author link
@@ -174,10 +181,12 @@ When a new version is released:
174181
When releasing from beta to a stable version (e.g., v16.1.0-beta.3 → v16.1.0):
175182

176183
1. **Remove all beta version labels** from the changelog:
184+
177185
- Change `### [v16.1.0-beta.1]`, `### [v16.1.0-beta.2]`, etc. to a single `### [v16.1.0]` section
178186
- Combine all beta entries into the stable release section
179187

180188
2. **Consolidate duplicate entries**:
189+
181190
- If bug fixes or changes were made to features introduced in earlier betas, keep only the final state
182191
- Remove redundant changelog entries for fixes to beta features
183192
- Keep the most recent/accurate description of each change

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Changes since the last non-beta release.
3838
#### Changed
3939

4040
- **Shakapacker 9.0.0 Upgrade**: Upgraded Shakapacker from 8.2.0 to 9.0.0 with Babel transpiler configuration for compatibility. Key changes include:
41+
4142
- Configured `javascript_transpiler: babel` in shakapacker.yml (Shakapacker 9.0 defaults to SWC which has PropTypes handling issues)
4243
- Added precompile hook support via `bin/shakapacker-precompile-hook` for ReScript builds and pack generation
4344
- Configured CSS Modules to use default exports (`namedExport: false`) for backward compatibility with existing `import styles from` syntax
@@ -99,6 +100,7 @@ To migrate to React on Rails Pro:
99100
**Note:** If you're not using any of the Pro-only methods listed above, no changes are required.
100101

101102
- **Pro-Specific Configurations Moved to Pro Gem**: The following React Server Components (RSC) configurations have been moved from `ReactOnRails.configure` to `ReactOnRailsPro.configure`:
103+
102104
- `rsc_bundle_js_file` - Path to the RSC bundle file
103105
- `react_server_client_manifest_file` - Path to the React server client manifest
104106
- `react_client_manifest_file` - Path to the React client manifest
@@ -124,6 +126,7 @@ To migrate to React on Rails Pro:
124126
See the [React on Rails Pro Configuration docs](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/docs/configuration.md) for more details.
125127

126128
- **Streaming View Helpers Moved to Pro Gem**: The following view helpers have been removed from the open-source gem and are now only available in React on Rails Pro:
129+
127130
- `stream_react_component` - Progressive SSR using React 18+ streaming
128131
- `rsc_payload_react_component` - RSC payload rendering
129132

@@ -148,10 +151,12 @@ To migrate to React on Rails Pro:
148151
#### New Features
149152

150153
- **Server Bundle Security**: Added new configuration options for enhanced server bundle security and organization:
154+
151155
- `server_bundle_output_path`: Configurable directory (relative to the Rails root) for server bundle output (default: "ssr-generated"). If set to `nil`, the server bundle will be loaded from the same public directory as client bundles. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
152156
- `enforce_private_server_bundles`: When enabled, ensures server bundles are only loaded from private directories outside the public folder (default: false for backward compatibility) [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
153157

154158
- **Improved Bundle Path Resolution**: Bundle path resolution for server bundles now works as follows:
159+
155160
- If `server_bundle_output_path` is set, the server bundle is loaded from that directory.
156161
- If `server_bundle_output_path` is not set, the server bundle falls back to the client bundle directory (typically the public output path).
157162
- If `enforce_private_server_bundles` is enabled:
@@ -263,6 +268,7 @@ See [Release Notes](docs/release-notes/16.0.0.md) for complete migration guide.
263268

264269
- **`defer_generated_component_packs` deprecated** → use `generated_component_packs_loading_strategy`
265270
- Migration:
271+
266272
- `defer_generated_component_packs: true``generated_component_packs_loading_strategy: :defer`
267273
- `defer_generated_component_packs: false``generated_component_packs_loading_strategy: :sync`
268274
- Recommended: `generated_component_packs_loading_strategy: :async` for best performance
@@ -671,6 +677,7 @@ for details.
671677
- Removal of config.symlink_non_digested_assets_regex as it's no longer needed with rails/webpacker.
672678
If any business needs this, we can move the code to a separate gem.
673679
- Added configuration option `same_bundle_for_client_and_server` with default `false` because
680+
674681
1. Production applications would typically have a server bundle that differs from the client bundle
675682
2. This change only affects trying to use HMR with react_on_rails with rails/webpacker.
676683

@@ -1388,11 +1395,13 @@ No changes.
13881395
- Added automatic compilation of assets at precompile is now done by ReactOnRails. Thus, you don't need to provide your own `assets.rake` file that does the precompilation.
13891396
[#398](https://github.com/shakacode/react_on_rails/pull/398) by [robwise](https://github.com/robwise), [jbhatab](https://github.com/jbhatab), and [justin808](https://github.com/justin808).
13901397
- **Migration to v6**
1398+
13911399
- Do not run the generator again if you've already run it.
13921400

13931401
- See [shakacode/react-webpack-rails-tutorial/pull/287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287) for an example of upgrading from v5.
13941402

13951403
- To configure the asset compilation you can either
1404+
13961405
1. Specify a `config/react_on_rails` setting for `build_production_command` to be nil to turn this feature off.
13971406
2. Specify the script command you want to run to build your production assets, and remove your `assets.rake` file.
13981407

CODING_AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,18 @@ Use `gh pr create` with:
260260
## Debugging Workflow
261261

262262
1. **Understand the Problem**
263+
263264
- Read the issue carefully
264265
- Reproduce the bug if possible
265266
- Identify root cause
266267

267268
2. **Create Minimal Test Case**
269+
268270
- Write failing test that demonstrates issue
269271
- Keep it focused and minimal
270272

271273
3. **Implement Fix**
274+
272275
- Make smallest change possible
273276
- Ensure fix doesn't break existing functionality
274277
- Follow existing code patterns

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,18 +607,22 @@ This approach:
607607
**Common Issues and Solutions:**
608608

609609
1. **React components not rendering (empty divs)**
610+
610611
- **Cause**: Missing yalc setup for JavaScript package
611612
- **Solution**: Follow yalc setup steps above after running generator
612613

613614
2. **Generator fails with Shakapacker errors**
615+
614616
- **Cause**: Conflicting Shakapacker versions or incomplete installation
615617
- **Solution**: Clean reset and ensure consistent Shakapacker version across tests
616618

617619
3. **Babel configuration conflicts during yalc development**
620+
618621
- **Cause**: Both `babel.config.js` and `package.json` "babel" section defining presets
619622
- **Solution**: Remove "babel" section from `package.json`, keep only `babel.config.js`
620623

621624
4. **"Package.json not found" errors**
625+
622626
- **Cause**: Generator trying to access non-existent package.json files
623627
- **Solution**: Test with commits that fix this specific issue (e.g., bc69dcd0)
624628

TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@
5959
## Developer Experience
6060
6161
- [ ] **bin/dev help command enhancements**
62+
6263
- [x] Add emojis and colors for better readability
6364
- [ ] Add section about component development patterns
6465
- [ ] Include troubleshooting for client/server split issues
6566
6667
- [ ] **Babel Configuration Conflict Detection**
68+
6769
- [ ] Add validation in generator/initializer to detect conflicting Babel configs
6870
- [ ] Improve error messaging for duplicate preset issues
6971
- [ ] Common conflict: babel.config.js + package.json "babel" section

docs/CI_OPTIMIZATION.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ Claude will:
197197
```
198198

199199
3. **Separate doc changes from code changes:**
200+
200201
- Docs-only PRs skip CI entirely
201202
- Mixed PRs run full CI
202203

@@ -207,11 +208,13 @@ Claude will:
207208
### For Maintainers
208209

209210
1. **Monitor CI performance:**
211+
210212
- Check GitHub Actions usage
211213
- Identify slow tests
212214
- Adjust matrix as needed
213215

214216
2. **Update path filters:**
217+
215218
- Add new file patterns as project evolves
216219
- Keep filters accurate
217220

docs/DIRECTORY_LICENSING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ react_on_rails/ (monorepo root)
7878
### Package-Level Compliance
7979

8080
1. **Gemspec Files**:
81+
8182
- `react_on_rails.gemspec`: `s.license = "MIT"`
8283
- `react_on_rails_pro.gemspec`: `s.license = "UNLICENSED"`
8384

docs/LICENSING_FAQ.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
**A:** Nothing changes for end users! We'll maintain the same dual licensing structure:
88

99
- **MIT Licensed (Free & Open Source):**
10+
1011
- `react_on_rails` Ruby gem
1112
- `react-on-rails` NPM package
1213
- Core functionality remains completely free

docs/MONOREPO_MERGER_PLAN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,12 @@ After the initial merge, the following CI adjustments may be needed:
660660
### Critical License Rules
661661

662662
1. **Directory Classification:**
663+
663664
- **MIT Licensed:** `lib/react_on_rails/` (including specs), `packages/react-on-rails/` (including tests)
664665
- **Pro Licensed:** All directories explicitly listed in LICENSE.md under "React on Rails Pro License"
665666

666667
2. **LICENSE.md Updates:**
668+
667669
- Must be updated whenever pro directories are moved or renamed
668670
- Must accurately reflect current directory structure
669671
- Pro directories must be explicitly listed

docs/building-features/streaming-server-rendering.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ You can test your application by running `rails server` and navigating to the ap
119119
When a user visits the page, they'll experience the following sequence:
120120

121121
1. The initial HTML shell is sent immediately, including:
122+
122123
- The page layout
123124
- Any static content (like the `<h1>` and footer)
124125
- Placeholder content for the React component (typically a loading state)
@@ -164,11 +165,13 @@ Streaming SSR is particularly valuable in specific scenarios. Here's when to con
164165
### Ideal Use Cases
165166

166167
1. **Data-Heavy Pages**
168+
167169
- Pages that fetch data from multiple sources
168170
- Dashboard-style layouts where different sections can load independently
169171
- Content that requires heavy processing or computation
170172

171173
2. **Progressive Enhancement**
174+
172175
- When you want users to see and interact with parts of the page while others load
173176
- For improving perceived performance on slower connections
174177
- When different parts of your page have different priority levels

0 commit comments

Comments
 (0)