chore: remove unused component registrations and slot-scope variables - #906
Conversation
Nine components were imported and registered but never used in their templates, and three b-modal footer slots destructured scope variables they never read; drop them all to clear the eslint no-unused-components / no-unused-vars errors.
|
The CircleCI build failed at "Run main Playwright tests" with a timeout - PHPUnit and Jest passed, and the Playwright step produced no failing test, it just went quiet until the step's I do not think this change can be the cause: all nine removals are local One thing you may want to look at separately: |
|
Small correction to my last comment: the rebase did not actually retrigger CircleCI - build 5801 is still the only one for this PR, so the red check is the original timeout rather than a fresh failure. It will need a re-run from your side whenever you get to it. |
There was a problem hiding this comment.
Thanks for this — careful work, and easy to merge.
(AI-assisted review by Claude, run at a maintainer's request and posted with their supervision. Checks described below so they can be repeated.)
The nine removed registrations are all genuinely unused. Each checked against its own pre-removal file for PascalCase, kebab-case and dynamic <component :is> — no hits in any of the nine. That includes InfiniteLoading in GroupEventScrollTable.vue, where an accidental removal would have broken a live infinite scroll; it is import-and-register only.
The slot-scope changes are correct and complete. ok is unreferenced in all three footers, and exactly three slot-scope="{ ok, cancel }" blocks exist in resources/js. Dropping the binding entirely in EventAddVolunteerModal, rather than keeping { cancel }, is right — neither binding is used there.
One thing your description undersells. GroupVolunteers.vue had:
import Group from '../mixins/group'
components: {Group, CollapsibleSection, GroupVolunteer},A mixin imported and registered as a component — an actual bug, not just an unused reference. The same mixin is already applied correctly via mixins: [group] two lines below. Worth a line in the description, as it is more than lint tidying.
This is good to merge as it stands. If you would like to take more on, either of these would be welcome — as a separate PR, or added here, whichever you prefer.
1. Drop the now-unused dependency. This removed the only import of vue-infinite-loading, so it survives only in package.json. A one-line removal plus a lockfile update.
2. Add a lint step for the Laravel-side JS — the more valuable one. vue/no-unused-components is already enabled through flat/vue2-essential in eslint.config.js, but nothing runs eslint in CI for resources/js, so these errors only appear locally and nothing stops them returning. .circleci/config.yml already lints the Nuxt client (cd client && npm run lint) and that step is the pattern to copy.
Fair warning on the second: a first run across resources/js will almost certainly surface more than the nine here, so it may want to be "fix the rest, then add the gate" rather than one commit. Entirely reasonable to stop at this PR and leave that to us — say the word either way.
Happy to see it go in.
|
Thank you - and you are right about On CI: the re-run (build 5804) stopped in the same place as the first one - "Run main Playwright tests" went quiet and the step's On the follow-ups: I would be glad to do both.
|
|
Thanks for your patience on this — the CI failure isn't yours. Forked pull requests don't get CircleCI's project environment variables, so The giveaway is in the logs: a Your diff can't be involved: none of the eleven changed components is reachable from the group-create page, and all nine removed registrations are genuinely unused (I rechecked kebab-case template usage as well as PascalCase). #908 fixes it with a stub geocoder that CI uses only when it has no key. Once that's merged, this branch will need |
|
That explains it — thanks for chasing it down, and the masked-strings tell is a nice catch. I'll keep an eye on #908 and merge The two follow-ups still stand whenever you want them. I'll hold off writing the lint one until you've said which shape you'd prefer. |
CircleCI does not pass project environment variables to jobs built from forked pull requests, so GOOGLE_API_CONSOLE_KEY is empty on those runs. Every geocode then returns false, group creation 422s on groups.geocode_failed, and the Playwright suite fails at its first createGroup() - so all 50 tests fail and the job times out, looking exactly like the contributor having broken something. That is what is happening on TheRestartProject#906, whose diff removes eleven unused component registrations and cannot affect group creation at all: none of the changed components is reachable from the create page. Adds a StubGeocoder answering from a fixed table, used only when GEOCODER_STUB is set, which CI sets only when it has no key. It keeps the ForceGeocodeFailure sentinel failing, and falls back to London for an unlisted place so a new test fails on what it is testing rather than on the stub. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
No, I'm not. I should be straight about how this works. I think of it as charity coding. I have a machine good enough to run a local model (Qwen3 27B), so I run overnight loops across a bunch of repos doing work I think is worth supporting. It doesn't write new features. It looks for hygiene: dead code, unused imports, comments that no longer match the code, small inconsistencies. That gives me a list, and then I spend leftover Claude tokens that would otherwise expire on checking the list, because Qwen is the weaker model and gets things wrong. What survives that becomes a PR. So it's found by a free local model and verified with spare quota from a better one. The compute is really the thing I'm contributing, and I'd rather it went somewhere useful than nowhere. I try to keep each PR small enough to be quick to review, and if this isn't the kind of help you want here, just say and I'll stop sending them. |
|
No that's fine. I appreciate the explanation and the donated compute. It's good to know where contributions are coming from, so as some feedback I'd suggest putting that explanation in the initial PR comment in future (well, not for us now, as we now know, but if you do it on other projects). I also appreciate the intention to keep PRs small and self-contained and quick to review. |
|
@marekl11 I do something similar elsewhere. You'd be welcome to burn some tokens on http://github.com/Freegle/Iznik too :-). |
|
The remaining red check here is ours, not yours: #910 fixes the test. Once it's merged I'll merge (AI-assisted triage by Claude, posted with maintainer supervision.) |
CI writes GEOCODER_STUB=true into .env when it has no geocoding key, which is every forked PR. The test asserted the live config was false, so it failed on exactly the runs the stub exists for (TheRestartProject#906 build 5844). Check the config file's default with the variable cleared instead, and add the converse so the default check can't pass vacuously. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
|
@edwh Tests are passing - all good for me to merge this in to develop? |
|
Thanks both, and thanks for the feedback. Good point about putting the explanation up front, I'll do that on future PRs. Thanks for the Iznik invite too, I'll take a look. |
|
@edwh Thank you for the invite! I'll definitely support Iznik. It looks really cool, and it warms my heart :D |



Clearing the eslint no-unused-components and no-unused-vars errors in
resources/js/components:
components:but never usedin their own template - ExternalLink (three files), FileUploader,
EventDeviceSummary, DashboardEvent, DeviceModel, InfiniteLoading and
Group
{ ok, cancel }and thennever read
okOne of the nine is worth calling out separately: in
GroupVolunteers.vuethe
groupmixin was imported a second time asGroupand listed incomponents:, so a mixin was registered as a component. The mixin isalready applied properly via
mixins: [group]on the next line, so theregistration was doing nothing - but it is a mistake rather than just an
unused reference.
I checked each removed registration for both PascalCase and kebab-case use
in its own file before dropping it. No template markup changes.