Skip to content

feat(dashboard): one shared shadcn sidebar on every route - #1113

Merged
suleimansh merged 3 commits into
mainfrom
feat/shared-shadcn-sidebar
Jul 24, 2026
Merged

feat(dashboard): one shared shadcn sidebar on every route#1113
suleimansh merged 3 commits into
mainfrom
feat/shared-shadcn-sidebar

Conversation

@suleimansh

Copy link
Copy Markdown
Contributor

What

One shared sidebar on every route, rebuilt on the shadcn Base UI sidebar. The sessions rail used to disappear the moment no project was selected, so the home/Overview had no left column while a session page did. Now the two read as the same app.

Three parts, one per commit:

  1. shadcn Base UI sidebar primitives — port the Base UI (not Radix) Sidebar + the primitives it needs (sheet, separator, input, skeleton, a useIsMobile hook), adapted to this repo's @base-ui-components/react. Tooltip gains optional side/align; --sidebar-* tokens map onto the existing palette.
  2. cross-project recentsbuildRecentRuns + an onRecentRuns telefunc pool every project's sessions newest-first, tagged with their project. This feeds the Overview rail.
  3. shared sidebar + project-aware New — render the Sidebar on every route via SidebarProvider. On the Overview the rail lists pooled recents (each row names its project and jumps into it); a selected project shows its own runs.

The "New" button

Project-count aware, as requested:

  • no projects -> opens the add-project dialog (nowhere to run a session yet)
  • one project -> starts a session there
  • several projects -> opens a picker so you choose where
  • already in a project -> starts another session there

Verification

  • dashboard 421 tests, framework 1245 tests, both typechecks + root typecheck clean.
  • Driven in a real browser (light + dark) across all states: home + session share the rail, Overview recents, and the three New-button cases (0 / 1 / many projects).

Retires the unused bespoke rail collapse (#862) in favour of the shadcn Sidebar's own model.

Port the shadcn "base" (Base UI, not Radix) Sidebar and the primitives it needs
(sheet, separator, input, skeleton, a useIsMobile hook), adapted to this repo's
@base-ui-components/react: the collapsed-state tooltip uses our Tooltip API and
the mobile branch does not forward wrapper props onto the Sheet root. Tooltip
gains optional side/align, and the --sidebar-* theme tokens map onto the existing
palette so the rail stays in step with the rest of the UI. Not wired yet.
Add buildRecentRuns + an onRecentRuns telefunc that pool every project's sessions
newest-first (capped), each tagged with the project it belongs to. This is what
lets the shared sidebar show recents on the home/Overview, where no single project
is selected. Exported through the package surface and the client shim; the telefunc
auto-registers under its export name.
…re New

Render the shadcn Sidebar on every route via SidebarProvider, so the home/Overview
and a session page share the exact same left column instead of the rail vanishing
with no project selected. The rail shows a project's own runs when one is selected
and the pooled cross-project recents on the Overview.

"New" is now project-aware: no projects opens the add-project dialog, one project
starts a session there, several open a picker; in a project it starts another
session there. Retires the unused bespoke collapse (#862) in favour of the shadcn
Sidebar's own model.
@suleimansh suleimansh self-assigned this Jul 24, 2026
@suleimansh
suleimansh marked this pull request as ready for review July 24, 2026 16:00
@suleimansh
suleimansh merged commit 2581fce into main Jul 24, 2026
1 check passed
@suleimansh
suleimansh deleted the feat/shared-shadcn-sidebar branch July 24, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant