feat: surface per-module load errors in Settings → Modules#9
Open
Teamingzooper wants to merge 1 commit into
Open
feat: surface per-module load errors in Settings → Modules#9Teamingzooper wants to merge 1 commit into
Teamingzooper wants to merge 1 commit into
Conversation
Previously, malformed module manifests were logged at warn level and silently skipped — users would just see modules missing from their list with no signal about why. Now ModuleRegistryService captures the load error for each rejected module directory and the renderer shows a per-row panel above the module list. For Zod validation failures (the common case — typo in a manifest field), each issue is listed with its path. For JSON parse errors the parser's message is shown. For everything else the error's .message is shown. The errors panel is only rendered when there are errors, so the UI stays clean for users with no broken modules. Clicking "Reload modules" re-runs the scan and refreshes both the modules list AND the errors list, so users fix-and-reload until the panel is empty. Scope deliberately narrow: this is the highest-value piece of the "module devtools" request. Hot-reload via file watcher and a standalone "validate manifest" picker are valuable but not as impactful as making existing errors visible — both deferred to v2. 178/178 unit tests pass, typecheck + build clean.
This was referenced May 16, 2026
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
When a directory under `modules/` or `~/.nexus/modules/` can't be loaded as a module (usually a malformed `nexus-module.json`), Nexus previously just logged a warning and silently skipped it. Users would notice "Hey, my custom module isn't showing up" with no signal about why.
This PR surfaces those load errors directly in Settings → Modules, with the validation issue paths spelled out where possible.
What's shown
For each rejected module directory:
The panel only renders when there are errors, so the UI stays clean for users with no broken modules. Clicking the existing Reload modules button re-runs the scan and refreshes both the working modules list AND the errors list — fix-and-reload loop converges on an empty panel.
Scope (deliberately narrow)
The original ask included three "module devtools" capabilities:
Implementation
Test plan
🤖 Generated with Claude Code