Title: bug: Side menu items lose their active state on detail pages · Issue #5088 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: bug: Side menu items lose their active state on detail pages · Issue #5088 · triggerdotdev/trigger.dev
X Title: bug: Side menu items lose their active state on detail pages · Issue #5088 · triggerdotdev/trigger.dev
Description: Provide environment information System: OS: macOS 26.6.2 CPU: (15) arm64 Apple M5 Pro Memory: 210.33 MB / 24.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.23.2 - /Users/.../.nvm/versions/node/v22.23.2/bin/node npm: 10.9.8 - /Users/.../....
Open Graph Description: Provide environment information System: OS: macOS 26.6.2 CPU: (15) arm64 Apple M5 Pro Memory: 210.33 MB / 24.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.23.2 - /Users/.../.nvm/versions/node/v22....
X Description: Provide environment information System: OS: macOS 26.6.2 CPU: (15) arm64 Apple M5 Pro Memory: 210.33 MB / 24.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.23.2 - /Users/.../.nvm/versions/node/v22....
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/5088
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: Side menu items lose their active state on detail pages","articleBody":"### Provide environment information\n\n**System:**\n\n- OS: macOS 26.6.2\n- CPU: (15) arm64 Apple M5 Pro\n- Memory: 210.33 MB / 24.00 GB\n- Shell: 5.9 - /bin/zsh\n\n**Binaries:**\n\n- Node: 22.23.2 - /Users/.../.nvm/versions/node/v22.23.2/bin/node\n- npm: 10.9.8 - /Users/.../.nvm/versions/node/v22.23.2/bin/npm\n- bun: 1.3.10 - /Users/.../.bun/bin/bun\n- Deno: 2.9.6 - /opt/homebrew/bin/deno\n\n**Web:**\n\nTrigger.dev Cloud dashboard (cloud.trigger.dev)\n\nBrowser:\n\n \u003cChrome 156> on macOS 26.6.2 (arm64)\n\n### Describe the bug\n\nA side menu item is highlighted as active on its list page, but loses the highlight as soon\nas you open a detail page within that section. The side menu then shows no active item,\neven though you're still in the same area.\n\nThe video shows it with Tasks. The same happens on Runs (opening a run), and on every\nother section that has detail pages or overlays with their own URL.\n\nFiltering a list (e.g. Runs filters) does not trigger it; only navigating to a deeper page does.\n\n**Expected:**\n\nThe section's menu item stays active on all of its pages.\n\n**Why it matters:**\n\nMany dashboard pages share a similar layout (a list, a detail view,\na side panel), so it's easy to lose track of where you are. The side menu's active\nindicator is the most visible cue for your current location, and right now it\ndisappears exactly when you go one level deeper. The breadcrumbs help, but they're\nsmall and easy to overlook, so they don't make up for the missing highlight.\n\n### Reproduction repo\n\nN/A, dashboard UI bug. Reproducible in any project with at least one deployed task.\n\n### To reproduce\n\n1. Open a project environment in the dashboard\n2. Click \"Tasks\" in the side menu -> \"Tasks\" is active\n3. Click any task in the list -> \"Tasks\" is no longer active\n4. Click \"Runs\" -> \"Runs\" is active\n5. Click any run -> \"Runs\" is no longer active\n\n### Suggested fix\n\n**Root cause:**\n\n`SideMenuItem` marks an item active only on an exact pathname match. A `matchPrefix` prop (``pathname.startsWith(`${to}/`)``) already exists, but only the Alerts item uses it.\n\nI have a working fix on a branch, ready to open as a PR once vouched:\n\n- Section items (`buildSideMenuSections`) default to `matchPrefix: true`, so every item\n stays active on its sub-pages. Runs, Sessions and Webhooks set it explicitly.\n- Dashboards opts out (`matchPrefix: false`): built-in and custom dashboards under\n `\u003cenv>/dashboards/...` are their own menu items and should own the highlight.\n- Tasks links to the environment root, so `${to}/` would match every page. It gets a new\n `activePathPrefix` prop instead, set to `\u003cenv>/tasks`.\n- The match keeps the `/` boundary, so `/concurrency` does not activate on\n `/concurrency-limits`.\n- The path logic moves into a pure `isSideMenuPathActive()` function and stays inside the\n existing check, so `yieldActiveToFavorite` keeps working (an active favorite still owns\n the highlight).\n\nVerified with unit tests (each one fails when the fix is reverted) and in a local instance:\ntask, run, model compare, alert and environment variable sub-pages show no active item\non main and the correct one with the fix. Every page I checked has exactly one active item.\n\n**Files:**\n\n- `apps/webapp/app/components/navigation/SideMenuItem.tsx`\n- `apps/webapp/app/components/navigation/SideMenu.tsx`\n- `apps/webapp/app/components/navigation/sideMenuSections.tsx`\n\n### Additional information\n\n**Video:** \n\nhttps://github.com/user-attachments/assets/8e5aced6-35e5-4083-b771-d58a40bc8cdc\n\nNavigating Tasks to task detail page. The nav item loses its active state.","author":{"url":"https://github.com/Siregar","@type":"Person","name":"Siregar"},"datePublished":"2026-10-30T11:23:46Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/5088"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0c7e64d0-036e-f5be-87d3-ebe984c0bb1a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D94A:358701:60085E0:7F5D7F1:6AFAD892 |
| html-safe-nonce | 0f730a62234f62a3d1dfc6632beba380dcf138e52c351fc966cfbb294772a778 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTRBOjM1ODcwMTo2MDA4NUUwOjdGNUQ3RjE6NkFGQUQ4OTIiLCJ2aXNpdG9yX2lkIjoiMzM0MDcyMjc4MTIwODM2OTI5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d552fe9e56c8d05602c69ca3bb7cee7dd78784c5a7d89e1148450546599a5441 |
| hovercard-subject-tag | issue:6118131588 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/5088/issue_layout |
| twitter:image | https://opengraph.githubassets.com/38e2c315ab5485f210d968273dfca5ca98ac52c7c7ffab9d992c423dea614c4f/triggerdotdev/trigger.dev/issues/5088 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/38e2c315ab5485f210d968273dfca5ca98ac52c7c7ffab9d992c423dea614c4f/triggerdotdev/trigger.dev/issues/5088 |
| og:image:alt | Provide environment information System: OS: macOS 26.6.2 CPU: (15) arm64 Apple M5 Pro Memory: 210.33 MB / 24.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.23.2 - /Users/.../.nvm/versions/node/v22.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Siregar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 02f4c00e74911c7cd779fc232c3130cee49eb39fd0ed4bfe3eea3b82c7c18084 |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 33c41e9d150e44415272934d676dc63c57d89c3b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width