Skip to content

Restore active-nav wash and match the profile to shadcn NavUser - #20

Merged
rqms40 merged 1 commit into
mainfrom
fm/gridgo-web-nav-profile
Aug 13, 2026
Merged

rqms40 merged 1 commit into
mainfrom
fm/gridgo-web-nav-profile

Conversation

@rqms40

@rqms40 rqms40 commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The captain called two chrome nits on the live portal:

  1. The selected rail item was yellow text on a blank row (data-active:bg-transparent). It must look selected: the same quiet sidebar-accent wash hover uses, plus yellow text. Not a yellow pill, not a yellow left bar, not a yellow fill of the whole row.
  2. The footer was a custom card with inline gear + logout icon buttons. It must match shadcn sidebar / UAGC NavUser: avatar + name + role + chevron, click opens a menu (identity header, then the items that exist, then Log out).

What changed

  • Active nav keeps --color-action-yellow text/icon and the default data-active:bg-sidebar-accent highlight. Hover on the active item stays yellow.
  • Footer is a SidebarMenu + DropdownMenu trigger. Collapsed rail is avatar-only and still opens the menu. Header has no second account control.
  • Menu items are only what GRIDGO actually has: Settings → /ops/settings or /admin/settings (omitted for suppliers), then Log out. No Billing / My Account / Notifications.
  • Every DropdownMenuLabel is wrapped in DropdownMenuGroup (Base UI MenuGroupContext).
  • AGENTS.md updated so the next session does not reintroduce data-active:bg-transparent or the gear card.

Verify

  • AppShell tests: active item is not data-active:bg-transparent; no left yellow bar; yellow text remains. Footer is a menu trigger (name + role + chevron). Opening it shows Log out; Settings for admin/ops, absent for supplier.
  • npm run typecheck, lint, test (176), build clean.
  • Browser-checked on a private preview (:3417): expanded + collapsed rail, ops QA/payments, admin overview, supplier jobs (no Settings). Active rows measured as yellow rgb(255, 222, 88) on accent rgb(240, 240, 240).

Summary by CodeRabbit

  • New Features

    • Added a collapsible account menu in the sidebar footer displaying the user’s initials, name, email, and role.
    • Added role-specific Settings navigation where applicable.
    • Added a Log out action to the account menu.
  • Style

    • Updated active navigation items to use the sidebar accent background while retaining yellow text and icons.
  • Tests

    • Updated coverage for account-menu behavior, role-based links, logout, and active navigation styling.

The captain rejected yellow text on a blank rail row, and the footer
gear-plus-logout card. Active items keep yellow labels on the default
sidebar-accent highlight. The footer is now a chevron trigger that
opens Settings (ops/admin only) and Log out.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b561633d-720d-440b-bb3c-bbd0a1a2a1ef

📥 Commits

Reviewing files that changed from the base of the PR and between 9249bd8 and 154f874.

📒 Files selected for processing (3)
  • AGENTS.md
  • src/components/shell/AppShell.tsx
  • src/components/shell/__tests__/AppShell.test.tsx

📝 Walkthrough

Walkthrough

The sidebar keeps the default active accent wash and applies yellow to active text and icons. The footer now uses a role-aware NavUser dropdown with account identity, conditional Settings access, and Log out.

Changes

Sidebar navigation and account chrome

Layer / File(s) Summary
Active navigation styling
AGENTS.md, src/components/shell/AppShell.tsx, src/components/shell/__tests__/AppShell.test.tsx
Active navigation retains the sidebar accent background. Tests reject the transparent variant and verify yellow text.
Role-aware account dropdown
AGENTS.md, src/components/shell/AppShell.tsx, src/components/shell/__tests__/AppShell.test.tsx
NavUser displays account identity and role actions in the sidebar footer. Operations and Super Admin receive Settings; suppliers do not. All roles receive Log out. Tests cover the menu behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 154f8

The navigation and profile-menu updates are localized, and no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant NavUser
  participant DropdownMenu
  User->>NavUser: Click account-menu trigger
  NavUser->>DropdownMenu: Open account menu
  DropdownMenu-->>User: Show identity and role actions
  User->>DropdownMenu: Select Settings or Log out
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both primary changes: restoring active navigation styling and matching the profile footer to the shadcn NavUser pattern.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fm/gridgo-web-nav-profile

Comment @coderabbitai help to get the list of available commands.

@rqms40
rqms40 merged commit ae7d8e7 into main Aug 13, 2026
7 checks passed
@rqms40
rqms40 deleted the fm/gridgo-web-nav-profile branch August 13, 2026 04:05
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.

1 participant