Legacy breadcrumb on epic page shows Work Item in path instead of Epics

Summary

On an Epic Work Item page, there are two problems with the legacy breadcrumb;

  • It shows Work Items in path even when we're viewing an epic.
  • When the link is clicked, it doesn't take the user back to the epics list page.
    • Since this navigation is handled by VueRouter, it takes the user to the Work Items list for the group and tries to fetch every single work item of that group (including issues, tasks, and epics), this causes the page to fetch over 500k items just for gitlab-org group.
Breadcrumb Navigation
image Screen_Recording_2024-08-20_at_6.45.44_PM

Expected behaviour

  • Breadcrumb should show Epics instead when an epic is being viewed.
  • Clicking on Epics link from this breadcrumb should take user back to group epics list.