feat(desktop): add configurable workspace navigation style (top-bar vs sidebar)#2
feat(desktop): add configurable workspace navigation style (top-bar vs sidebar)#2andreasasprou wants to merge 1 commit intofeat/desktop-workbench-review-modefrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s sidebar) Add a setting to let users choose between displaying workspaces as horizontal tabs in the TopBar (current behavior) or in a dedicated left sidebar (new feature, similar to Linear/GitHub Desktop). Key changes: - Add navigationStyle column to settings table (migration 0005) - Add navigation style dropdown in Behavior Settings - Create WorkspaceSidebar component with collapsible project sections - Create shared useWorkspaceShortcuts hook (⌘1-9 shortcuts, auto-create) - Update TopBar to conditionally render based on navigation style - Add ⌘⇧B hotkey to toggle workspace sidebar 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6e90b2a to
be62b0d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!isOpen) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Keep workspace hotkeys active when sidebar is hidden
When isOpen is false this component returns null, which unmounts WorkspaceSidebar. In sidebar mode that’s the only place useWorkspaceShortcuts registers the ⌘1–9 and ⌘←/→ handlers, so toggling the workspace sidebar closed disables workspace switching shortcuts (and the auto-create logic) even though the feature is meant to work in both modes. Consider moving the shortcut hook to a parent that stays mounted or keeping it active even when the sidebar is hidden.
Useful? React with 👍 / 👎.
* WIP * WIP * WIP - tried to restore code * WIP - tried to restore code * WIP - tried to restore code * WIP - tried to restore code * chore: update bun.lock after rebase Regenerated lockfile after rebasing onto latest origin/main. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * WIP * fix(desktop): use auth client instead of server to avoid database dependency Split @superset/auth package exports to separate server and client. Desktop app now imports from @superset/auth/client which doesn't require DATABASE_URL, fixing startup crash in production builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix(auth): use Better Auth client API and split server/client exports - Updated desktop app to use correct Better Auth client API methods: - authClient.getSession() instead of auth.api.getSession() - authClient.organization.setActive() instead of auth.api.setActiveOrganization() - Renamed packages/auth/src/index.ts to server.ts - Changed package exports from "." to "./server" for clarity - Removed unnecessary createAuthApiClient factory function - Updated all imports from @superset/auth to @superset/auth/server This fixes the typecheck errors and database dependency issue in the desktop app by properly separating server-side auth (requires DB) from client-side auth (HTTP API calls only). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * chore: add BETTER_AUTH_SECRET to app env.ts files for tree-shaking --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary
This PR adds a configurable workspace navigation style setting that lets users choose between displaying workspaces as horizontal tabs in the TopBar (current behavior) or in a dedicated left sidebar (Linear/GitHub Desktop style).
Details
Architecture
settings.navigationStylecolumnuseWorkspaceShortcutsextracts keyboard shortcuts (⌘1-9) and auto-create logic shared between both modeszustand/persistHow it works
useWorkspaceShortcutshookKey decisions
string[]notSet<string>getGitHubStatuson hoverNew Components
WorkspaceSidebar
WorkspaceSidebar.tsx- Main sidebar componentWorkspaceSidebarHeader.tsx- "Workspaces" title headerWorkspaceSidebarFooter.tsx- "Add project" buttonResizableWorkspaceSidebar.tsx- Wrapper with resize handleProjectSection
ProjectSection.tsx- Collapsible project group with workspacesProjectHeader.tsx- Project name, color dot, collapse toggleWorkspaceListItem
WorkspaceListItem.tsx- Individual workspace row with lazy-loaded PR dataWorkspaceStatusBadge.tsx- PR status badge (open/merged/closed/draft)WorkspaceDiffStats.tsx- Additions/deletions displayShared
useWorkspaceShortcuts.ts- Shared hook for ⌘1-9 shortcuts and auto-create logicworkspace-sidebar-state.ts- Zustand store for sidebar UI stateKeyboard Shortcuts
Manual Test Checklist
Navigation Style Setting
Sidebar Mode
Top Bar Mode
Keyboard Shortcuts (Both Modes)
Files Changed
New Files
apps/desktop/src/renderer/hooks/useWorkspaceShortcuts.tsapps/desktop/src/renderer/stores/workspace-sidebar-state.tsapps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceSidebarControl.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/*(10 files)packages/local-db/drizzle/0005_add_navigation_style.sqlModified Files
packages/local-db/src/schema/schema.ts— AddedNavigationStyletype and columnapps/desktop/src/lib/trpc/routers/settings/index.ts— Added get/set navigation style routesapps/desktop/src/renderer/screens/main/components/SettingsView/BehaviorSettings.tsx— Added dropdownapps/desktop/src/renderer/screens/main/components/TopBar/index.tsx— Conditional renderingapps/desktop/src/renderer/screens/main/components/TopBar/WorkspaceTabs/index.tsx— Refactored to use shared hookapps/desktop/src/renderer/screens/main/index.tsx— Wire up sidebar and navigation styleapps/desktop/src/shared/constants.ts— AddedDEFAULT_NAVIGATION_STYLEapps/desktop/src/shared/hotkeys.ts— AddedTOGGLE_WORKSPACE_SIDEBAR, renamedTOGGLE_SIDEBAR