Repository navigation
feat(sidebar): put Chat above the groups, Competitors under Reports, and let the groups fold - #1887
Conversation
…and let the groups fold Chat leaves Execution for a group of its own at the top. Competitors moves from Analytics to right under Reports, so Prompts follows Brand Visibility. Execution and Analytics fold under their titles: open by default, kept in this browser, and opened again on one of their pages. Menu access lists Chat above the headings, and the help and guides say where things are. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
gkhngyk
left a comment
There was a problem hiding this comment.
Approving. Chat now sits on its own above the groups, Competitors sits right under Reports, and Execution and Analytics fold. I checked:
- Menu access: the sections still come from
dashboardNav, so hiding a section by role, by person or by work area still covers Chat and Competitors where they are now. If Chat is hidden, its group is dropped, so no empty block or stray rule is left behind. In Settings → Menu access, Chat is listed above the headings and the one remaining "Other" group holds Reports and Competitors. - Gates: Competitors keeps
competitor_tracking, so the locked row and plan badge work as before. Chat keepsai_agent, its badge, and the/dashboard/chatlink when the new Chat is on. - Folding: groups render open on the server and on first paint, and the saved state is read after mount, so there's no hydration mismatch. Reads and writes are wrapped in try/catch. The keys don't depend on locale. A folded group opens again when one of its pages is showing, and when the menu is narrowed to icons every item still shows.
- A11y: the group titles are real buttons with
aria-expanded, andaria-controlsis set only while the list exists. The arrow-key handler still moves only between links, and the group buttons are reached with Tab. - Mobile menu and onboarding preview: these follow the new order, with nothing extra to change.
- Help and docs: both Competitors articles, the guide, and the menu-access and work-areas pages now point to Reports, and the folding is described.
Tests: the layout, settings and onboarding suites, the nav, menu-access and Chat route/page-context tests, the Help validate test and plan-row.test.ts (40 files, 401 tests) all pass. tsc, eslint and prettier are clean on the changed files. The branch is up to date with main and has no conflicts.
One optional nit: the work-areas lists (Help and docs) now follow the menu order for Competitors but still list Action Center before Chat. If you want them to match the menu exactly, Chat would go first.
gkhngyk
left a comment
There was a problem hiding this comment.
Merging in order with the other approved PRs. This head merges current main; its tree is what main will be after this squash, checked with the full server and web suites, tsc, lint, format and next build.
Summary
A tidier left menu, as the owner asked. Three changes:
localStorage,ansvisor.sidebar.group.<title>Open, the same pattern as the Prompts and Content submenus).Code
web/src/config/dashboard.tssets the new order: a first untitled group (Chat), Execution (Action Center, Content, Site Audit), Analytics (Brand Visibility, Prompts, Mentions, Citations, Shopping, AI Referral Traffic), then Reports and Competitors. Routes, gates and badges are unchanged.web/src/components/layout/sidebar.tsxadds the group headers as buttons (aria-expanded,aria-controls). A folded group's items aren't rendered, so the arrow keys skip them.routes-sidebar.test.tsadds it only if no group lists it.Help and docs:
help/settings/menu-access.md: a new "Fold a group on your menu" section.help/competitors/add-competitors.md,help/competitors/compare-competitors.mdandhelp/settings/work-areas.mdupdated.docs/guides/menu-access.mdxanddocs/guides/competitors.mdxupdated.Related issue
None.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
yarn vitest run src/components/layout src/lib/dashboard-navigation.test.ts src/lib/menu-access.test.ts src/components/settings src/lib/help.Screenshots (1024px, light and dark) were shown to the owner.
Checklist
yarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)help/(or no user-visible change)On this commit:
format:checkandtypecheckpass,linthas 0 errors (7 old warnings in files this PR doesn't touch), and the layout, settings, onboarding, chat, help and navigation suites pass (1,319 tests in 99 files). Checked in the browser at 1024px, light and dark.🤖 Generated with Claude Code