feat(dashboard): one shared shadcn sidebar on every route - #1113
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
@base-ui-components/react. Tooltip gains optionalside/align;--sidebar-*tokens map onto the existing palette.buildRecentRuns+ anonRecentRunstelefunc pool every project's sessions newest-first, tagged with their project. This feeds the Overview rail.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:
Verification
Retires the unused bespoke rail collapse (#862) in favour of the shadcn Sidebar's own model.