-
Notifications
You must be signed in to change notification settings - Fork 2
fix: Update navigation and routing to replace "Explore" with "Ranking" #18
Conversation
- Changed the link in the DashboardPage from "/explore" to "/ranking". - Updated robots.txt to allow access to "/ranking" instead of "/explore". - Modified sitemap to reflect the new "/ranking" URL. - Updated CTA component to link to "/ranking" instead of "/explore". - Changed tabs navigation to point to "/dashboard/ranking" instead of "/dashboard/explore". - Updated header navigation to link to "/ranking" instead of "/explore". - Adjusted NavSearch component to replace "/explore" with "/ranking" in command groups.
|
@raicdev is attempting to deploy a commit to the Veltrix Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughRoutes and links were changed from /explore to /ranking across header, CTAs, dashboard tabs, sitemap, and robots; nav-search now performs programmatic navigation on selection; sidebar news CTA now targets /register; dependencies were updated and Supabase packages removed. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CommandDialog
participant Router
User->>CommandDialog: Select CommandItem (onSelect)
CommandDialog->>CommandDialog: closeDialog()
CommandDialog->>Router: router.push(targetUrl)
Router-->>User: navigate to targetUrl
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (6)
src/app/(dashboard)/dashboard/page.tsx (1)
78-81: Use a more fitting icon for “Explore products”Minor UX polish: the PlusIcon suggests creation, while this CTA is navigational/browsing. Consider TelescopeIcon here for consistency with the card header.
- <Link href="/ranking"> - <PlusIcon className="w-4 h-4" /> + <Link href="/ranking"> + <TelescopeIcon className="w-4 h-4" /> Explore products </Link>src/app/robots.ts (1)
12-12: Add 301 redirects to preserve SEO/backlinks from /exploreTo avoid broken inbound links and keep ranking equity, add permanent redirects:
// next.config.mjs export default { async redirects() { return [ { source: "/explore", destination: "/ranking", permanent: true }, { source: "/dashboard/explore", destination: "/dashboard/ranking", permanent: true }, ]; }, };src/components/cta.tsx (1)
20-21: Align label with destination (optional): “Ranking” vs “Explore”Since this now links to /ranking, consider renaming for clarity.
- <Link href="/ranking">Explore</Link> + <Link href="/ranking">Ranking</Link>src/components/header.tsx (1)
27-27: Consider renaming label to “Ranking” and making active state prefix-aware (optional)
- Label “Explore” points to /ranking; consider updating for consistency.
- If nested paths under /ranking appear later, current active check (strict equality) won’t highlight the nav.
- { href: "/ranking", label: "Explore" }, + { href: "/ranking", label: "Ranking" },Outside this change, you can make active state prefix-aware:
// Mobile & desktop NavigationMenuLink active prop active={pathname === link.href || pathname.startsWith(link.href + "/")}src/components/nav-search.tsx (2)
93-100: Improve accessibility of the search triggerCurrently, the Input is readOnly and opens the dialog on click. Add ARIA to indicate it opens a dialog and allow keyboard activation.
Apply this diff:
<Input placeholder="Search..." className="pl-8 pr-7 cursor-pointer" - onClick={() => setOpen(true)} + onClick={() => setOpen(true)} + aria-haspopup="dialog" + aria-expanded={open} + aria-controls="command-dialog" + onKeyDown={(e) => { + if (e.key === "Enter" || (e.key.toLowerCase() === "k" && (e.metaKey || e.ctrlKey))) { + e.preventDefault() + setOpen(true) + } + }} readOnly />And add an id to the dialog (see next comment):
- <CommandDialog + <CommandDialog + id="command-dialog" className="border-4 border-neutral-800 bg-neutral-900"
115-118: Redundant disabled styling; CommandItem already handles disabled stateCommandItem already applies data-[disabled=true]:opacity-50 and pointer-events-none. The additional opacity-50 is redundant; consider simplifying to avoid conflicting cursor styles.
Apply this diff:
- className={`!py-2 hover:cursor-pointer ${item.disabled ? "opacity-50 cursor-not-allowed" : ""}`} + className={`!py-2 ${item.disabled ? "cursor-not-allowed" : "hover:cursor-pointer"}`}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
package.json(3 hunks)src/app/(dashboard)/dashboard/page.tsx(1 hunks)src/app/robots.ts(1 hunks)src/app/sitemap.ts(1 hunks)src/components/cta.tsx(1 hunks)src/components/dashboard/tabs-nav.tsx(1 hunks)src/components/header.tsx(1 hunks)src/components/nav-news.tsx(1 hunks)src/components/nav-search.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/app/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (CLAUDE.md)
Use the Next.js App Router in 'src/app/' for route definitions, with grouped routes for (auth), (dashboard), (home), and api.
Files:
src/app/sitemap.tssrc/app/robots.tssrc/app/(dashboard)/dashboard/page.tsx
src/components/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (CLAUDE.md)
Components are organized by feature area (auth, dashboard, product, etc.) with shared UI components in 'src/components/ui/'.
Files:
src/components/cta.tsxsrc/components/nav-news.tsxsrc/components/header.tsxsrc/components/dashboard/tabs-nav.tsxsrc/components/nav-search.tsx
🧠 Learnings (1)
📚 Learning: 2025-08-03T08:55:13.838Z
Learnt from: CR
PR: teamzisty/prodfind#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-03T08:55:13.838Z
Learning: Applies to src/app/**/*.{js,jsx,ts,tsx} : Use the Next.js App Router in 'src/app/' for route definitions, with grouped routes for (auth), (dashboard), (home), and api.
Applied to files:
src/components/nav-search.tsx
🧬 Code Graph Analysis (6)
src/app/sitemap.ts (2)
src/app/(home)/ranking/page.tsx (1)
ExplorePage(15-41)src/app/(dashboard)/dashboard/explore/page.tsx (1)
ExplorePage(12-39)
src/app/(dashboard)/dashboard/page.tsx (1)
src/app/(home)/new/page.tsx (1)
ExplorePage(15-41)
src/components/cta.tsx (2)
src/app/(home)/ranking/page.tsx (1)
ExplorePage(15-41)src/app/(home)/new/page.tsx (1)
ExplorePage(15-41)
src/components/header.tsx (4)
src/components/site-header.tsx (1)
SiteHeader(8-33)src/components/ui/navigation-menu.tsx (2)
NavigationMenuLink(124-138)NavigationMenu(8-30)src/app/(home)/ranking/page.tsx (1)
ExplorePage(15-41)src/components/nav-main.tsx (1)
NavMain(15-62)
src/components/dashboard/tabs-nav.tsx (2)
src/app/(home)/ranking/page.tsx (1)
ExplorePage(15-41)src/app/(dashboard)/dashboard/explore/page.tsx (1)
ExplorePage(12-39)
src/components/nav-search.tsx (2)
src/components/ui/command.tsx (6)
CommandDialog(176-176)CommandGroup(180-180)CommandItem(181-181)CommandDialog(32-61)CommandItem(142-156)CommandGroup(113-127)src/components/nav-main.tsx (2)
NavMain(15-62)item(32-57)
🔇 Additional comments (7)
src/app/sitemap.ts (1)
18-18: Sitemap static route switched to /ranking — LGTMThe update aligns with the routing change and keeps metadata consistent.
src/app/robots.ts (1)
12-12: Robots allow-list updated to /ranking — LGTMSearch engines will now crawl the new route; consistent with sitemap change.
src/components/dashboard/tabs-nav.tsx (1)
17-17: Confirmed:/dashboard/rankingroute exists and no leftover/dashboard/explorereferences
- The new route lives at src/app/(home)/ranking/
- A global search shows no remaining imports or links to
/dashboard/exploreIf you still need to support the old URL, add a redirect in your Next.js config (or create an
/explorepage that redirects):// next.config.js module.exports = { async redirects() { return [ { source: '/dashboard/explore', destination: '/dashboard/ranking', permanent: true, }, ] }, }Optionally, for nested paths under
/dashboard/ranking, update your tab-selection logic to:const getCurrentTab = () => { const current = navLinks.find((link) => pathname === link.href || pathname.startsWith(link.href + "/") ); return current ? current.value : ""; };package.json (1)
20-20: Dependency sanity check passed
No lingering Supabase imports or/exploreroute references were found—everything’s safe to ship.src/components/nav-search.tsx (3)
76-77: Rename “Explore” to “Ranking” for Dashboard group (and use Trophy icon) to match PR objectiveThe route points to /dashboard/ranking, but the label still says “Explore”. For consistency with the rest of the PR and to avoid user confusion, rename to “Ranking” and use the Trophy icon like the top-level item.
Apply this diff:
- { icon: Telescope, label: "Explore", url: "/dashboard/ranking" }, + { icon: Trophy, label: "Ranking", url: "/dashboard/ranking" },If you adopt this, consider removing Telescope from the lucide-react import if it becomes unused.
51-64: Confirm disabled items’ target URLs or make them explicit non-routesDisabled items point to "/ranking". While handleItemClick guards disabled, consider using a placeholder (e.g., "#") to avoid accidental activation if the guard changes, or leave as-is if you plan to enable them soon.
Would you prefer we set disabled items’ url to "#" for clarity, or keep the real route to simplify future enablement?
1-131: Sanity check passed: no remaining “/explore” routes foundThe grep output shows zero hits for both
/exploreand/dashboard/explore, so the migration is complete. No further action needed.
…ch, and NavUser components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (3)
src/components/nav-search.tsx (3)
114-119: Good accessibility fix: use onSelect instead of onClick.Proper cmdk semantics; supports keyboard selection (Enter) and mouse.
29-50: Icon typing looks good (LucideIcon + strong typing for commandGroups).Thanks for importing the type-only LucideIcon and removing any usage of any.
112-116: Tailwind fix looks correct (“!py-2” instead of invalid “py-2!”).Both the group and item padding overrides now use the correct important prefix.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/components/nav-news.tsx(1 hunks)src/components/nav-search.tsx(1 hunks)src/components/nav-user.tsx(0 hunks)
💤 Files with no reviewable changes (1)
- src/components/nav-user.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/nav-news.tsx
🧰 Additional context used
📓 Path-based instructions (1)
src/components/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (CLAUDE.md)
Components are organized by feature area (auth, dashboard, product, etc.) with shared UI components in 'src/components/ui/'.
Files:
src/components/nav-search.tsx
🧠 Learnings (1)
📚 Learning: 2025-08-03T08:55:13.838Z
Learnt from: CR
PR: teamzisty/prodfind#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-03T08:55:13.838Z
Learning: Applies to src/app/**/*.{js,jsx,ts,tsx} : Use the Next.js App Router in 'src/app/' for route definitions, with grouped routes for (auth), (dashboard), (home), and api.
Applied to files:
src/components/nav-search.tsx
🧬 Code Graph Analysis (1)
src/components/nav-search.tsx (3)
src/components/ui/input.tsx (1)
Input(21-21)src/components/ui/command.tsx (8)
CommandDialog(176-176)CommandInput(177-177)CommandGroup(180-180)CommandItem(181-181)CommandDialog(32-61)CommandItem(142-156)CommandGroup(113-127)CommandInput(63-83)src/components/nav-main.tsx (2)
NavMain(15-62)item(32-57)
🔇 Additional comments (1)
src/components/nav-search.tsx (1)
42-88: Confirmed no stale “/explore” links remain
Ran repo-wide searches for both/exploreand/dashboard/exploreand found zero occurrences outside of the updated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
src/components/nav-search.tsx (2)
112-119: Accessibility and cmdk semantics fixed (onSelect + correct Tailwind) — niceSwitching to onSelect restores keyboard support, and using !py-2 fixes the invalid Tailwind class.
15-15: Fix invalid lucide-react import: UserIcon is not exportedlucide-react exports User, not UserIcon. This will fail at compile-time. Alias User as UserIcon to keep the rest of the code unchanged.
- UserIcon, + User as UserIcon,
🧹 Nitpick comments (1)
src/components/nav-search.tsx (1)
91-101: Improve accessibility: enable keyboard activation and add ARIA attributes to the triggerThe read-only input opens the dialog on click but not via keyboard. Add basic ARIA and key handling to support Enter/Space activation.
<Input placeholder="Search..." - className="pl-8 pr-7 cursor-pointer" - onClick={() => setOpen(true)} + className="pl-8 pr-7 cursor-pointer" + aria-haspopup="dialog" + aria-expanded={open} + onClick={() => setOpen(true)} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + setOpen(true) + } + }} readOnly />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/nav-search.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/components/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (CLAUDE.md)
Components are organized by feature area (auth, dashboard, product, etc.) with shared UI components in 'src/components/ui/'.
Files:
src/components/nav-search.tsx
🧠 Learnings (1)
📚 Learning: 2025-08-03T08:55:13.838Z
Learnt from: CR
PR: teamzisty/prodfind#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-03T08:55:13.838Z
Learning: Applies to src/app/**/*.{js,jsx,ts,tsx} : Use the Next.js App Router in 'src/app/' for route definitions, with grouped routes for (auth), (dashboard), (home), and api.
Applied to files:
src/components/nav-search.tsx
🧬 Code Graph Analysis (1)
src/components/nav-search.tsx (3)
src/components/ui/input.tsx (1)
Input(21-21)src/components/ui/command.tsx (10)
CommandDialog(176-176)CommandInput(177-177)CommandList(178-178)CommandEmpty(179-179)CommandGroup(180-180)CommandItem(181-181)CommandSeparator(183-183)CommandDialog(32-61)CommandItem(142-156)CommandGroup(113-127)src/components/nav-main.tsx (2)
NavMain(15-62)item(32-57)
🔇 Additional comments (2)
src/components/nav-search.tsx (2)
42-50: Good use of explicit typing with LucideIconStrong typing for the icon components improves safety and DX. Looks good.
52-64: Top-level navigation updated to “/ranking” — LGTMRoutes and labels align with the rename objective.
| { icon: Telescope, label: "Explore", url: "/dashboard/explore" }, | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align dashboard navigation with the “/ranking” rename (label, icon, and href)
Per the PR objectives, replace the remaining “Explore” entry to point to the new ranking route and label.
- { icon: Telescope, label: "Explore", url: "/dashboard/explore" },
+ { icon: Trophy, label: "Ranking", url: "/dashboard/ranking" },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { icon: Telescope, label: "Explore", url: "/dashboard/explore" }, | |
| ], | |
| { icon: Trophy, label: "Ranking", url: "/dashboard/ranking" }, | |
| ], |
🤖 Prompt for AI Agents
In src/components/nav-search.tsx around lines 76 to 77 the navigation entry
still shows { icon: Telescope, label: "Explore", url: "/dashboard/explore" };
update this entry to match the PR rename by replacing the icon with the Ranking
icon (import if needed), change the label to "Ranking", and update the url to
"/dashboard/ranking"; ensure any import for Telescope is removed if unused and
the new icon is imported and used consistently.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Summary
Update navigation and routing to replace "Explore" with "Ranking"
Type of Change
Changes Made
Related Issues
Closes #15
Testing
Screenshots
Database Changes
Security Considerations
Checklist
Additional Notes
Summary by CodeRabbit