Problem
The sidebar lists favorited projects (sidebar-favorites, shell_sidebar.html:92) under the Me and Projects links. The list has no heading, only a top border, so it isn't obvious what those items are.
There's also no quick way to get back to issues you were just looking at. Switching between a few issues means going back through each project's issue list every time.
Expected behavior
- Favorites heading: add a small "Favorites" title above the favorited projects, in the same style as the other small section headings (uppercase,
text-xs, slate).
- Recents section: add a new section below Favorites, titled "Recents", that lists the issues you've viewed most recently so you can jump back between them.
- Each item shows the issue key (e.g.
TRACK-85) and its title, truncated to one line. The full title appears on hover.
- The most recently viewed issue is at the top. An issue appears only once: viewing it again moves it to the top.
- It includes issues from every project you can access, capped at a sensible number (e.g. 10).
- Opening an issue updates Recents straight away, with no page reload. Use an out-of-band swap, as
sidebar-favorites already does with .OOB.
- The issue you're currently viewing is highlighted with
aria-current="page", using the same active styling as a current favorite.
- Items navigate like the other sidebar links: htmx into
#main with hx-push-url.
Acceptance criteria
- Recently viewed issues are stored per user on the server, like project favorites (
internal/store/project_favorites.go), so Recents follow you across devices and sessions. This needs a migration.
- A view is recorded when a signed-in user opens an issue page or panel. Signed-out visitors get no Recents section.
- Recents never show issues the user can no longer see: deleted issues, or issues in projects they've lost access to. Filter these out when the list is read.
- Stored history is trimmed so it doesn't grow without limit.
- The Favorites heading is hidden when there are no favorites, and the Recents section is hidden when there are no recent issues.
- Collapsed sidebar (TRACK-33, TRACK-40): the headings are hidden (
wide-only). Recents are either hidden or shown in a compact form that still makes sense without text. Pick one and apply it consistently.
- Works on mobile and in light and dark modes.
- Tests cover:
- recording a view
- reordering and de-duplicating when an issue is viewed again
- the item cap
- filtering out issues that are deleted or no longer accessible
- the out-of-band sidebar update when an issue is opened
- both sections hidden when they're empty