Originally created by: sumamakhan761
When navigating the dashboard (e.g., at /dashboard/[companyId]/crm), clicking on any notification in the Notifications dropdown or clicking "View Insights" inside a Milestone celebration modal causes the router to redirect to an invalid duplicated URL.
Instead of routing cleanly to the intended destination (e.g., /dashboard/[companyId]/crm), the router pushes a duplicated route:
https://<domain>/dashboard/<companyId>/dashboard/<companyId>/<tab>
This results in a 404 page or broken navigation loop.
crm or /crm), it should route to /dashboard/<companyId>/crm./dashboard/<companyId>/analytics), it should navigate directly without re-injecting the dashboard prefix.https://...) should open without prefix alteration./dashboard/[companyId]/crm.linkUrl or trigger a milestone celebration and click "View Insights"./dashboard/[companyId]/dashboard/[companyId]/....The redirect logic in apps/web/components/notifications/NotificationBell.tsx handles click navigation in two places (handleItemClick and the CelebrationModal onAction callback). In both places, ${basePath}/ is prepended directly to item.linkUrl without verifying whether item.linkUrl already contains the dashboard prefix or is already formatted as an absolute path.
Look into apps/web/components/notifications/NotificationBell.tsx. Consider implementing a path resolution helper that inspects linkUrl before passing it to router.push:
linkUrl already starts with http or already contains /dashboard / basePath.${basePath} when dealing with a bare relative sub-route (e.g. crm or automation).