GeezerVison is showing github.com — bug: Bug: Sidebar active highlight disappears on detail pages · Issue #5094 · triggerdotdev/trigger.dev
bug: Bug: Sidebar active highlight disappears on detail pages #5094
Description
Provide environment information
System:
- OS: macOS 26.6.2
- CPU: Apple M5 Pro (arm64)
- Memory: 24 GB
- Shell: zsh 5.9
Binaries:
- Node: 22.23.2
- npm: 10.9.8
- Bun: 1.3.10
- Deno: 2.9.6
Web:
- Trigger.dev Cloud Dashboard
Browser:
- Google Chrome 156
- macOS 26.6.2 (arm64)
Describe the bug
The sidebar navigation item loses its active highlight when navigating from a section's main page to its detail page. This happens in sections like Tasks and Runs, making it difficult for users to identify their current location in the dashboard.
Reproduction repo
Not applicable. The issue is reproducible directly in the Trigger.dev Cloud Dashboard.
To reproduce
- Open a project environment in the Trigger.dev dashboard.
- Click on Tasks in the sidebar.
- Verify that Tasks is highlighted.
- Open any task from the list.
- Observe that the Tasks highlight disappears.
- Repeat the same steps with Runs by opening an individual run.
Suggested fix
Investigate the sidebar pathname matching logic and support prefix-based matching for nested detail routes. Ensure that the correct parent menu item remains active without affecting other navigation items.
Additional information
The issue occurs when navigating to detail pages, but not when applying filters on list pages. It appears to be related to exact pathname matching in the sidebar navigation logic.
Affected files may include:
- apps/webapp/app/components/navigation/SideMenuItem.tsx
- apps/webapp/app/components/navigation/SideMenu.tsx
- apps/webapp/app/components/navigation/sideMenuSections.tsx
Activity
dhruvil-codes commented on Nov 4, 2026
Hi team,
I investigated this issue and traced the root cause in the sidebar navigation matching logic:
Root Cause
- In
SideMenuItem.tsx, route active status is computed as pathName === to || (matchPrefix && pathName.startsWith(${to}/)).
- In
SideMenu.tsx, main menu items (Runs, Sessions, Webhooks) do not pass matchPrefix, so navigating to any child detail page (e.g. /runs/:id) causes exact pathname matching to fail and drops the active highlight.
- For
Tasks, to points to the environment root (v3EnvironmentPath). Setting a naive matchPrefix on to would greedily match all sibling routes (/runs, /batches, /settings), whereas task detail pages live specifically under ${v3EnvironmentPath}/tasks/ (e.g. /tasks/standard/:id, /tasks/scheduled/:id, /tasks/stream, /tasks/dashboard).
Proposed Solution
- Extend
SideMenuItem: Support explicit prefix matching (e.g. allowing matchPrefix to accept a custom prefix string like ${v3EnvironmentPath}/tasks or adding an activePrefix?: string prop).
- Update
SideMenu.tsx: Enable prefix matching on Runs, Sessions, Webhooks, and supply the /tasks sub-path prefix for Tasks.
- Update
sideMenuSections.tsx: Ensure detail-bearing section items (batches, deployments, errors, bulk-actions, waitpoint-tokens) also enable matchPrefix: true, matching the pattern already used for alerts.
- Tests: Add regression unit tests in
apps/webapp/test/ verifying active highlight retention across nested detail paths.
I'd like to take this up and submit a PR with test coverage. Could you please assign this issue to me?
Thanks!
Metadata
Metadata
Development
No branches or pull requestsIssue actions