stimulusreflex/stimulus_reflex
55.5
Adequate · 6 November 2026
2.8k
lines of production code
Ruby
with JavaScript
4
measurements over time
What this system is
Features
New StimulusReflex 3.5 installer task
A new \rails stimulus\_reflex:install\ task has been added to automate the setup of StimulusReflex and CableReady. This installer supports multiple JavaScript build tools including Webpacker, Shakapacker, esbuild, Vite, and Importmaps, and handles configuration for Action Cable, initializers, and example reflexes. It also provides a \restart\ subtask to reset the installation state and allows for granular control over installation steps.
lib/tasks · high confidence
New broadcaster implementations for page, selector, and no-op morphs
StimulusReflex now includes dedicated broadcaster classes for handling different morphing scopes: PageBroadcaster updates the entire page by re-rendering the controller response and matching selectors, SelectorBroadcaster handles granular DOM updates by morphing or replacing specific elements based on configuration, and NothingBroadcaster dispatches a 'morph-nothing' event for no-op scenarios. These components also introduce an Update helper that supports ActiveRecord integration for rendering collections and resolving DOM IDs, enabling more flexible and efficient partial page updates.
_lib/stimulus\reflex/broadcasters · high confidence
New generator for creating StimulusReflex components
A new \StimulusReflexGenerator\ has been added to allow users to scaffold Reflex and Stimulus controller files via the command line. The generator accepts a name and optional actions, and supports \--skip-reflex\ and \--skip-stimulus\ flags to control which files are generated. When generating an 'example' component, it also creates a sample controller, view, and route, and automatically manages the \fireworks-js\ importmap pinning.
_lib/generators/stimulus\reflex · high confidence
Architecture
Project scaffolding and build tooling overhaul
The repository has been restructured to support a dual Ruby/JavaScript codebase. Node.js version is pinned to 20.5.1 and Ruby to 3.3.6 via dedicated version files. JavaScript is now bundled using Rollup (configured in rollup.config.mjs) to produce UMD and ES modules for both npm distribution and the Rails asset pipeline, with a new web-test-runner configuration for browser tests. Development standards are enforced via Standard for Ruby and Prettier-Standard for JavaScript, with corresponding ignore files and a Rakefile that runs both Ruby and JavaScript test suites.
(repo-wide) · high confidence
Behavioural changes
33 commits (4 fixes) modifying stimulus\_reflex
A change to existing behaviour in stimulus\_reflex — 33 commits (4 fixs), 4 files: “Also add \rc\ as a suffix for versions comparison (\#650)”; “throw :forbidden (\#588)”; “fix: Deep merge url\_params in ReflexData (\#647)”; and 30 more (refs \#650, \#588, \#647, \#448, \#688, …).
_stimulus\reflex · medium confidence · unverified
Cleanup of legacy asset files
The legacy \stimulus\_reflex.js\ file has been removed from the vendor assets directory, and a placeholder \.keep\ file has been added to the \dist\ directory to maintain the folder structure.
app/assets, dist · low confidence
Installer now uses Redis for Action Cable and caching in development
The installation process in lib/install now automatically configures Action Cable to use the Redis adapter in development environments and switches the cache store to Redis if it was previously set to memory. It also recommends or installs the redis-session-store gem for session storage, ensuring that the development environment is properly set up to support real-time features without requiring manual configuration.
lib/install · high confidence
New utility modules for logging, sanity checks, and attribute building
StimulusReflex introduces a new \lib/stimulus\_reflex/utils\ directory containing four new modules: \AttributeBuilder\ for constructing data attributes, \Colorize\ for terminal output styling, \Logger\ for structured server-side logging per reflex action, and \SanityChecker\ for validating environment setup (such as caching and URL options) at startup. These utilities replace previous inline implementations, providing a cleaner, more maintainable structure for core framework operations.
_lib/stimulus\reflex/utils · high confidence
StimulusReflex 3.5.5 release with new callback system and configuration options
This update upgrades the gem to version 3.5.5 and introduces a comprehensive callback system (\before\_reflex\, \after\_reflex\, \around\_reflex\) with support for skipping and prepending callbacks. It adds a new \StimulusReflex::Configuration\ class allowing users to customize behavior such as \precompile\_assets\, \parent\_channel\, and \on\_failed\_sanity\_checks\. The release also includes a new \StimulusReflex::Installer\ for improved setup experience, a \StimulusReflex::Dataset\ class for handling DOM attributes, and a \VersionChecker\ module that detects and reports gem/JS version mismatches. Additionally, it introduces a \CableReadyChannels\ proxy for reflex broadcasting and a \ConcernEnhancer\ to improve method resolution for Reflex classes.
_lib/stimulus\reflex · high confidence
StimulusReflex JavaScript client is completely refactored into a modular architecture
The StimulusReflex JavaScript client has been rewritten from a single monolithic file into a modular structure with separate files for core logic (stimulus\_reflex.js, reflex.js), lifecycle management (lifecycle.js, callbacks.js), DOM scanning (scanner.js), and transport (transports/action\_cable.js). This refactoring introduces a new Reflex class to encapsulate state, a dedicated lifecycle system with stages like 'before', 'success', 'error', and 'finalize', and a new scanner that automatically wires up declarative data-reflex attributes. The client now supports a configurable schema for data attributes, explicit controller registration, and improved version mismatch detection between the gem and the JavaScript package. Additionally, it includes new features like data-reflex-dataset for extracting attributes from related DOM elements, isolation mode for tab-specific reflexes, and better handling of form serialization and piggybacked CableReady operations.
javascript · high confidence
StimulusReflex channel moved to app/channels and made configurable
The core ActionCable channel implementation has been relocated from the gem's internal directory to app/channels/stimulus\_reflex/channel.rb, allowing developers to subclass and customize the channel behavior directly. The new class inherits from a configurable parent channel (defaulting to ApplicationCable::Channel), enabling integration with existing authentication or connection logic. The channel now handles reflex invocation via a dedicated ReflexFactory and ReflexMethodInvocationPolicy, manages session commits, and provides detailed error logging for issues like missing routes or HTTP basic auth failures.
app/channels · high confidence
StimulusReflex library initialization and component loading
The main library entry point now explicitly requires and loads the core components of the StimulusReflex gem, including HTML document handling (Nokogiri), CableReady integration, configuration, callbacks, various broadcasters (page, selector, nothing), and utility classes. This ensures that all necessary modules are available when the gem is loaded, replacing the previous empty module structure with a comprehensive setup of internal dependencies.
lib · high confidence
Support for HTML5 fragment parsing via Nokogiri
The library now uses Nokogiri's HTML5 inference engine to parse HTML fragments, enabling proper handling of incomplete HTML5 structures. This change introduces a new DocumentFragment class that delegates to Nokogiri::HTML5::Inference, ensuring that partial HTML inputs are processed correctly without requiring full document wrappers.
_lib/stimulus\reflex/html · high confidence
Update bin scripts and console configuration
The bin directory now includes new helper scripts: \loc\ for counting lines of code, \rake\ as a Bundler-generated binstub, and \standardize\ to run linting and formatting tools. The \bin/console\ script has been updated to initialize StimulusReflex with a parent channel configuration, replacing the previous IRB-based setup that relied on pry.
bin · high confidence
Updated JavaScript generator templates for StimulusReflex 3.5
The JavaScript templates used by the StimulusReflex installer have been updated to support StimulusReflex 3.5 and modernize the setup for various bundlers. The new templates provide distinct entry points for Action Cable consumers and controller registration tailored to esbuild, Importmaps, Shakapacker, Vite, and Webpacker. Key behavioral changes include the introduction of an \isolate: true\ option in the StimulusReflex initialization configuration and the adoption of \@hotwired/stimulus\ as the base controller framework, replacing previous inheritance patterns.
_lib/generators/stimulus\reflex/templates/app/javascript · high confidence
Updated StimulusReflex 3.5 installer templates
The installer templates for StimulusReflex have been updated to version 3.5. This includes a new example controller and a comprehensive demo view that showcases CableReady features like stream subscriptions and updatable content, along with a new esbuild configuration script that supports build, watch, and live-reload modes for JavaScript assets.
_lib/generators/stimulus\_reflex/templates, lib/generators/stimulus\_reflex/templates/app/controllers, lib/generators/stimulus\reflex/templates/app/views · high confidence
Updated StimulusReflex and CableReady initializer templates with new configuration options
The generated initializer templates for StimulusReflex and CableReady have been updated to expose additional configuration options for users. The StimulusReflex template now includes commented-out settings for handling missing default URLs, customizing server-side logging formats, enabling Rack middleware support for page morphs, and overriding parent channels. The CableReady template adds options to configure the default debounce time for updatable callbacks, set a custom broadcast job queue, and define custom operations.
_lib/generators/stimulus\reflex/templates/config · high confidence
Updated StimulusReflex generator templates for version 3.5
The generator templates for new and base Reflex classes have been updated to align with StimulusReflex 3.5. The generated reflex template now includes documentation comments for the \tab\_id\ accessor and provides a concrete \Example\ implementation demonstrating session-based counting, CableReady broadcasting, and event dispatching. The \ApplicationReflex\ base class template has been refreshed to reflect the new inheritance structure (\StimulusReflex::Reflex\) and includes updated guidance on internationalization, current user delegation, and view helper access.
_lib/generators/stimulus\reflex/templates/app/reflexes · high confidence
Test coverage
Added comprehensive test suite for JavaScript client utilities; Added test coverage for StimulusReflex broadcasters; Added tests for HTML document and fragment parsing; Added tests for the StimulusReflex generator; Initial test suite for StimulusReflex core components.
Dependencies
StimulusReflex 3.5.5 dependency and manifest overhaul
The gem and its JavaScript package have been updated to version 3.5.5, introducing a comprehensive dependency upgrade and restructuring. The Ruby gem now requires Ruby 3.0+ and Rails 5.2+, explicitly adding dependencies on \actionpack\, \actionview\, \activesupport\, and \railties\ alongside \cable\_ready \~\> 5.0\, \nokogiri \~\> 1.0\, \nokogiri-html5-inference \~\> 0.3\, \rack \>= 2, \< 4\, \redis \>= 4.0, \< 6.0\, and \ostruct \~\> 0.6\. The JavaScript package.json now lists \@hotwired/stimulus ^3\, \@rails/actioncable ^6 \|\| ^7 \|\| ^8\, and \cable\_ready ^5.0.6\ as dependencies, with \rollup ^4.22.4\ and \vitepress ^1.0.0-beta.1\ as dev dependencies. The gemspec also adds a post-install message guiding users to run the installation rake task.
(dependencies) · high confidence
Housekeeping
Added USAGE documentation for the StimulusReflex generator
A new USAGE file has been added to the lib/generators directory, providing users with clear instructions on how to use the \rails generate stimulus\_reflex\ command. The documentation explains that the generator creates boilerplate files for controllers and reflexes without overwriting existing ones, and includes a link to the setup guide for getting started with StimulusReflex.
lib/generators · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 49 → 56 (+6.6)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 48 → 48 (-0.0)
- Architecture 90 → 90 (+0.0)
- Maturity 41 → 65 (+24.1)
- Readiness 50 → 50 (+0.0)
- Security 74 → 83 (+8.4)
Resolved (28)
- Ambiguous naming for method identification. reflex_name and method_name are distinct, but in the context of StimulusReflex, a 'reflex' is the class and the 'method' is the action. It is clear, but reflex_name might be confused with the class name vs the instance name. However, looking at Reflex.reflex_id(), there is a potential overlap or confusion with ReflexData.reflex_name(). Reflex.reflex_id() likely returns a unique identifier for the invocation, while ReflexData.reflex_name() returns the name of the reflex class. This is distinct. However, ReflexData.method_name() and Reflex.process(name, args) suggest that name is the method name. This is consistent.
- Critical CVE: [GHSA redacted] (yarn.lock)
- Critical CVE: [GHSA redacted] (yarn.lock)
- Critical vulnerability: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (yarn.lock)
- Inconsistent naming convention for configuration access. 'configure' implies a setter or builder pattern, while 'configuration' implies a getter. However, without seeing the implementation, it is ambiguous if 'configuration' returns the config object or if there is a separate 'config' getter. In many Ruby libraries, config is the standard getter. If configuration is the getter, it deviates from the common config shorthand, but more importantly, if configure is a setter, the lack of a clear config or configuration getter name consistency with other parts of the API (like StimulusReflexGenerator.execute) suggests a potential naming drift. However, the most glaring issue is usually between config vs configuration. Here, we have configure (verb) and configuration (noun). This is acceptable but slightly verbose. A more significant potential inconsistency is if StimulusReflex.configuration is meant to be the standard accessor, it should likely be config for brevity, or configure should be config=. But the real issue is often found in the Broadcaster types.
- Low CVE: [GHSA redacted] (yarn.lock)
- Medium CVE: [GHSA redacted] (yarn.lock)
- Medium CVE: [GHSA redacted] (yarn.lock)
- …and 8 more
New (3)
- Coverage not measured — JavaScript/TypeScript suite
- Low CVE: [GHSA redacted] (yarn.lock)
- Medium: security finding (details withheld)
Changes since last survey
- 11 commits — 11 feature/other, 0 fixes
By area
- (root) — 9 commits
- javascript/test — 1 commit
- test/html — 1 commit
Notable commits
- change: Accept an escaped > in a serialized attribute value (#763)
- change: Bump brace-expansion from 1.1.16 to 1.1.21 (#762)
- change: Bump crass from 1.0.6 to 1.0.8 (#766)
- change: Bump handlebars from 4.7.9 to 4.7.10 (#761)
- change: Bump js-yaml from 3.15.0 to 3.15.2 (#759)
- change: Bump mail from 2.8.1 to 2.9.1 (#767)
- change: Bump nanoid from 3.3.8 to 3.3.20 (#758)
- change: Bump source-map-js from 1.0.2 to 1.2.2 (#760)
- change: Ignore Vitest browser mode attachments
- change: Migrate JavaScript tests to Vitest and bump Node.js versions in CI (#765)
- change: Test Ruby 3.4 and 4.0 in CI (#764)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
stimulusreflex/stimulus_reflex was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6bafb1d78ae399c6a05aef2b87486a32dad4ab75 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.