-
-
Notifications
You must be signed in to change notification settings - Fork 638
Improve server bundle path configuration: Remove TODO, add documentation & validation #1962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The TODO referenced automatic detection of server_bundle_output_path from shakapacker.yml, but this feature was never implemented and may not be feasible as originally conceived. Why this TODO is being removed: 1. The referenced feature/shakapacker-yml-integration branch did not contain the implementation - it only had the foundational work which was already merged via PRs #1798 and #1815 2. Shakapacker.yml's public_output_path serves a different purpose than React on Rails' server_bundle_output_path (public webpack output vs private server bundle security) 3. The current configuration approach is working well The server bundle security features (server_bundle_output_path and enforce_private_server_bundles) are fully implemented and tested on master. Closes #1808 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 45 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
✨ 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 |
Code ReviewSummaryThis PR removes a misleading TODO comment about automatic detection of ✅ Code Quality & Best PracticesExcellent justification: The PR description provides clear context about why this TODO was misleading:
Clean removal: Only removing dead code (3 lines of comments) with zero functional changes. ✅ Potential Bugs or IssuesNone identified. This is a documentation-only change with:
✅ Performance ConsiderationsNo performance impact - comment-only change. ✅ Security ConcernsNo security impact. The actual security features this TODO referenced are already implemented:
✅ Test CoverageExcellent test coverage already exists:
Verified: No test code references the removed TODO comment (confirmed via grep). ✅ Adherence to Repository GuidelinesPer CLAUDE.md requirements:
📝 Minor SuggestionsNone. This is a straightforward cleanup that improves code clarity. ✅ RecommendationAPPROVE - Safe to merge immediately. This removes technical debt by eliminating misleading documentation that could confuse future developers. 🤖 Generated with Claude Code |
Code ReviewSummaryThis PR removes a misleading TODO comment about automatic detection of ✅ Strengths
📋 Review FindingsCode Quality ✅
Best Practices ✅
Potential Issues
|
Summary
This PR addresses configuration management between webpack and React on Rails by:
Background
PR #1808 was titled "Auto-detect server bundle path from shakapacker.yml" and contained a TODO comment referencing this feature. However:
public_output_pathserves a different purpose than React on Rails'server_bundle_output_path:public_output_path: Where webpack outputs ALL bundles (public directory)server_bundle_output_path: Private server bundles OUTSIDE public directory for securityWhat's Already on Master
The server bundle security features are fully implemented and working:
server_bundle_output_pathconfiguration optionenforce_private_server_bundlessecurity enforcementChanges in This PR
1. Remove Misleading TODO Comment
lib/react_on_rails/configuration.rb2. Improve Generator Documentation
3. Add Doctor Validation
rails react_on_rails:doctorserverWebpackConfig.js output.pathwithserver_bundle_output_pathWhy This Matters
The Problem: Webpack (build-time) and React on Rails (runtime) configurations can get out of sync, causing hard-to-debug SSR failures.
The Solution:
Example Doctor Output
When configs are in sync:
When mismatched:
Testing
Related Issues
🤖 Generated with Claude Code
This change is