Skip to content

fix(pages): Features nav link navigates to "/" making it indistinguishable from Home #495

Description

@lizhengfeng101

Description

Clicking the "Features" (核心特性) navigation tab in the Navbar navigates to /, which is the same route as clicking the logo or landing on the home page. From a user's perspective, if they're already on the landing page, clicking "Features" does nothing visible. If they're on another page (e.g., /docs), clicking "Features" brings them to the home page rather than a dedicated features section.

In contrast, other nav items like "Benchmark" (/benchmark) and "Quick Start" (/quickstart) navigate to distinct routes as expected.

Current behavior:

// pages/src/components/Navbar.tsx:16-22
const navTabs = [
  { path: '/', labelKey: 'navbar.features' },        // ← same as home
  { path: '/benchmark', labelKey: 'navbar.benchmark' },
  { path: '/quickstart', labelKey: 'navbar.quickstart' },
  { path: '/docs', labelKey: 'navbar.docs' },
  { path: '/blog', labelKey: 'navbar.blog' },
];
// pages/src/App.tsx:25
<Route path="/" element={<LandingPage><FeaturesPage /></LandingPage>} />

Expected behavior:

Clicking "Features" should either:

  1. Navigate to a dedicated /features route, or
  2. Scroll to the features section on the landing page (e.g., via hash /#features)

Scope

  • File(s): pages/src/components/Navbar.tsx, pages/src/App.tsx
  • Area: SPA routing, navigation UX

Acceptance Criteria

  • Clicking "Features" in the navbar produces a visually distinct navigation action (not identical to going to /)
  • Active tab highlighting correctly reflects the current page
  • All other nav links continue to work as before
  • Tests pass (make test)
  • Code check passes (make check)

Context

Discovered during review of #487 (code-splitting PR). This issue predates that PR — it exists on main as well. The root cause is that FeaturesPage is embedded directly in the landing page route (/) without its own route or anchor-based scroll target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions