Skip to content

fix(frontend): point the feature registry's glob at src/features - #456

Merged
polterguy merged 1 commit into
masterfrom
fix/frontend-feature-registry-glob
Nov 24, 2026
Merged

polterguy merged 1 commit into
masterfrom
fix/frontend-feature-registry-glob

Conversation

@EbubeEvan

@EbubeEvan EbubeEvan commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What this fixes

Since #454, the dashboard loads with an empty sidebar and every page shows a 404.

#454 moved registry.ts from src/app/ into src/app/lib/, but its import.meta.glob path stayed '../features/*/index.ts'. From the new folder, that points at src/app/features/, which doesn't exist. Vite doesn't treat a glob with no matches as an error, so the app registered no features at all.

Changes

  • frontend/src/app/lib/registry.ts: the glob is now '../../features/*/index.ts'.
  • frontend/src/app/test/registry.test.ts (new): checks that the registry finds a manifest for every folder in src/features/. It fails on the old path and passes on the fixed one.

Why the tests missed it

App and shared tests run against stand-in features, not the real registry. check:removable only removes features, so it never checked that any were found. The new test covers the real registry.

Verified

  • Format, lint, typecheck: pass
  • npm run test: 2,822 tests pass
  • vite build: passes

🤖 Generated with Claude Code

Checked

  • dotnet build magic.sln passes, which includes the analyzer rules, and dotnet test magic.sln passes
  • cd frontend && npm run build && npm run test passes, if the frontend changed
  • The README of the plugin is updated, if a slot, or the way one is used, changed
  • backend/files/config/appsettings.json is not part of the change

Moving registry.ts into app/lib/ left its glob one folder short, so it matched
nothing and the app started with no pages or navigation. Tests use stand-in
features, so none noticed; a new test checks every feature folder is found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EbubeEvan
EbubeEvan requested a review from polterguy as a code owner November 24, 2026 12:30
@sonarqubecloud

Copy link
Copy Markdown

@polterguy
polterguy merged commit 6726d1c into master Nov 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants