Skip to content

Fix: Active route not highlighted in Sidebar navigationΒ #88

@Ananya-CM

Description

@Ananya-CM

πŸ› Bug Report

Area: Sidebar β€” Navigation
Type: Bug β€” Missing Active State
Priority: Medium

πŸ“Œ Description

The Sidebar navigation in FlowForge does not highlight
the currently active route. When a user navigates to
Dashboard, Projects, Workspace, or Chat, none of the
sidebar links show a visual active/selected state.
This makes it impossible for users to know which
page they are currently on just by looking at
the sidebar.


πŸ” Root Cause

The Sidebar component uses static link styling
without checking the current pathname. It needs
to use Next.js usePathname() hook to compare
the current route and apply active styles
conditionally.


❌ Current Behaviour

  • All sidebar links look identical regardless
    of which page is active
  • User has no visual indication of current location
  • Poor navigation UX β€” standard in all modern apps

βœ… Expected Behaviour

  • The active route link should be visually
    highlighted (e.g. background color, bold text,
    or accent color indicator)
  • Highlight should update automatically when
    user navigates between pages
  • Matches the app's existing emerald/teal
    color scheme

πŸ’‘ Proposed Fix

In frontend/app/components/Sidebar.tsx:

  1. Import usePathname from next/navigation
  2. Compare each link's href with current pathname
  3. Apply active styles conditionally:
const pathname = usePathname();

// For each link:
className={`... ${pathname === href 
  ? "bg-emerald-50 text-emerald-700 font-semibold" 
  : "text-slate-600 hover:bg-slate-100"}`}

πŸ“‚ File to Change

frontend/app/components/Sidebar.tsx


πŸ–₯️ Steps to Reproduce

  1. Run app locally (npm run dev)
  2. Log in and navigate to /dashboard
  3. Look at the sidebar β€” Dashboard link looks
    same as all other links
  4. Click Projects β€” again no visual difference
  5. No active state shown anywhere

@Shriii19
I'd like to work on this issue.
Could you please assign it to me?

nsoc26

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions