Remove stale importmap pin for nonexistent app/javascript/uploading.js#153
Merged
capotej merged 1 commit intoMay 23, 2026
Merged
Conversation
The pin `"app/javascript/uploading"` has been in config/importmap.rb since
the first commit, but the file `app/javascript/uploading.js` has never
existed in the repository. The Stimulus controller that actually powers
`data-controller="uploading"` on the post / page edit forms lives at
`app/javascript/controllers/uploading_controller.js` and is auto-registered
via the existing `pin_all_from "app/javascript/controllers"` line combined
with `eagerLoadControllersFrom("controllers", application)` in
`app/javascript/controllers/index.js`.
The result of the stray pin is a noisy warning on every page render that
loads the importmap:
Importmap skipped missing path: app/javascript/uploading.js
Removing the dead pin silences the warning. The upload controller continues
to load and function exactly as before (verified locally: post edit form
renders without warnings and Stimulus still attaches the uploading
controller to the markdown_body / markdown_excerpt textareas).
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
config/importmap.rbpins"app/javascript/uploading", but the fileapp/javascript/uploading.jshas never existed in this repository (the pin was added in the initial commit and has been an orphan ever since). The result is a noisy warning on every page render that loads the importmap, e.g. on the post / page edit forms:The Stimulus controller that actually powers
data-controller="uploading"on the markdown_excerpt / markdown_body textareas lives atapp/javascript/controllers/uploading_controller.jsand is auto-registered through the existing infrastructure:So the stray pin is dead weight — removing it silences the warning and changes nothing about upload behavior.
Why this is safe
git log --diff-filter=A --name-only -- app/javascript/uploading.jsreturns nothing onmain— the file has never existed.app/javascript/controllers/uploading_controller.jsis unaffected and continues to register asuploadingvia Stimulus' auto-loader.@rails/activestorageis still pinned (the line right above).Test plan
/blog/newand/p/aboutafter the change — noImportmap skippedlines inlog/development.log.form.textarea ..., data: { controller: "uploading" }) still attach the Stimulus controller — drag-and-drop / paste-upload behavior unchanged.Made with Cursor