sidebar-menu-arch

Audit AppShellV2 sidebar navigation against the ADR 0180 v3 contract.

Updated May 14, 2024
One-click install
npx skills add https://github.com/wagnerra23/oimpresso.com --skill sidebar-menu-arch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sidebar-menu-arch
Source: https://github.com/wagnerra23/oimpresso.com/tree/main/.claude/skills/sidebar-menu-arch
Command: npx skills add https://github.com/wagnerra23/oimpresso.com --skill sidebar-menu-arch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you recognize, audit, and correctly modify the AppShellV2 sidebar architecture so that navigation stays consistent across modules, groups, permissions, and the frontend grouping contract.

Core Features & Use Cases

  • Single-link sidebar items (v3 / ADR 0180): Ensure each module publishes exactly one sidebar destination via DataController::items() using href, not dropdown popups.
  • Visual grouping via the frontend contract: Map module labels into canonical UI groups through SIDEBAR_GROUPS (and icons via MENU_ICON_MAP), so items land in the correct accordion group.
  • Contextual sub-navigation via PageHeader ghosts (Zona C): Move “sub-items” into ghosts that become header tabs for the destination page, avoiding duplicated navigation patterns.
  • Use cases: Add a new module entry to the sidebar, move an item between visual groups, debug why a module doesn’t appear, or audit ordering/permissions when an item is missing or falls back incorrectly.

Quick Start

Ask your AI to “Audit the sidebar for module X: verify its DataController::items() label matches SIDEBAR_GROUPS, confirm the sidebar uses href single-link with ghosts tabs (no popup dropdown), and list exactly which backend and frontend files must be updated.”

Frequently Asked Questions about sidebar-menu-arch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new module to the AppShellV2 sidebar in Laravel using Inertia?

To add a new module to the AppShellV2 sidebar, implement a backend `items(businessId)` method in your DataController publishing a single-link `href`, then update the frontend `Sidebar.tsx` lookups to map the module label to the correct `SIDEBAR_GROUPS` and `MENU_ICON_MAP`.

Why is my ERP module navigation item missing or falling back incorrectly in the sidebar?

A sidebar navigation item might be missing due to permission or installation guard failures, or a mismatch between the backend label and the frontend `SIDEBAR_GROUPS` contract. Auditing the ADR 0180 v3 contract implementation and checking label/icon mappings will resolve the issue.

How does the ADR 0180 v3 contract handle sidebar dropdown menus and sub-items?

The ADR 0180 v3 contract replaces dropdown popups with single-link `href` destinations for sidebar items. Contextual sub-navigation is handled via `ghosts` that render as PageHeader tabs, avoiding duplicated navigation patterns in the UI.

How do I move a sidebar item between visual accordion groups in an Inertia frontend?

To move a sidebar item between visual accordion groups, update the canonical UI group mapping in the frontend `SIDEBAR_GROUPS` lookup so the module label aligns with the desired group, ensuring the backend `DataController::items()` label matches.

What files need to be updated to audit sidebar architecture for Laravel ERP modules?

Auditing sidebar architecture requires checking the backend `DataController::items()` implementation for single-link `href` and `ghosts`, alongside frontend updates to `Sidebar.tsx` for accurate icon mapping and group placement according to the ADR 0180 contract.

Does the AppShellV2 sidebar support dropdown navigation for ERP modules?

No, the AppShellV2 sidebar uses a single-link `href` implementation according to the ADR 0180 v3 contract. It avoids dropdown popups entirely, relying on `ghosts` for contextual sub-navigation tabs on the destination page header.