Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9156 +/- ##
=======================================
Coverage 99.11% 99.11%
=======================================
Files 139 140 +1
Lines 4071 4089 +18
=======================================
+ Hits 4035 4053 +18
Misses 36 36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
17 of 22 tasks
senid231
force-pushed
the
docs-javascript
branch
from
November 4, 2026 21:43
25fd1d6 to
b57f1b5
Compare
Active Admin pages render only ActiveAdmin.importmap and import only its active_admin entry point, so a module pinned in the host's importmap loads nothing. Themes and plugins copied _html_head to add their imports. Co-Authored-By: Clanker
The setting default is one shared array, so appending to it leaked into every later Application. Co-Authored-By: Clanker
Co-Authored-By: Clanker
senid231
force-pushed
the
docs-javascript
branch
from
November 12, 2026 11:55
b57f1b5 to
da7fb10
Compare
Importmap::Map#cache_sweeper(watches:) builds a new watcher on each call, so an engine that passed its own directory replaced ActiveAdmin's. The sweeper is now built once in after_initialize from this list, which engines and config/initializers can extend. Co-Authored-By: Clanker
A request made from an earlier after_initialize hook ran before the sweeper existed. The spec now edits an existing file instead of relying on a new one, and restores the boot-time sweeper. Co-Authored-By: Clanker
The sweeper reads the list once in after_initialize, so a directory added later, for example from to_prepare, was silently never watched. Co-Authored-By: Clanker
builder_method runs when the component class loads, and nothing references the class constant, so autoloading never loads it before the register blocks that use it. Co-Authored-By: Clanker
Rails runs to_prepare blocks on the reloader, so a bare root is undefined there, and appends to importmap_watches made after after_initialize never reach the sweeper. Co-Authored-By: Clanker
senid231
force-pushed
the
docs-javascript
branch
from
November 12, 2026 12:09
24978a7 to
15b92bd
Compare
A plain frozen array already rejects late appends. The setting's comment now says to append from an initializer. Co-Authored-By: Clanker
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents how to add JavaScript to Active Admin pages from an engine and how to load custom Arbre components.
Depends on #9148 and on #9153. This branch contains their commits; only the last two commits belong to this PR. I'll rebase it after they merge.
importmap_watches. It notes that Propshaft serves an engine'svendor/javascriptonly if the engine adds it to the asset paths.config.importmap_watchesfor modules that the host app pins, and says to append to it from an initializer because a later append raises.builder_methodmust load before the register blocks that use it. It recommends eager-loading the component directory inconfig.to_prepare, and requiring files underlib/from the same block.Part of #9147.