Repository navigation
feat(content): order the Content menu as the work goes and mark Content itself new - #1603
Merged
Merged
Conversation
…nt itself new The sidebar's Content submenu now lists its pages in the order the work goes: Opportunities, Plan, Editor, Library (was Plan, Editor, Opportunities, Library). The "New" badge moves from Plan to the Content item itself, and the desktop sidebar's expandable items show their badge beside the chevron, as plain items and the mobile menu already do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 27, 2026
Merged
gkhngyk
approved these changes
Oct 27, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with a follow-up.
What I checked:
- Own change. One commit on 5bbd162:
config/dashboard.ts,sidebar.tsxand the nav test. It merges clean on main (15b5b5f), and with #1596 and #1597. No other open PR touches these files. - Order and the current item.
activeChildHrefpicks the longest matching route, not the first, so putting Opportunities (/dashboard/content) first changes nothing: the Plan, the Editor (and a draft under it), the Library and an opportunity's own page each still mark only their own item. The existingactiveChildHreftests read the real config and pass. - The badge.
- Desktop, expanded: a submenu parent now shows
effectiveBadgebefore the chevron, with the plain items' classes. Prompts has no badge, so only Content changes. - Desktop, collapsed: a parent falls through to the plain link, whose
titlealready reads "Content (New)". - Mobile: the parent row already rendered
effectiveBadge; the children loop keeps rendering a child badge, and none is left. - Locked (plan without Content): the row shows the plan badge as before, not "New".
- The onboarding preview lists the nav without badges or children, so it doesn't change.
- Desktop, expanded: a submenu parent now shows
- Keys. No new message key.
badgestays a literal, as Action Center's "New" already is. - Tests.
dashboard-navigation.test.tsandsrc/components/layoutpass at this head (35). With main'sdashboard.tsandsidebar.tsx, the changed test fails ("expected undefined to be 'New'") and the rest pass. - Before the API deploy. Web only, nothing reads the API.
Follow-up:
- No test covers the badge on a submenu parent (
sidebar.tsx:431-438). Revertingsidebar.tsxalone leaves every test passing. A small render test of the expanded sidebar that finds "New" inside the Content button (data-submenu="/dashboard/content") would keep it from being lost again.
7 of 12 tasks
gkhngyk
pushed a commit
that referenced
this pull request
Oct 28, 2026
* test(layout): pin the "New" badge on a sidebar submenu's parent Follow-up from #1603. No test covered the badge on a submenu parent (sidebar.tsx, the expandable item's button): reverting it left every test passing. A render test of the expanded sidebar now finds "New" inside the Content button (data-submenu="/dashboard/content"), and a plain item's (Action Center) too. Removing the parent's badge fails it. The sidebar's heavy parts (brand switcher, profile, theme toggle, the tracked-prompt count) are stubbed; it opens collapsed, so the test expands it through its store. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(layout): give the sidebar badge test a menu of its own Review follow-up. The test read the real dashboardNav, so it leaned on Action Center and Content being marked "New" today: dropping either badge from the product would fail it for no fault of the sidebar. It now mocks @/config/dashboard with a plain item and a submenu parent, both badged. Removing the badge from the real menu leaves it passing; removing the parent's badge from sidebar.tsx still fails it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The sidebar's Content menu follows the work, and "New" moves to Content itself. Ansvisor asked for the Plan item's "New" to go, with the badge on Content, and for an order that fits the work.
badge: 'New'and Plan has none (web/src/config/dashboard.ts).sidebar.tsx) didn't show a badge on an item with a submenu. It now showseffectiveBadgebeside the chevron, in the plain items' style (secondary, h-5, 10 px). The mobile menu already showed it.Written by a side session at the user's request, and handed over for the checks, the browser check and this PR.
Related issue
None. Ansvisor's request.
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
cd web && yarn vitest run src/lib/dashboard-navigation.test.ts src/components/layoutChecked in the browser:
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run in
web/:yarn format,yarn lint(0 errors),yarn typecheck;yarn test(4,138 tests);yarn build.🤖 Generated with Claude Code