-
-
Notifications
You must be signed in to change notification settings - Fork 637
add MIT SPDX headers to Core (Ruby and JS/TS) #1776
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
base: master
Are you sure you want to change the base?
Conversation
WalkthroughAdds copyright and MIT SPDX license headers to many Ruby and TypeScript/TSX source and template files, plus linting config to enforce headers and a devDependency for ESLint license-header. No functional, control-flow, or public API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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 Review: Add MIT SPDX Headers to Core (Ruby and JS/TS)Thank you for adding proper SPDX license headers to the codebase! This is an important improvement for license compliance and clarity. Here's my review: ✅ Strengths
|
Code Review: Add MIT SPDX Headers to Core Files✅ Strengths
🔍 Observations & Suggestions
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (19)
lib/react_on_rails/prerender_error.rb (1)
3-5
: Optional: add CI enforcement for headers.
Consider a lightweight check (e.g., ripgrep or a RuboCop/ESLint rule) to ensure SPDX headers remain present across files.node_package/src/ComponentRegistry.ts (1)
1-2
: Nit: consider ASCII hyphen in years.
Replace “2015–2025” (en dash) with “2015-2025” to simplify grep-based compliance checks.-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */lib/react_on_rails/react_component/render_options.rb (1)
3-5
: Consider ASCII hyphen for year range.Some license scanners prefer "-" over "–" in "2015–2025". Low risk, but improves tooling compatibility.
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLCnode_package/src/clientStartup.ts (1)
1-2
: Optional: replace en dash with hyphen.For broader license tooling compatibility.
-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */lib/generators/react_on_rails/base_generator.rb (1)
3-5
: Nit: ASCII hyphen in year range.-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLCnode_package/src/RSCRoute.tsx (1)
1-2
: Nit: use "-" instead of "–" in years.-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */node_package/src/isServerRenderResult.ts (1)
1-2
: Nit: ASCII hyphen for parsers that are strict about ASCII.-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */lib/react_on_rails/test_helper/webpack_assets_status_checker.rb (1)
3-5
: Nit: switch en dash to hyphen.-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLCnode_package/src/injectRSCPayload.ts (1)
1-2
: Nit: prefer "-" over "–" in the copyright line.-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */node_package/src/wrapServerComponentRenderer/client.tsx (1)
1-2
: Nit: ASCII hyphen for tooling compatibility.-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */lib/react_on_rails/server_rendering_js_code.rb (1)
3-4
: Use ASCII hyphen in copyright year range.Replace the en dash (–) with a standard hyphen (-) to avoid tooling/grepping issues.
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLCnode_package/src/getReactServerComponent.server.ts (1)
1-2
: Normalize dash in header.Swap the en dash for a hyphen to maximize compatibility with header/license checkers.
-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */node_package/src/ReactOnRailsRSC.ts (1)
1-2
: Normalize dash in header.Use ASCII hyphen instead of en dash in the year range.
-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */node_package/src/Authenticity.ts (1)
1-2
: Normalize dash in header.Replace en dash with hyphen.
-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */node_package/src/ServerComponentFetchError.ts (1)
1-2
: Normalize dash in header.Prefer
-
over–
for consistency with common license scanners.-/* Copyright (c) 2015–2025 ShakaCode, LLC +/* Copyright (c) 2015-2025 ShakaCode, LLC SPDX-License-Identifier: MIT */lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb (1)
3-4
: Normalize dash in header.Use ASCII hyphen in the year range.
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLClib/react_on_rails/test_helper/webpack_assets_compiler.rb (1)
3-4
: Normalize dash in header.Replace en dash with hyphen.
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLClib/react_on_rails/locales/to_json.rb (1)
3-4
: Normalize dash in header.Switch
–
to-
for better tooling compatibility.-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLClib/react_on_rails/configuration.rb (1)
3-5
: Header placement looks correct; consider ASCII dash to avoid RuboCop Style/AsciiComments.Frozen-string magic comment is preserved with a blank line; SPDX is present. If Style/AsciiComments is enabled, the en dash in "2015–2025" may fail linting.
Apply if needed:
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLC
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (84)
app/helpers/react_on_rails_helper.rb
(1 hunks)lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb
(1 hunks)lib/generators/react_on_rails/base_generator.rb
(1 hunks)lib/generators/react_on_rails/dev_tests_generator.rb
(1 hunks)lib/generators/react_on_rails/generator_helper.rb
(1 hunks)lib/generators/react_on_rails/generator_messages.rb
(1 hunks)lib/generators/react_on_rails/install_generator.rb
(1 hunks)lib/generators/react_on_rails/react_no_redux_generator.rb
(1 hunks)lib/generators/react_on_rails/react_with_redux_generator.rb
(1 hunks)lib/generators/react_on_rails/templates/base/base/app/controllers/hello_world_controller.rb
(1 hunks)lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
(1 hunks)lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb
(1 hunks)lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb
(1 hunks)lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
(1 hunks)lib/react_on_rails.rb
(1 hunks)lib/react_on_rails/configuration.rb
(1 hunks)lib/react_on_rails/controller.rb
(1 hunks)lib/react_on_rails/engine.rb
(1 hunks)lib/react_on_rails/error.rb
(1 hunks)lib/react_on_rails/git_utils.rb
(1 hunks)lib/react_on_rails/helper.rb
(1 hunks)lib/react_on_rails/json_output.rb
(1 hunks)lib/react_on_rails/json_parse_error.rb
(1 hunks)lib/react_on_rails/locales/base.rb
(1 hunks)lib/react_on_rails/locales/to_js.rb
(1 hunks)lib/react_on_rails/locales/to_json.rb
(1 hunks)lib/react_on_rails/packer_utils.rb
(1 hunks)lib/react_on_rails/packs_generator.rb
(1 hunks)lib/react_on_rails/prerender_error.rb
(1 hunks)lib/react_on_rails/react_component/render_options.rb
(1 hunks)lib/react_on_rails/server_rendering_js_code.rb
(1 hunks)lib/react_on_rails/server_rendering_pool.rb
(1 hunks)lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb
(1 hunks)lib/react_on_rails/test_helper.rb
(1 hunks)lib/react_on_rails/test_helper/ensure_assets_compiled.rb
(1 hunks)lib/react_on_rails/test_helper/webpack_assets_compiler.rb
(1 hunks)lib/react_on_rails/test_helper/webpack_assets_status_checker.rb
(1 hunks)lib/react_on_rails/utils.rb
(1 hunks)lib/react_on_rails/version.rb
(1 hunks)lib/react_on_rails/version_checker.rb
(1 hunks)lib/react_on_rails/version_syntax_converter.rb
(1 hunks)node_package/src/Authenticity.ts
(1 hunks)node_package/src/CallbackRegistry.ts
(1 hunks)node_package/src/ClientSideRenderer.ts
(1 hunks)node_package/src/ComponentRegistry.ts
(1 hunks)node_package/src/PostSSRHookTracker.ts
(1 hunks)node_package/src/RSCProvider.tsx
(1 hunks)node_package/src/RSCRequestTracker.ts
(1 hunks)node_package/src/RSCRoute.tsx
(1 hunks)node_package/src/ReactOnRails.client.ts
(1 hunks)node_package/src/ReactOnRails.full.ts
(1 hunks)node_package/src/ReactOnRails.node.ts
(1 hunks)node_package/src/ReactOnRailsRSC.ts
(1 hunks)node_package/src/RenderUtils.ts
(1 hunks)node_package/src/ServerComponentFetchError.ts
(1 hunks)node_package/src/StoreRegistry.ts
(1 hunks)node_package/src/buildConsoleReplay.ts
(1 hunks)node_package/src/clientStartup.ts
(1 hunks)node_package/src/context.ts
(1 hunks)node_package/src/createReactOutput.ts
(1 hunks)node_package/src/getReactServerComponent.client.ts
(1 hunks)node_package/src/getReactServerComponent.server.ts
(1 hunks)node_package/src/handleError.ts
(1 hunks)node_package/src/injectRSCPayload.ts
(1 hunks)node_package/src/isRenderFunction.ts
(1 hunks)node_package/src/isServerRenderResult.ts
(1 hunks)node_package/src/loadJsonFile.ts
(1 hunks)node_package/src/pageLifecycle.ts
(1 hunks)node_package/src/reactHydrateOrRender.ts
(1 hunks)node_package/src/registerServerComponent/client.tsx
(1 hunks)node_package/src/registerServerComponent/server.rsc.ts
(1 hunks)node_package/src/registerServerComponent/server.tsx
(1 hunks)node_package/src/scriptSanitizedVal.ts
(1 hunks)node_package/src/serverRenderReactComponent.ts
(1 hunks)node_package/src/serverRenderUtils.ts
(1 hunks)node_package/src/streamServerRenderedReactComponent.ts
(1 hunks)node_package/src/transformRSCNodeStream.ts
(1 hunks)node_package/src/transformRSCStreamAndReplayConsoleLogs.ts
(1 hunks)node_package/src/turbolinksUtils.ts
(1 hunks)node_package/src/types/index.ts
(1 hunks)node_package/src/utils.ts
(1 hunks)node_package/src/wrapServerComponentRenderer/client.tsx
(1 hunks)node_package/src/wrapServerComponentRenderer/server.rsc.tsx
(1 hunks)node_package/src/wrapServerComponentRenderer/server.tsx
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
lib/**/*.rb
📄 CodeRabbit inference engine (CLAUDE.md)
Ruby source code must adhere to RuboCop rules (project uses RuboCop for Ruby linting)
Files:
lib/react_on_rails/error.rb
lib/react_on_rails/packer_utils.rb
lib/react_on_rails/test_helper/webpack_assets_status_checker.rb
lib/generators/react_on_rails/generator_helper.rb
lib/react_on_rails/test_helper.rb
lib/react_on_rails/locales/base.rb
lib/generators/react_on_rails/base_generator.rb
lib/react_on_rails/git_utils.rb
lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb
lib/generators/react_on_rails/react_no_redux_generator.rb
lib/react_on_rails/packs_generator.rb
lib/react_on_rails/controller.rb
lib/react_on_rails/server_rendering_pool.rb
lib/react_on_rails.rb
lib/generators/react_on_rails/react_with_redux_generator.rb
lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb
lib/generators/react_on_rails/generator_messages.rb
lib/react_on_rails/utils.rb
lib/react_on_rails/react_component/render_options.rb
lib/react_on_rails/json_parse_error.rb
lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb
lib/react_on_rails/helper.rb
lib/generators/react_on_rails/install_generator.rb
lib/react_on_rails/configuration.rb
lib/generators/react_on_rails/templates/base/base/app/controllers/hello_world_controller.rb
lib/react_on_rails/test_helper/ensure_assets_compiled.rb
lib/generators/react_on_rails/dev_tests_generator.rb
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
lib/react_on_rails/prerender_error.rb
lib/react_on_rails/engine.rb
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/version_checker.rb
lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb
lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb
lib/react_on_rails/server_rendering_js_code.rb
lib/react_on_rails/json_output.rb
node_package/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
JavaScript/TypeScript code must adhere to ESLint rules (project uses ESLint for JS/TS linting)
Files:
node_package/src/createReactOutput.ts
node_package/src/registerServerComponent/server.tsx
node_package/src/ServerComponentFetchError.ts
node_package/src/CallbackRegistry.ts
node_package/src/wrapServerComponentRenderer/server.rsc.tsx
node_package/src/ComponentRegistry.ts
node_package/src/StoreRegistry.ts
node_package/src/transformRSCStreamAndReplayConsoleLogs.ts
node_package/src/RSCRequestTracker.ts
node_package/src/streamServerRenderedReactComponent.ts
node_package/src/ClientSideRenderer.ts
node_package/src/serverRenderReactComponent.ts
node_package/src/ReactOnRails.client.ts
node_package/src/types/index.ts
node_package/src/getReactServerComponent.server.ts
node_package/src/registerServerComponent/server.rsc.ts
node_package/src/clientStartup.ts
node_package/src/ReactOnRails.node.ts
node_package/src/PostSSRHookTracker.ts
node_package/src/injectRSCPayload.ts
node_package/src/wrapServerComponentRenderer/server.tsx
node_package/src/handleError.ts
node_package/src/serverRenderUtils.ts
node_package/src/transformRSCNodeStream.ts
node_package/src/turbolinksUtils.ts
node_package/src/buildConsoleReplay.ts
node_package/src/context.ts
node_package/src/RSCProvider.tsx
node_package/src/reactHydrateOrRender.ts
node_package/src/pageLifecycle.ts
node_package/src/isRenderFunction.ts
node_package/src/ReactOnRailsRSC.ts
node_package/src/isServerRenderResult.ts
node_package/src/RenderUtils.ts
node_package/src/loadJsonFile.ts
node_package/src/scriptSanitizedVal.ts
node_package/src/getReactServerComponent.client.ts
node_package/src/utils.ts
node_package/src/wrapServerComponentRenderer/client.tsx
node_package/src/RSCRoute.tsx
node_package/src/ReactOnRails.full.ts
node_package/src/registerServerComponent/client.tsx
node_package/src/Authenticity.ts
node_package/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Client-side source should be authored in TypeScript under node_package/src (compiled to node_package/lib)
Files:
node_package/src/createReactOutput.ts
node_package/src/registerServerComponent/server.tsx
node_package/src/ServerComponentFetchError.ts
node_package/src/CallbackRegistry.ts
node_package/src/wrapServerComponentRenderer/server.rsc.tsx
node_package/src/ComponentRegistry.ts
node_package/src/StoreRegistry.ts
node_package/src/transformRSCStreamAndReplayConsoleLogs.ts
node_package/src/RSCRequestTracker.ts
node_package/src/streamServerRenderedReactComponent.ts
node_package/src/ClientSideRenderer.ts
node_package/src/serverRenderReactComponent.ts
node_package/src/ReactOnRails.client.ts
node_package/src/types/index.ts
node_package/src/getReactServerComponent.server.ts
node_package/src/registerServerComponent/server.rsc.ts
node_package/src/clientStartup.ts
node_package/src/ReactOnRails.node.ts
node_package/src/PostSSRHookTracker.ts
node_package/src/injectRSCPayload.ts
node_package/src/wrapServerComponentRenderer/server.tsx
node_package/src/handleError.ts
node_package/src/serverRenderUtils.ts
node_package/src/transformRSCNodeStream.ts
node_package/src/turbolinksUtils.ts
node_package/src/buildConsoleReplay.ts
node_package/src/context.ts
node_package/src/RSCProvider.tsx
node_package/src/reactHydrateOrRender.ts
node_package/src/pageLifecycle.ts
node_package/src/isRenderFunction.ts
node_package/src/ReactOnRailsRSC.ts
node_package/src/isServerRenderResult.ts
node_package/src/RenderUtils.ts
node_package/src/loadJsonFile.ts
node_package/src/scriptSanitizedVal.ts
node_package/src/getReactServerComponent.client.ts
node_package/src/utils.ts
node_package/src/wrapServerComponentRenderer/client.tsx
node_package/src/RSCRoute.tsx
node_package/src/ReactOnRails.full.ts
node_package/src/registerServerComponent/client.tsx
node_package/src/Authenticity.ts
🧠 Learnings (16)
📚 Learning: 2024-12-12T13:07:09.929Z
Learnt from: alexeyr-ci
PR: shakacode/react_on_rails#1644
File: node_package/src/ReactOnRailsRSC.ts:87-87
Timestamp: 2024-12-12T13:07:09.929Z
Learning: When handling errors in 'node_package/src/ReactOnRailsRSC.ts', include the error stack in error messages in development and test environments to aid debugging.
Applied to files:
lib/react_on_rails/error.rb
lib/react_on_rails.rb
📚 Learning: 2025-02-13T16:50:26.861Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1644
File: node_package/src/turbolinksUtils.ts:34-36
Timestamp: 2025-02-13T16:50:26.861Z
Learning: In React on Rails, when checking for Turbolinks version 5 using `turbolinksVersion5()`, always ensure `Turbolinks` exists first by checking `turbolinksInstalled()` to prevent TypeError when accessing properties.
Applied to files:
lib/react_on_rails/error.rb
lib/react_on_rails/test_helper.rb
lib/react_on_rails/locales/base.rb
lib/react_on_rails/git_utils.rb
lib/react_on_rails.rb
app/helpers/react_on_rails_helper.rb
lib/react_on_rails/react_component/render_options.rb
lib/react_on_rails/configuration.rb
node_package/src/turbolinksUtils.ts
lib/react_on_rails/test_helper/ensure_assets_compiled.rb
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
node_package/src/pageLifecycle.ts
lib/react_on_rails/engine.rb
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/version_checker.rb
lib/react_on_rails/json_output.rb
📚 Learning: 2025-02-13T16:50:47.848Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1644
File: node_package/src/clientStartup.ts:18-21
Timestamp: 2025-02-13T16:50:47.848Z
Learning: In the react_on_rails module, the `reactOnRailsPageUnloaded` function in clientStartup.ts is intentionally kept private as it's only used internally as a callback for `onPageUnloaded`.
Applied to files:
lib/react_on_rails/error.rb
lib/react_on_rails/test_helper.rb
lib/react_on_rails/locales/base.rb
node_package/src/registerServerComponent/server.tsx
lib/react_on_rails/git_utils.rb
node_package/src/CallbackRegistry.ts
lib/react_on_rails/controller.rb
lib/react_on_rails.rb
app/helpers/react_on_rails_helper.rb
node_package/src/registerServerComponent/server.rsc.ts
lib/react_on_rails/react_component/render_options.rb
node_package/src/ReactOnRails.node.ts
lib/react_on_rails/configuration.rb
node_package/src/context.ts
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
lib/react_on_rails/engine.rb
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/server_rendering_js_code.rb
lib/react_on_rails/json_output.rb
node_package/src/registerServerComponent/client.tsx
📚 Learning: 2025-04-09T12:56:10.756Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1696
File: node_package/src/RSCPayloadContainer.ts:0-0
Timestamp: 2025-04-09T12:56:10.756Z
Learning: In the react_on_rails codebase, RSC payloads are already stringified using `JSON.stringify()` before being processed by the `escapeScript` function, which handles escaping of special characters. The function only needs to handle specific HTML markers like comments and closing script tags.
Applied to files:
lib/react_on_rails/error.rb
lib/react_on_rails/locales/base.rb
lib/react_on_rails/git_utils.rb
lib/react_on_rails.rb
app/helpers/react_on_rails_helper.rb
lib/react_on_rails/react_component/render_options.rb
lib/react_on_rails/json_parse_error.rb
lib/react_on_rails/configuration.rb
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/server_rendering_js_code.rb
lib/react_on_rails/json_output.rb
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
PR: shakacode/react_on_rails#1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.
Applied to files:
lib/react_on_rails/error.rb
lib/react_on_rails/test_helper/webpack_assets_status_checker.rb
lib/react_on_rails/test_helper.rb
lib/react_on_rails/locales/base.rb
lib/react_on_rails/git_utils.rb
lib/react_on_rails.rb
lib/generators/react_on_rails/react_with_redux_generator.rb
app/helpers/react_on_rails_helper.rb
node_package/src/ReactOnRails.client.ts
lib/react_on_rails/react_component/render_options.rb
node_package/src/ReactOnRails.node.ts
lib/react_on_rails/configuration.rb
lib/react_on_rails/test_helper/ensure_assets_compiled.rb
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
node_package/src/ReactOnRailsRSC.ts
lib/react_on_rails/engine.rb
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/version_checker.rb
lib/react_on_rails/server_rendering_js_code.rb
lib/react_on_rails/json_output.rb
node_package/src/ReactOnRails.full.ts
📚 Learning: 2025-02-13T19:09:15.991Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1644
File: node_package/src/RSCWebpackLoader.ts:0-0
Timestamp: 2025-02-13T19:09:15.991Z
Learning: In React Server Components webpack loader, using `new Function('return import("react-server-dom-webpack/node-loader")')()` is necessary as a workaround to bypass TypeScript compilation issues with direct dynamic imports.
Applied to files:
node_package/src/createReactOutput.ts
node_package/src/wrapServerComponentRenderer/server.rsc.tsx
node_package/src/ReactOnRails.client.ts
node_package/src/types/index.ts
node_package/src/getReactServerComponent.server.ts
node_package/src/registerServerComponent/server.rsc.ts
node_package/src/ReactOnRails.node.ts
node_package/src/wrapServerComponentRenderer/server.tsx
node_package/src/handleError.ts
node_package/src/RSCProvider.tsx
node_package/src/isRenderFunction.ts
node_package/src/ReactOnRailsRSC.ts
node_package/src/isServerRenderResult.ts
node_package/src/getReactServerComponent.client.ts
node_package/src/wrapServerComponentRenderer/client.tsx
node_package/src/RSCRoute.tsx
node_package/src/ReactOnRails.full.ts
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
PR: shakacode/react_on_rails#1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Applied to files:
lib/react_on_rails/test_helper/webpack_assets_status_checker.rb
lib/react_on_rails/test_helper.rb
lib/react_on_rails/locales/base.rb
lib/react_on_rails/git_utils.rb
lib/generators/react_on_rails/react_with_redux_generator.rb
lib/react_on_rails/react_component/render_options.rb
lib/react_on_rails/configuration.rb
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
lib/react_on_rails/engine.rb
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/json_output.rb
📚 Learning: 2024-10-08T20:53:47.076Z
Learnt from: theforestvn88
PR: shakacode/react_on_rails#1620
File: spec/dummy/client/app/startup/HelloTurboStream.jsx:3-3
Timestamp: 2024-10-08T20:53:47.076Z
Learning: The `RailsContext` import in `spec/dummy/client/app/startup/HelloTurboStream.jsx` is used later in the project, as clarified by the user theforestvn88.
Applied to files:
lib/react_on_rails/test_helper.rb
node_package/src/ReactOnRails.node.ts
node_package/src/context.ts
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Applied to files:
lib/react_on_rails/test_helper.rb
lib/react_on_rails/locales/base.rb
lib/react_on_rails/git_utils.rb
lib/react_on_rails.rb
app/helpers/react_on_rails_helper.rb
lib/react_on_rails/react_component/render_options.rb
lib/react_on_rails/configuration.rb
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
lib/react_on_rails/engine.rb
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
lib/react_on_rails/version_checker.rb
lib/react_on_rails/json_output.rb
📚 Learning: 2025-07-08T05:57:29.630Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1745
File: node_package/src/RSCRequestTracker.ts:8-14
Timestamp: 2025-07-08T05:57:29.630Z
Learning: The global `generateRSCPayload` function in React on Rails Pro (RORP) is provided by the framework during rendering requests, not implemented in application code. The `declare global` statements are used to document the expected interface that RORP will inject at runtime.
Applied to files:
lib/react_on_rails/locales/base.rb
node_package/src/registerServerComponent/server.tsx
lib/react_on_rails/git_utils.rb
lib/generators/react_on_rails/react_with_redux_generator.rb
app/helpers/react_on_rails_helper.rb
node_package/src/getReactServerComponent.server.ts
node_package/src/registerServerComponent/server.rsc.ts
lib/react_on_rails/react_component/render_options.rb
node_package/src/ReactOnRails.node.ts
lib/react_on_rails/configuration.rb
node_package/src/context.ts
lib/react_on_rails/locales/to_js.rb
lib/react_on_rails/locales/to_json.rb
node_package/src/ReactOnRailsRSC.ts
lib/react_on_rails/test_helper/webpack_assets_compiler.rb
lib/react_on_rails/version_syntax_converter.rb
lib/react_on_rails/version.rb
node_package/src/getReactServerComponent.client.ts
lib/react_on_rails/server_rendering_js_code.rb
lib/react_on_rails/json_output.rb
node_package/src/registerServerComponent/client.tsx
📚 Learning: 2025-06-09T07:58:02.646Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1696
File: node_package/src/RSCPayloadGenerator.ts:124-168
Timestamp: 2025-06-09T07:58:02.646Z
Learning: In React Server Components (RSC) implementations, explicit error handling in RSC payload generation streams (like in RSCPayloadGenerator.ts) is not needed because errors will propagate to client components that fetch the RSC payloads (such as RSCRoute components). React's built-in error handling mechanisms and ErrorBoundary components are sufficient for handling these errors at the component level, which allows for better user experience with appropriate error UI fallbacks.
Applied to files:
node_package/src/registerServerComponent/server.tsx
node_package/src/transformRSCStreamAndReplayConsoleLogs.ts
node_package/src/ReactOnRails.node.ts
node_package/src/RSCProvider.tsx
node_package/src/getReactServerComponent.client.ts
node_package/src/RSCRoute.tsx
node_package/src/ReactOnRails.full.ts
node_package/src/registerServerComponent/client.tsx
📚 Learning: 2025-06-11T12:34:58.182Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1696
File: node_package/src/RSCProvider.tsx:0-0
Timestamp: 2025-06-11T12:34:58.182Z
Learning: `RSCProvider` intentionally keeps failed `getServerComponent` promises cached (even if rejected) to avoid repeated fetch attempts; callers must use `refetchComponent` to retry.
Applied to files:
node_package/src/ServerComponentFetchError.ts
node_package/src/wrapServerComponentRenderer/server.rsc.tsx
node_package/src/RSCRoute.tsx
📚 Learning: 2025-09-04T23:41:10.308Z
Learnt from: CR
PR: shakacode/react_on_rails#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T23:41:10.308Z
Learning: Applies to node_package/src/**/*.{ts,tsx} : Client-side source should be authored in TypeScript under node_package/src (compiled to node_package/lib)
Applied to files:
node_package/src/wrapServerComponentRenderer/server.rsc.tsx
node_package/src/clientStartup.ts
node_package/src/getReactServerComponent.client.ts
node_package/src/wrapServerComponentRenderer/client.tsx
node_package/src/registerServerComponent/client.tsx
📚 Learning: 2025-02-13T14:29:49.267Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1644
File: spec/react_on_rails/utils_spec.rb:218-218
Timestamp: 2025-02-13T14:29:49.267Z
Learning: In RSpec tests, prefer using local variables over constants within test blocks to avoid constant redefinition warnings and maintain better test isolation.
Applied to files:
lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb
📚 Learning: 2025-09-04T23:41:10.308Z
Learnt from: CR
PR: shakacode/react_on_rails#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T23:41:10.308Z
Learning: Applies to spec/**/*.rb : Ruby tests should be written for RSpec (project uses RSpec for Ruby testing)
Applied to files:
lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb
lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
PR: shakacode/react_on_rails#1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation is handled in deeper level calls of the React on Rails Pro codebase, so it doesn't need to be validated again in the `rsc_payload_react_component` helper method.
Applied to files:
lib/react_on_rails/react_component/render_options.rb
lib/react_on_rails/configuration.rb
lib/react_on_rails/json_output.rb
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: dummy-app-integration-tests (newest)
- GitHub Check: dummy-app-integration-tests (oldest)
- GitHub Check: examples (newest)
🔇 Additional comments (75)
node_package/src/turbolinksUtils.ts (1)
1-2
: License header placement LGTM.Top-of-file block comment before declarations; aligns with project ESLint usage.
lib/react_on_rails/utils.rb (1)
3-5
: Ruby header ordering is correct.SPDX lines come after the frozen_string_literal magic comment (and before code), which satisfies Ruby and RuboCop expectations.
node_package/src/isRenderFunction.ts (1)
1-2
: SPDX header added; placement correct.No impact on exports or types.
lib/generators/react_on_rails/generator_messages.rb (1)
3-5
: Header conforms to Ruby file conventions.After magic comment, before any module/class code. Good.
lib/react_on_rails/error.rb (1)
3-5
: SPDX header OK.Ordering with frozen_string_literal preserved.
lib/react_on_rails/locales/base.rb (1)
3-5
: License header placement looks good.After magic comment; no functional changes.
node_package/src/CallbackRegistry.ts (1)
1-2
: Header added properly.Top-of-file block comment; no lint impact expected.
node_package/src/handleError.ts (1)
1-2
: SPDX header added correctly (ESLint-friendly placement). Repo-wide verification inconclusive — sandbox script errors.node_package/src/handleError.ts — block comment is at the very top before imports; placement is correct. Automated repo-wide header-check in the sandbox failed with repeated "/bin/bash: ... !: command not found" errors and produced inconclusive output; re-run the header-check locally or allow a corrected script run to confirm SPDX presence/order (including Ruby frozen_string_literal) across the repo.
lib/react_on_rails/prerender_error.rb (1)
3-5
: SPDX header added correctly; magic comment preserved. LGTM.
Placement after# frozen_string_literal: true
complies with Ruby and RuboCop expectations.node_package/src/ComponentRegistry.ts (1)
1-2
: SPDX header added before imports. LGTM.lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb (1)
3-5
: SPDX header added correctly; magic comment preserved. LGTM.node_package/src/RSCRequestTracker.ts (1)
1-2
: SPDX header added before imports. LGTM.node_package/src/streamServerRenderedReactComponent.ts (1)
1-2
: SPDX header added before imports. LGTM.node_package/src/PostSSRHookTracker.ts (1)
1-2
: SPDX header added before code. LGTM.lib/react_on_rails/version_checker.rb (1)
3-5
: SPDX header added correctly; magic comment preserved. LGTM.node_package/src/ReactOnRails.client.ts (1)
1-2
: SPDX header added before imports. LGTM.node_package/src/ClientSideRenderer.ts (1)
1-2
: Header insertion LGTM.Comment block precedes ESLint disable and imports; no functional impact.
lib/react_on_rails/server_rendering_pool.rb (1)
3-4
: Header correctly placed after frozen string literal.Complies with RuboCop conventions; no runtime changes.
lib/react_on_rails/controller.rb (1)
3-4
: Header correctly placed after frozen string literal.Style and placement look consistent across the codebase.
lib/generators/react_on_rails/react_no_redux_generator.rb (1)
3-4
: Generator file header looks correct.Positioned after frozen string literal; no effect on generator behavior.
node_package/src/registerServerComponent/server.tsx (1)
1-2
: SPDX header added correctly.No impact on exports or runtime.
node_package/src/loadJsonFile.ts (1)
1-2
: Header insertion LGTM.Precedes imports; no functional changes.
node_package/src/StoreRegistry.ts (1)
1-2
: Header insertion LGTM.Placement and formatting are consistent.
node_package/src/RSCProvider.tsx (1)
1-2
: SPDX header added correctly; manual verification requiredTop-of-file block comment before imports aligns with ESLint expectations. Sandbox run of the provided verification script failed with "/bin/bash: /dev/fd/63: No such file or directory" and "rg regex parse error: unrecognized escape sequence for '^#!'". Run the supplied verification script locally to confirm shebangs, Ruby frozen_string_literal placement, and 'use client/server' directive positions.
lib/react_on_rails/react_component/render_options.rb (1)
3-5
: Headers added in the correct place (after magic comment).Preserves the frozen_string_literal pragma position; should satisfy RuboCop.
node_package/src/clientStartup.ts (1)
1-2
: License header added; no runtime impact.Placement before imports is fine for ESLint/TS.
lib/generators/react_on_rails/base_generator.rb (1)
3-5
: Header inserted correctly after magic comment.No side effects on generator behavior.
node_package/src/RSCRoute.tsx (1)
1-2
: Header looks good; no changes to component logic.node_package/src/isServerRenderResult.ts (1)
1-2
: Header added; import/types unaffected.lib/react_on_rails/test_helper/webpack_assets_status_checker.rb (1)
3-5
: Header correctly follows magic comment; helper behavior unchanged.node_package/src/injectRSCPayload.ts (1)
1-2
: SPDX header added; streaming logic untouched.node_package/src/wrapServerComponentRenderer/client.tsx (1)
1-2
: Header placement is correct; no effect on client wrapper.node_package/src/reactHydrateOrRender.ts (1)
1-2
: License header placement LGTMBlock comment at top is correct and should satisfy ESLint/Prettier. No functional changes.
node_package/src/getReactServerComponent.client.ts (1)
1-2
: License header added correctlyConsistent MIT SPDX header; no behavioral impact.
node_package/src/ReactOnRails.full.ts (1)
1-2
: Header insertion looks goodTop-of-file MIT SPDX header; no runtime changes.
node_package/src/wrapServerComponentRenderer/server.rsc.tsx (1)
1-2
: SPDX header OKPlacement and style match the rest of the TS/TSX files.
node_package/src/registerServerComponent/client.tsx (1)
1-2
: Header applied consistentlyNo effect on exports; formatting is consistent.
lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb (1)
3-5
: Ruby header placement is correctHeader follows the frozen_string_literal pragma as required by RuboCop.
node_package/src/context.ts (1)
1-2
: MIT SPDX header LGTMClean insertion; no lint risks anticipated.
lib/react_on_rails/packs_generator.rb (1)
3-5
: Header after magic comment is correctComplies with RuboCop expectations; no code changes.
lib/react_on_rails/test_helper.rb (1)
3-5
: SPDX header placement LGTMHeader added after the frozen string literal directive, matching RuboCop expectations and PR intent. No functional changes.
lib/react_on_rails/json_output.rb (1)
3-5
: SPDX header placement LGTMInserted correctly after the magic comment; no runtime impact.
node_package/src/pageLifecycle.ts (1)
1-2
: SPDX header added — looks goodTop-of-file block comment complies with ESLint/Prettier norms; no behavior changes.
app/helpers/react_on_rails_helper.rb (1)
3-5
: SPDX header placement LGTMPreserves frozen string literal and adds header per guidelines; no functional changes.
node_package/src/transformRSCNodeStream.ts (1)
1-2
: SPDX header added — looks goodNon-functional header insertion; import/export surface unchanged.
node_package/src/serverRenderUtils.ts (1)
1-2
: SPDX header added — looks goodBanner comment is correctly placed; no code movement.
lib/react_on_rails/helper.rb (1)
3-5
: SPDX header placement LGTMAfter frozen string literal, before RuboCop directives; no behavior impact.
lib/react_on_rails/packer_utils.rb (1)
3-5
: SPDX header placement LGTMHeader added in the right spot; RuboCop should be satisfied.
lib/react_on_rails/locales/to_js.rb (1)
3-4
: LGTM: Header added after frozen string literal.RuboCop-compatible placement; preserves the magic comment.
lib/generators/react_on_rails/install_generator.rb (1)
3-4
: LGTM: Header inserted in correct position.Magic comment remains first; no functional changes.
lib/react_on_rails/version.rb (1)
3-4
: LGTM: SPDX header added without impacting VERSION.lib/react_on_rails/git_utils.rb (1)
3-4
: LGTM: MIT SPDX header added; preserves magic comment and requires.lib/react_on_rails/test_helper/ensure_assets_compiled.rb (1)
3-4
: LGTM: License header added in the right place.No impact on test helper behavior.
node_package/src/utils.ts (1)
1-2
: LGTM: SPDX header added using a block comment.Conforms to typical ESLint header style; no shebang present to preserve.
node_package/src/createReactOutput.ts (1)
1-2
: LGTM: Header added; no effect on exports or runtime.node_package/src/types/index.ts (1)
1-2
: Approve: SPDX header and Ruby magic comments verified.
SPDX-License-Identifier: MIT present in node_package/src/types/index.ts, node_package/src/utils.ts, node_package/src/createReactOutput.ts; # frozen_string_literal: true is the first line in the checked Ruby files.lib/generators/react_on_rails/react_with_redux_generator.rb (1)
3-5
: LGTM: Header correctly inserted after the magic comment.Placement preserves
# frozen_string_literal: true
at the top and follows RuboCop norms.node_package/src/serverRenderReactComponent.ts (1)
1-2
: LGTM: SPDX header added with proper block comment.No impact on imports or types; ESLint should be fine.
node_package/src/RenderUtils.ts (1)
1-2
: LGTM: SPDX header formatting looks good.Comment style and placement are correct.
lib/react_on_rails.rb (1)
3-5
: LGTM: Header placed after magic comment.Maintains Ruby directive position; safe for RuboCop.
node_package/src/ReactOnRails.node.ts (1)
1-2
: LGTM: MIT SPDX header added.No behavioral changes; complies with header convention.
node_package/src/registerServerComponent/server.rsc.ts (1)
1-2
: LGTM: License header added with correct comment style.No effect on RSC registration code.
node_package/src/transformRSCStreamAndReplayConsoleLogs.ts (1)
1-2
: LGTM: SPDX header correctly inserted.No impact on stream transformer logic.
lib/generators/react_on_rails/dev_tests_generator.rb (1)
3-5
: LGTM: Header correctly follows# frozen_string_literal: true
.Placement meets Ruby conventions.
node_package/src/wrapServerComponentRenderer/server.tsx (1)
1-2
: LGTM: SPDX header added correctly above imports.No ESLint/TS concerns expected from this change.
lib/generators/react_on_rails/templates/dev_tests/spec/spec_helper.rb (1)
3-5
: LGTM: SPDX header inserted after frozen string literal.Formatting aligns with RuboCop expectations.
lib/generators/react_on_rails/generator_helper.rb (1)
3-5
: LGTM: SPDX header added; magic comment preserved.No functional impact.
lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb (1)
3-5
: LGTM: SPDX header added in correct position.RSpec template behavior unaffected.
node_package/src/scriptSanitizedVal.ts (1)
1-2
: LGTM: SPDX block comment added at top.Prettier/ESLint should accept this format.
lib/react_on_rails/json_parse_error.rb (1)
3-5
: LGTM: SPDX header added; layout preserved.No runtime changes.
lib/react_on_rails/engine.rb (1)
3-5
: LGTM: SPDX header added after magic comment.Engine initialization unchanged.
node_package/src/buildConsoleReplay.ts (1)
1-2
: Approve — TS license header OK; run ESLint locally to confirmPlacement is correct and won’t affect runtime. Sandbox lint failed: project is configured to use yarn and npx eslint errored loading the TypeScript config (missing "jiti"). Run your project's ESLint (via yarn) to validate the header rule.
lib/generators/react_on_rails/templates/base/base/app/controllers/hello_world_controller.rb (1)
3-5
: Template header insertion OK — verify ASCII hyphen with RuboCopHeader placement is correct; optional: normalize the year dash to an ASCII hyphen.
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLCVerification couldn't be executed here: 'bundle' not found. Run locally:
bundle exec rubocop lib/generators/react_on_rails/templates/base/base/app/controllers/hello_world_controller.rblib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb (1)
3-5
: Replace en dash with ASCII hyphen in license headerHeader placement is correct; a non‑ASCII en dash (U+2013) is present at lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb:3 — replace with an ASCII hyphen to avoid potential RuboCop Style/AsciiComments linting.
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLCRun
bundle exec rubocop lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb
to verify (local run required — CI attempt here failed with "bundle: command not found").lib/react_on_rails/version_syntax_converter.rb (1)
3-5
: Replace en dash with ASCII hyphen in copyright headerMagic comment remains first (RuboCop). Replace en dash to avoid Style/AsciiComments violations.
File: lib/react_on_rails/version_syntax_converter.rb — lines 3-5
-# Copyright (c) 2015–2025 ShakaCode, LLC +# Copyright (c) 2015-2025 ShakaCode, LLC
Code Review for PR #1776: Add MIT SPDX Headers to Core✅ Overall AssessmentThis PR systematically adds MIT SPDX license headers to core source files. The implementation is thorough and well-structured. 👍 Strengths
🔍 Areas for Review
🐛 Potential Issues
🚀 Suggestions
✔️ Testing Recommendations
🎯 ConclusionThis is a well-executed PR that properly adds license headers throughout the codebase. The main consideration is whether template files should include ShakaCode's copyright when they're generated into user projects. Once this is addressed, the PR is ready to merge. The implementation using linting tools for enforcement is excellent and will help maintain compliance going forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.rubocop.yml (1)
141-150
: Accept ASCII hyphen in copyright regex; frozen_string_literal verified
- Broaden the regex to accept ASCII hyphen. Apply this diff:
- Notice: '^# Copyright \(c\) \d{4}(–\d{4})? ShakaCode, LLC' + Notice: '^# Copyright \(c\) \d{4}([–-]\d{4})? ShakaCode, LLC'
- Verified targeted Ruby files have
# frozen_string_literal: true
on the required line (line 1, or line 2 if a shebang is present); no further changes needed for the pragma.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (46)
.rubocop.yml
(1 hunks)eslint.config.ts
(2 hunks)node_package/src/Authenticity.ts
(1 hunks)node_package/src/CallbackRegistry.ts
(1 hunks)node_package/src/ClientSideRenderer.ts
(1 hunks)node_package/src/ComponentRegistry.ts
(1 hunks)node_package/src/PostSSRHookTracker.ts
(1 hunks)node_package/src/RSCProvider.tsx
(1 hunks)node_package/src/RSCRequestTracker.ts
(1 hunks)node_package/src/RSCRoute.tsx
(1 hunks)node_package/src/ReactOnRails.client.ts
(1 hunks)node_package/src/ReactOnRails.full.ts
(1 hunks)node_package/src/ReactOnRails.node.ts
(1 hunks)node_package/src/ReactOnRailsRSC.ts
(1 hunks)node_package/src/RenderUtils.ts
(1 hunks)node_package/src/ServerComponentFetchError.ts
(1 hunks)node_package/src/StoreRegistry.ts
(1 hunks)node_package/src/buildConsoleReplay.ts
(1 hunks)node_package/src/clientStartup.ts
(1 hunks)node_package/src/context.ts
(1 hunks)node_package/src/createReactOutput.ts
(1 hunks)node_package/src/getReactServerComponent.client.ts
(1 hunks)node_package/src/getReactServerComponent.server.ts
(1 hunks)node_package/src/handleError.ts
(1 hunks)node_package/src/injectRSCPayload.ts
(1 hunks)node_package/src/isRenderFunction.ts
(1 hunks)node_package/src/isServerRenderResult.ts
(1 hunks)node_package/src/loadJsonFile.ts
(1 hunks)node_package/src/pageLifecycle.ts
(1 hunks)node_package/src/reactHydrateOrRender.ts
(1 hunks)node_package/src/registerServerComponent/client.tsx
(1 hunks)node_package/src/registerServerComponent/server.rsc.ts
(1 hunks)node_package/src/registerServerComponent/server.tsx
(1 hunks)node_package/src/scriptSanitizedVal.ts
(1 hunks)node_package/src/serverRenderReactComponent.ts
(1 hunks)node_package/src/serverRenderUtils.ts
(1 hunks)node_package/src/streamServerRenderedReactComponent.ts
(1 hunks)node_package/src/transformRSCNodeStream.ts
(1 hunks)node_package/src/transformRSCStreamAndReplayConsoleLogs.ts
(1 hunks)node_package/src/turbolinksUtils.ts
(1 hunks)node_package/src/types/index.ts
(1 hunks)node_package/src/utils.ts
(1 hunks)node_package/src/wrapServerComponentRenderer/client.tsx
(1 hunks)node_package/src/wrapServerComponentRenderer/server.rsc.tsx
(1 hunks)node_package/src/wrapServerComponentRenderer/server.tsx
(1 hunks)package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (13)
- node_package/src/StoreRegistry.ts
- node_package/src/wrapServerComponentRenderer/server.tsx
- node_package/src/createReactOutput.ts
- node_package/src/reactHydrateOrRender.ts
- node_package/src/context.ts
- node_package/src/CallbackRegistry.ts
- node_package/src/ComponentRegistry.ts
- node_package/src/getReactServerComponent.client.ts
- node_package/src/clientStartup.ts
- node_package/src/wrapServerComponentRenderer/server.rsc.tsx
- node_package/src/handleError.ts
- node_package/src/RSCRoute.tsx
- node_package/src/registerServerComponent/server.tsx
🚧 Files skipped from review as they are similar to previous changes (30)
- node_package/src/getReactServerComponent.server.ts
- node_package/src/registerServerComponent/server.rsc.ts
- node_package/src/transformRSCStreamAndReplayConsoleLogs.ts
- node_package/src/ReactOnRails.node.ts
- node_package/src/streamServerRenderedReactComponent.ts
- node_package/src/transformRSCNodeStream.ts
- node_package/src/RenderUtils.ts
- node_package/src/PostSSRHookTracker.ts
- node_package/src/loadJsonFile.ts
- node_package/src/ReactOnRails.client.ts
- node_package/src/ClientSideRenderer.ts
- node_package/src/registerServerComponent/client.tsx
- node_package/src/isServerRenderResult.ts
- node_package/src/serverRenderReactComponent.ts
- node_package/src/utils.ts
- node_package/src/types/index.ts
- node_package/src/isRenderFunction.ts
- node_package/src/ReactOnRails.full.ts
- node_package/src/RSCProvider.tsx
- node_package/src/buildConsoleReplay.ts
- node_package/src/injectRSCPayload.ts
- node_package/src/wrapServerComponentRenderer/client.tsx
- node_package/src/pageLifecycle.ts
- node_package/src/turbolinksUtils.ts
- node_package/src/RSCRequestTracker.ts
- node_package/src/ReactOnRailsRSC.ts
- node_package/src/Authenticity.ts
- node_package/src/serverRenderUtils.ts
- node_package/src/ServerComponentFetchError.ts
- node_package/src/scriptSanitizedVal.ts
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-04T23:41:10.308Z
Learnt from: CR
PR: shakacode/react_on_rails#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T23:41:10.308Z
Learning: Applies to node_package/src/**/*.{ts,tsx,js,jsx} : JavaScript/TypeScript code must adhere to ESLint rules (project uses ESLint for JS/TS linting)
Applied to files:
eslint.config.ts
📚 Learning: 2025-09-04T23:41:10.308Z
Learnt from: CR
PR: shakacode/react_on_rails#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-04T23:41:10.308Z
Learning: Applies to lib/**/*.rb : Ruby source code must adhere to RuboCop rules (project uses RuboCop for Ruby linting)
Applied to files:
.rubocop.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: dummy-app-integration-tests (oldest)
- GitHub Check: dummy-app-integration-tests (newest)
- GitHub Check: rspec-package-tests (oldest)
- GitHub Check: rspec-package-tests (newest)
- GitHub Check: build
- GitHub Check: examples (oldest)
- GitHub Check: examples (newest)
🔇 Additional comments (3)
eslint.config.ts (2)
4-5
: Typed import and plugin import look correct.
55-66
: No change required — license-header glob is sufficient for node_package/src.
node_package/src contains 36 .ts, 7 .tsx and 2 .cts files and no .js/.jsx, so the current files pattern (ts/tsx) already covers the sources.package.json (1)
55-55
: Add devDependency for license headers — ESLint v9 flat-config & ESM import confirmedConfirmed: eslint-plugin-license-header@^0.8.0 supports ESLint v9 flat config and works with ESM imports in eslint.config.ts.
- Import: import licenseHeader from "eslint-plugin-license-header"
- Register: plugins: { "license-header": licenseHeader }
- Enable rule: "license-header/header": "error" (or provide the rule options object)
Code Review for PR #1776: Add MIT SPDX Headers✅ Overall AssessmentThis PR successfully adds SPDX license headers to the core Ruby and JavaScript/TypeScript source files. The implementation is clean and follows best practices for license header management. 👍 Strengths
📋 Code Quality & Best Practices
🔍 Observations & Minor Considerations
✅ Security & Performance
✅ Test Coverage
📝 Recommendations
✅ ApprovalThis PR is well-executed and ready for merge. The systematic approach to adding SPDX headers with automated enforcement is excellent for long-term maintainability. Reviewed using the repository CLAUDE.md guidelines |
Code Review: Add MIT SPDX Headers to CoreThank you for this PR! I've reviewed the changes and here's my comprehensive feedback: ✅ Strengths
🎯 Code Quality & Best PracticesGood practices observed:
Minor suggestion:
🔍 Potential IssuesNo critical issues found. The changes are safe and non-breaking. ⚡ Performance Considerations
🔒 Security ConcernsNone - these changes only add license documentation. 🧪 Test Coverage
📝 Additional Observations
✨ RecommendationThis PR is ready to merge. The implementation is thorough, consistent, and follows best practices for adding license headers to an existing codebase. Review generated with assistance from Claude Code |
Code Review for PR #1776: Add MIT SPDX HeadersThank you for adding standardized license headers across the codebase. Here's my comprehensive review: ✅ Strengths
🔍 Observations & Suggestions
🛡️ Security & Best Practices
📊 Code Quality
✔️ RecommendationAPPROVED - This is a well-executed change that improves license compliance and sets up proper automation for the future. The implementation is clean, consistent, and follows best practices. Minor NoteThe PR checklist items for tests, documentation, and CHANGELOG are unchecked. While tests aren't strictly necessary for license headers, consider:
Great work on this housekeeping task! 🎯 |
Pull Request Review: Add MIT SPDX HeadersThank you for adding SPDX license headers. This is important for license compliance. Strengths
Observations
IssuesNone identified. Changes are safe with no functional impact. TestingRun 'rake lint' and 'yarn run lint' to verify new rules pass. Security & PerformanceNo concerns - these are comment-only changes. Recommendations
ConclusionWell-executed PR with proper tooling for compliance. Approved - ready to merge. |
Code Review for PR #1776: Add MIT SPDX Headers✅ Strengths
🔍 Observations & Suggestions
🐛 Potential Issues
📋 Test Coverage Recommendations
⚡ Performance ConsiderationsThe additional ESLint plugin ( 🔒 SecurityNo security concerns - adding license headers is a best practice for open source projects and doesn't introduce any vulnerabilities. ✨ Overall AssessmentThis is a well-executed change that properly adds MIT SPDX headers throughout the codebase. The implementation is thorough, consistent, and includes proper enforcement through linting rules. The PR accomplishes its stated goal effectively. Recommendation: ✅ Approved - Ready to merge after verifying linters pass. |
Code Review for PR #1776: Add MIT SPDX Headers✅ Overall AssessmentThis PR successfully adds MIT SPDX license headers across the React on Rails codebase. The implementation is clean, consistent, and follows best practices for license header management. 👍 Strengths
🔍 Areas for Consideration
🐛 Potential IssuesNo critical bugs or security issues identified. The changes are additive and non-functional. 💡 Suggestions for Improvement
✅ Security ReviewNo security concerns. The changes only add copyright/license headers and do not modify any functional code. 📊 Test CoverageN/A - These are documentation-only changes that do not affect functionality. Existing tests should continue to pass. 🚀 PerformanceNo performance impact - headers are comments that do not affect runtime behavior. ConclusionApproved ✅ - This is a well-executed housekeeping PR that properly adds SPDX license headers throughout the codebase. The implementation is thorough and includes proper linting rules to maintain consistency going forward. Minor suggestions above are optional enhancements that could be addressed in future PRs if desired. |
Code Review for PR #1776: Add MIT SPDX HeadersOverall AssessmentThis PR adds MIT SPDX license headers to core Ruby and JavaScript/TypeScript source files. The implementation is generally well-executed with proper tooling integration for enforcement. ✅ Strengths
|
Code Review for PR #1776: Add MIT SPDX HeadersThank you for adding SPDX license headers to the codebase! This is an important improvement for license compliance and clarity. Here is my comprehensive review: ✅ Strengths
📋 Observations & Suggestions
|
Code Review: Add MIT SPDX Headers to Core✅ Strengths
🔍 Observations & Suggestions1. Date Range FormatThe copyright notice uses 2015–2025 with an en-dash (U+2013). While technically correct, consider:
2. Linting Configuration✅ Good: Both RuboCop and ESLint configurations enforce the headers
3. Test CoverageThe PR checklist indicates tests are not updated. While this is acceptable for a documentation-only change, consider:
4. Generator TemplatesI notice the templates in lib/generators/react_on_rails/templates/ also received headers. This is good for consistency, though be aware these headers will be copied to generated user code.
|
Code Review for PR #1776: Add MIT SPDX HeadersThank you for adding SPDX license headers to the codebase. This is an important step for license compliance and clarity. Here's my comprehensive review: ✅ Code Quality and Best PracticesStrengths:
Suggestions:
✅ No Critical Bugs or Issues FoundThe implementation is solid with no apparent bugs. The headers are correctly formatted and positioned:
✅ Performance ConsiderationsNo performance impact - these are comment-only changes that:
✅ Security ConcernsNo security issues identified. The changes:
|
Code Review for PR #1776: Add MIT SPDX Headers to CoreOverall AssessmentThis PR systematically adds MIT SPDX license headers to core Ruby and JavaScript/TypeScript files. The implementation is clean and consistent across the codebase. ✅ Strengths
🔍 Observations & Suggestions
🔒 Security ConsiderationsNo security concerns - these are documentation-only changes. 📋 Recommendations
✅ ApprovalThis is a well-executed housekeeping PR that properly adds license headers throughout the codebase. The implementation is consistent, properly automated, and follows best practices for SPDX compliance. LGTM 👍 - Ready to merge after verifying the linting rules work as expected. |
PR Review: Add MIT SPDX Headers to CoreThank you for this contribution! I've reviewed the changes to add MIT SPDX license headers across the codebase. Here's my comprehensive feedback: ✅ Strengths
🔍 Areas for Consideration1. Copyright Date RangeThe headers use
2. Linting Configuration PathsThe RuboCop configuration includes specific paths but might miss some Ruby files: Include:
- 'app/helpers/react_on_rails_helper.rb'
- 'lib/generators/react_on_rails/**/*.rb'
- 'lib/react_on_rails/**/*.rb' Missing coverage for:
Consider using: Include:
- 'app/helpers/**/*.rb'
- 'lib/**/*.rb' 3. Test CoverageWhile the PR checklist indicates tests aren't needed, consider:
4. Template FilesGood that you've added headers to generator template files. This ensures newly generated code will include proper licensing. 🐛 Potential Issues
📋 Recommendations
✨ Overall AssessmentThis is a well-executed PR that properly adds license headers throughout the codebase. The implementation is thorough and includes proper enforcement mechanisms. With the minor considerations addressed above (particularly the copyright date range clarification and ensuring full path coverage in linting rules), this will be a valuable addition to the project's compliance and legal clarity. Great work on maintaining code quality while adding these important legal notices! 👍 |
Code Review: Add MIT SPDX Headers to CoreThank you for adding SPDX license headers to the codebase. This is a valuable addition for license compliance and clarity. Here's my comprehensive review: ✅ Strengths
🔍 Observations & Suggestions1. Template Files ConsiderationThe headers are being added to generator template files (e.g.,
2. Year Range FormatUsing "2015–2025" with an en-dash (–) is typographically correct but could cause issues:
3. Linting ConfigurationThe ESLint configuration correctly adds the license-header plugin, but:
4. Missing Test CoverageAs noted in the PR checklist, no tests were added. While not critical for header additions, consider:
🔒 Security & Performance
📋 Recommendations
✨ Overall AssessmentThis is a well-executed change that improves license clarity and compliance. The automated enforcement through linting is particularly valuable. With the template file consideration addressed, this PR would be ready to merge. Great work on maintaining consistency across the codebase! 👍 |
Code Review for PR #1776: Add MIT SPDX Headers✅ Overall AssessmentThis PR successfully adds MIT SPDX license headers across the codebase in a consistent and well-structured manner. The implementation is thorough and follows best practices. 🎯 Strengths
📋 Observations & Suggestions1. Linting Configuration✅ The ESLint and RuboCop configurations properly enforce headers for new files
2. File Coverage✅ Good coverage of core source files:
Note: The PR correctly excludes non-source files (tests, configs, build outputs) 3. Header FormatThe multi-line format for TypeScript files is appropriate: /* Copyright (c) 2015–2025 ShakaCode, LLC
SPDX-License-Identifier: MIT */ 4. Minor Considerations
🔒 SecurityNo security concerns identified. License headers are informational only. ⚡ PerformanceNo performance impact - headers are comments that don't affect runtime. 🧪 TestingNo test changes needed as this is a documentation/legal compliance change. ✅ RecommendationAPPROVED - This PR is ready to merge. The implementation is thorough, consistent, and includes proper enforcement mechanisms to maintain compliance going forward. 📝 Post-Merge Suggestions
Great work on this compliance update! 🎉 |
Code Review for PR #1776: Add MIT SPDX HeadersThank you for adding SPDX license headers to the codebase. This is an important step for license compliance and clarity. Here's my comprehensive review: ✅ Strengths
🔍 Issues Found1. Missing newlines at end of Ruby files 🚨Multiple Ruby files are missing the final newline character, which violates standard Ruby style:
Fix: Ensure all Ruby files end with a newline character. 2. Inconsistent blank lines after headers
Recommendation: Standardize to 1 blank line after headers for consistency. 3. RuboCop configuration scope too narrowThe RuboCop Layout/Copyright rule only includes specific files. Consider using glob patterns: Include:
- 'app/helpers/**/*.rb'
- 'lib/**/*.rb' 4. TypeScript type assertion workaroundUsing 'as ESLint.Plugin' type assertion in eslint.config.ts suggests the plugin might not have proper TypeScript definitions. Consider opening an issue with the plugin maintainer or using a more type-safe approach. 🔒 Security Considerations
🚀 Performance Considerations
🧪 Test Coverage
📝 Additional Recommendations
🎯 Action Items
Overall, this is a valuable contribution that improves license clarity across the codebase. The issues found are mostly minor formatting concerns that should be easy to address. Great work on the comprehensive coverage and linting enforcement! 👍 |
Code Review: Add MIT SPDX Headers to CoreThank you for adding SPDX license headers to the codebase! This is an important step for license compliance and clarity. Here's my comprehensive review: ✅ Strengths
🔍 Areas of Concern1. Generator Templates Issue 🚨The templates in
Recommendation: Exclude all files under 2. Test CoverageWhile the PR checklist indicates tests aren't needed, consider:
3. Documentation UpdatesThe CHANGELOG.md should be updated to reflect this change, especially since it affects:
📋 Specific Recommendations
🔒 Security & Performance
✨ Overall AssessmentThis is a well-executed PR that improves license clarity across the codebase. The main issue to address is ensuring generator templates don't impose copyright on user-generated code. Once that's resolved, this will be ready to merge. The consistent date format (2015–2025) and proper SPDX identifier usage demonstrate attention to detail. Good work on maintaining both Ruby and JavaScript/TypeScript consistency! |
Code Review for PR #1776: Add MIT SPDX HeadersOverall AssessmentThis PR systematically adds MIT SPDX license headers to the React on Rails core codebase. The implementation is clean and follows best practices for license header management. ✅ Strengths
🔍 Observations & Suggestions
🚧 Potential Considerations
✨ Minor Enhancement Opportunities
VerdictThe PR is well-executed and ready for merge. The systematic approach to adding license headers with proper tooling enforcement ensures long-term maintainability. The only verification needed is confirming the 2015 start date is accurate for copyright purposes. Great work on improving the project's license compliance! 🎯 |
Code Review: Add MIT SPDX Headers to Core (Ruby and JS/TS)✅ Overall AssessmentThis PR successfully adds MIT SPDX license headers across the codebase in a consistent and well-structured manner. The implementation is clean and follows best practices. Strengths 👍
Code Quality ✨
Minor Observations 📝
Security & Performance 🔒
Test Coverage ✅While the PR doesn't add new tests (appropriately marked N/A in checklist), the existing test suite validates that the headers don't break any functionality. The linting rules themselves serve as the test for header presence. Recommendations 💡
ConclusionThis is a well-executed housekeeping PR that properly adds license headers throughout the codebase. The implementation is thorough, follows conventions, and includes appropriate tooling to maintain compliance going forward. Approved! ✅ |
Code Review for PR #1776: Add MIT SPDX HeadersThank you for this contribution to standardize license headers across the codebase! I have reviewed the changes and here is my feedback: ✅ Strengths
🔍 Areas to Consider
📋 Recommendations
🔒 Security & Performance
✨ Overall AssessmentThis is a well-executed licensing standardization effort. The changes are comprehensive, consistent, and include proper tooling to maintain compliance going forward. The PR accomplishes its stated goal effectively without any functional impact on the codebase. Approved ✅ - Ready to merge once any minor considerations are addressed or acknowledged. |
Code Review✅ Strengths
🔍 Observations & Suggestions
🚀 Performance & Security
✅ Overall AssessmentThis is a well-executed PR that systematically adds license headers across the codebase. The implementation is thorough and includes proper tooling to maintain compliance going forward. The changes align with best practices for open-source projects. Recommendation: Approved with minor suggestions for consideration. 📝 Minor Items to Consider
|
Code Review for PR #1776: Add MIT SPDX HeadersThank you for this PR to add SPDX license headers across the codebase. I've reviewed the changes and have the following feedback: ✅ Strengths
🔍 Areas for Consideration1. Test Coverage ExclusionThe PR excludes test files from receiving headers. While this is a valid approach, consider whether test files should also include license headers for completeness, especially since they're part of the distributed gem/package. 2. Year Range FormatThe headers use "2015–2025" with an en-dash (–). Ensure this is intentional and consistent with your legal requirements. Some projects prefer "2015-2025" with a hyphen for better ASCII compatibility. 3. ESLint Configuration Type SafetyIn 'license-header': licenseHeader as ESLint.Plugin, This type assertion might mask type incompatibilities. Consider verifying if the plugin provides proper TypeScript types. 4. Generator TemplatesThe headers are added to generator template files (e.g., 🐛 Potential Issues1. RuboCop Include PatternThe RuboCop configuration only includes specific paths: Include:
- 'app/helpers/react_on_rails_helper.rb'
- 'lib/generators/react_on_rails/**/*.rb'
- 'lib/react_on_rails/**/*.rb' This misses 2. Missing FilesSome Ruby files in
🔒 Security ConsiderationsNo security issues identified. The changes are documentation-only and don't affect runtime behavior. 🚀 Performance ConsiderationsThe license header linting will add minimal overhead to the development process. The headers themselves have no runtime impact. 📋 Recommendations
✅ Overall AssessmentThis is a well-executed PR that improves license clarity and compliance. The implementation is consistent and properly configured for ongoing maintenance. With the minor adjustments suggested above, particularly around the RuboCop include patterns and generator template considerations, this will be a solid addition to the codebase. The changes are ready to merge after addressing the RuboCop include pattern issue. |
Code Review for PR #1776: Add MIT SPDX Headers✅ Overall AssessmentThis PR successfully adds MIT SPDX license headers to core Ruby and JavaScript/TypeScript source files. The implementation is clean, consistent, and follows best practices for license attribution. 🎯 Code Quality & Best PracticesStrengths:
Configuration Changes:
🔍 Potential Issues
⚡ Performance Considerations
🔒 Security Concerns
🧪 Test Coverage Recommendations
📝 Suggestions for Improvement
✨ Minor Enhancements
✅ ConclusionThis PR is well-executed and ready for merge. The implementation is thorough, consistent, and follows licensing best practices. The addition of automated linting rules ensures future compliance. Recommendation: APPROVE ✅ The changes properly establish license attribution without affecting functionality. All core source files now have appropriate MIT SPDX headers with enforcement through linting configuration. |
Code Review for PR #1776: Add MIT SPDX HeadersThank you for adding standardized SPDX license headers to the codebase. This is an important step for license compliance and clarity. Here's my detailed review: ✅ Strengths
🔍 Observations & Recommendations1. Code Quality
2. Linting Configuration
3. Minor Suggestions
|
Code Review for PR #1776: Add MIT SPDX HeadersSummaryThis PR systematically adds MIT SPDX license headers to core Ruby and JavaScript/TypeScript source files, which is a good practice for open-source projects. The implementation is clean and consistent. ✅ Strengths
🔍 Observations & Suggestions1. Incomplete Coverage in lib/react_on_rails/The PR appears to miss several Ruby files in the lib/react_on_rails/dev/ subdirectory:
Recommendation: Either add headers to these files or explicitly exclude them in .rubocop.yml if they're intentionally omitted. 2. RuboCop Configuration ScopeThe RuboCop configuration includes lib/react_on_rails/**/*.rb which should cover the dev/ subdirectory, but these files weren't modified. This could lead to RuboCop violations. 3. Year Range ConsiderationThe copyright notice uses "2015–2025". Consider if this accurately reflects the project's history and whether a dynamic year update mechanism might be beneficial for long-term maintenance. 4. Template FilesGood decision to include headers in generator templates - this ensures generated code also includes proper licensing. 🔒 SecurityNo security concerns identified. The changes are purely documentation/licensing related. ⚡ PerformanceNo performance impact - these are compile-time/parse-time comments only. 🧪 Testing Recommendations
📝 DocumentationConsider updating the CONTRIBUTING.md or developer documentation to mention the requirement for SPDX headers in new files. ConclusionThis is a well-executed licensing update that improves the project's compliance and clarity. The main issue to address is ensuring complete coverage of all intended files, particularly in the lib/react_on_rails/dev/ subdirectory. Once that's resolved, this PR should be ready to merge. Reviewed with Claude Code |
Code ReviewThank you for adding SPDX license headers to the React on Rails codebase! This is a great step towards better license compliance and clarity. Here's my comprehensive review: ✅ Strengths
🔍 Observations & Suggestions
🎯 Potential Improvements
✅ Testing Recommendations
🔒 Security & Performance
ConclusionThis is a well-executed change that improves license clarity and compliance. The implementation is thorough and includes proper tooling to maintain these headers going forward. Approved with minor suggestions above. Great work on maintaining code quality while adding necessary legal headers! 🎉 |
Code Review for PR #1776: Add MIT SPDX HeadersSummaryThis PR systematically adds MIT SPDX license headers to all core source files in both Ruby (lib/) and JavaScript/TypeScript (node_package/src/) parts of the codebase. The implementation is thorough and well-structured. ✅ Strengths
📝 Observations & Suggestions
✅ No Security IssuesNo security concerns identified. License headers are purely documentation. ✅ No Performance ImpactThese are comment-only changes with no runtime impact. ✅ No Breaking ChangesThese changes are non-functional and won't affect any consumers of the library. 🎯 RecommendationAPPROVED - This PR is ready to merge. The implementation is clean, comprehensive, and follows best practices for adding license headers. The automated linting rules ensure ongoing compliance. The only minor consideration is verifying the copyright year range is as intended. Great work on the systematic approach and automation! 👍 |
Code Review✅ Strengths
📋 Observations & Suggestions
|
Code Review: Add MIT SPDX headers to Core (Ruby and JS/TS)Thank you for this PR to standardize license headers across the codebase. I have reviewed the changes and here is my feedback: ✅ Strengths
📋 Observations & SuggestionsCode Quality
Minor Considerations
🔒 SecurityNo security concerns identified. The changes are purely documentation/licensing related. 🚀 PerformanceNo performance impact - these are comment-only changes. 🧪 Test CoverageNo test changes needed as this is a documentation-only change. The PR correctly marks test-related checkboxes as N/A. ✅ Overall AssessmentThis is a well-executed PR that achieves its goal of adding standardized MIT SPDX headers across the codebase. The implementation is thorough and includes proper tooling to maintain consistency going forward. Recommendation: Ready to merge after considering the minor points about template files. Great work on the systematic approach and attention to detail! 👍 |
Code Review for PR #1776: Add MIT SPDX HeadersOverall AssessmentThis PR correctly adds MIT SPDX license headers to the React on Rails core source files. The implementation is clean and follows best practices for license header management. ✅ Strengths
🔍 Areas for Consideration
🎯 Recommendations
✅ Security & Performance
ConclusionThis is a well-executed PR that properly adds license headers across the codebase. The implementation is thorough and follows established patterns for both Ruby and TypeScript ecosystems. Approved with minor suggestions above. |
Code Review for PR #1776: Add MIT SPDX Headers to CoreThank you for this contribution! I've completed a thorough review of this PR that adds MIT SPDX license headers to the React on Rails core codebase. ✅ Strengths
📝 Observations & Suggestions
✅ Security, Performance & Testing
🎯 RecommendationAPPROVED ✅ - This PR is ready to merge. It properly implements SPDX license headers across the core codebase with appropriate tooling to maintain consistency going forward. The implementation follows best practices for license header management and includes proper automation to prevent regression. The year range (2015–2025) appropriately reflects the project's history and current maintenance. Great work on this important compliance and documentation improvement! 🚀 |
Code Review for PR #1776: Add MIT SPDX HeadersOverall AssessmentThis PR successfully adds standardized MIT SPDX license headers to the core Ruby and JavaScript/TypeScript source files. The implementation is clean and consistent across the codebase. ✅ Strengths
📝 Observations & RecommendationsCode Quality
Potential Considerations
Minor Suggestions
✅ Security & Performance
✅ Best Practices
ConclusionThis is a well-executed PR that adds proper licensing headers throughout the codebase. The implementation is thorough and follows best practices. LGTM! 👍 The changes will help with license compliance and clarity, which is especially important for an open-source project. |
Prevents feedback loop where Claude Code Review comments trigger the interactive Claude workflow, causing spam comments. The interactive workflow should only trigger on human @claude mentions, not bot comments. Fixes workflow spam issue seen in PR #1776. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Prevents feedback loop where Claude Code Review comments trigger the interactive Claude workflow, causing spam comments. The interactive workflow should only trigger on human @claude mentions, not bot comments. Fixes workflow spam issue seen in PR #1776. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Adds MIT SPDX headers to Core source files.
Ruby:
lib/**
,app/helpers/react_on_rails_helper.rb
(preserves shebangs and frozen string literal).JS/TS:
node_package/src/**
(preserves shebangs).Excludes
node_modules/
, build output, and test fixtures.Pull Request checklist
Add/update test to cover these changesUpdate documentationUpdate CHANGELOG fileThis change is
Summary by CodeRabbit
Documentation
Chores
Style