Summary
@simple-module-py/ui/components/NavIcon.tsx ships a hardcoded Record<string, React.ReactNode> with about 10 SVG icons (home, package, users, user, settings, shield, activity, files, layers, shield-check, log-out). When a module's register_menu_items declares an icon outside this set, NavIcon falls through to <span className="w-5 h-5" /> and the sidebar shows an empty placeholder where the icon should be.
Repro
The framework's own modules already request icons that don't exist in the map:
feature_flags/constants.py:24 → MENU_ICON = "flag" → no glyph
bell (commonly used by notification modules) → no glyph
bar-chart-3 (commonly used by report modules) → no glyph
App-level modules can't add new icons without forking NavIcon.tsx.
Expected
Either:
- The map covers a broader set of common lucide-react icon names, or
NavIcon defers to lucide-react when the name isn't in the local map (icons-by-name lookup), or
- There's a documented host-level extension point for registering additional icons.
Workaround
In a downstream app I added a Vite resolve plugin that intercepts both the bare specifier @simple-module-py/ui/components/NavIcon and the relative ../components/NavIcon (the form SidebarLayout.tsx uses internally) to redirect to a local NavIcon.tsx with extra icons. `resolve.alias` on the bare specifier alone wasn't enough because SidebarLayout reaches for the relative path.
Acceptance
- Built-in modules render with visible icons in the sidebar without app-level patching.
- App-level modules can declare arbitrary lucide names without falling through to the empty placeholder.
Summary
@simple-module-py/ui/components/NavIcon.tsxships a hardcodedRecord<string, React.ReactNode>with about 10 SVG icons (home,package,users,user,settings,shield,activity,files,layers,shield-check,log-out). When a module'sregister_menu_itemsdeclares an icon outside this set,NavIconfalls through to<span className="w-5 h-5" />and the sidebar shows an empty placeholder where the icon should be.Repro
The framework's own modules already request icons that don't exist in the map:
feature_flags/constants.py:24→MENU_ICON = "flag"→ no glyphbell(commonly used by notification modules) → no glyphbar-chart-3(commonly used by report modules) → no glyphApp-level modules can't add new icons without forking
NavIcon.tsx.Expected
Either:
NavIcondefers to lucide-react when the name isn't in the local map (icons-by-name lookup), orWorkaround
In a downstream app I added a Vite resolve plugin that intercepts both the bare specifier
@simple-module-py/ui/components/NavIconand the relative../components/NavIcon(the formSidebarLayout.tsxuses internally) to redirect to a localNavIcon.tsxwith extra icons. `resolve.alias` on the bare specifier alone wasn't enough becauseSidebarLayoutreaches for the relative path.Acceptance