Architecture: How to replace the hardcoded admin sidebar with dynamic navi...

Documentation for Sessions

🏗️ Architecture: How to replace the hardcoded admin sidebar with dynamic navi...

Date: 2026-02-11
Time: 04:47:05 UTC
Session: gspace1-105.3
Agent: angular
Confidence: 90%
Status: ✅ Documented


📋 Decision Context

Question:

How to replace the hardcoded admin sidebar with dynamic navigation?

Task: Session 105: Admin/Dev Apps Overhaul - Dynamic Navigation


🎯 Decision Made

Chosen:

Hybrid approach: define static admin nav groups in AdminMainShellComponent (since admin routes are fixed) + read dynamic module nav from AppConfigService.navigationConfig() signal. Support both static and dynamic groups in the same sidebar.

Options Considered:

  1. Use existing SidebarComponent as-is (fully dynamic)
  2. Hybrid: static admin groups + dynamic module groups
  3. Keep hardcoded but add more items

💭 Reasoning

A fully working dynamic SidebarComponent (450 lines) existed at core/layout/sidebar.component.ts but was unused. The admin shell had a 30-line hardcoded sidebar with wrong port. However, admin routes are not dynamic module routes - they're fixed platform routes. Pure AppConfigService-driven nav would miss admin-specific routes since those aren't registered as module manifests. The hybrid approach preserves admin nav while allowing module routes to appear dynamically.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation