Skip to content

refactor(desktop): remove dropdown from add workspace button in sidebar#639

Merged
Kitenite merged 1 commit into
mainfrom
remove-quick-create-dropdown
Jan 7, 2026
Merged

refactor(desktop): remove dropdown from add workspace button in sidebar#639
Kitenite merged 1 commit into
mainfrom
remove-quick-create-dropdown

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Jan 7, 2026

Summary

  • Simplify the "Add Workspace" button in the sidebar by removing the dropdown menu
  • Clicking the "+" button now directly opens the New Workspace modal instead of showing a dropdown with "New Workspace" and "Quick Create" options

Summary by CodeRabbit

  • Refactor
    • Simplified workspace creation interface by replacing the dropdown menu with a straightforward button and tooltip
    • Removed Quick Create feature; workspace creation now exclusively uses the dedicated modal for a more direct workflow

✏️ Tip: You can customize this high-level summary in your review settings.

Replace the dropdown menu with a simple button that directly opens
the New Workspace modal, removing the Quick Create option.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

The PR simplifies workspace creation UI by removing the dropdown-based flow with Quick Create functionality. A single button now triggers the New Workspace modal directly, eliminating associated state management and handlers from ProjectHeader and ProjectSection components.

Changes

Cohort / File(s) Summary
Workspace Creation UI Simplification
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx, apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectSection.tsx
Removed dropdown menu UI components, Quick Create flow, and related state props (onQuickCreate, isCreating, dropdownOpen, onDropdownOpenChange). Replaced with a tooltip-wrapped button that directly invokes onNewWorkspace to open the workspace creation modal. Eliminated useCreateWorkspace query hook and dropdown state management.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Add dropdown create modal #391 — Modifies the same workspace-creation flow by removing dropdown/quick-create and replacing it with modal-driven New Workspace action in sidebar/header components.
  • refactor (desktop): New workspace button #596 — Refactors workspace "New Workspace" UI by adding NewWorkspaceButton and header refactoring to surface a unified New Workspace control.

Suggested reviewers

  • CharlieHelps

Poem

🐰 Workspace creation, simpler now,
No dropdown clutter, just a bow,
One button opens modal's door,
Clean and swift, we ask no more! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides a summary of changes but lacks the structured template sections (Related Issues, Type of Change, Testing, Screenshots) required by the repository template. Add missing template sections: mark the Type of Change (Refactor), add Related Issues if applicable, describe testing performed, and include any additional context.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main refactoring change: removing the dropdown from the add workspace button, which aligns with the primary change shown in the file summaries.
✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx (1)

211-228: Consider adding aria-label for better accessibility.

The simplified button UI is well-implemented with proper event handling. For improved screen reader accessibility, consider adding an aria-label to the button element, as tooltips may not be immediately announced by assistive technologies.

🔎 Suggested accessibility enhancement
 <TooltipTrigger asChild>
 	<button
 		type="button"
+		aria-label="New workspace"
 		onClick={(e) => {
 			e.stopPropagation();
 			onNewWorkspace();
 		}}
 		onContextMenu={(e) => e.stopPropagation()}
 		className="p-1 rounded hover:bg-muted transition-colors shrink-0 ml-1"
 	>
 		<HiMiniPlus className="size-4 text-muted-foreground" />
 	</button>
 </TooltipTrigger>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce35c5 and d8d9d7a.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectSection.tsx
💤 Files with no reviewable changes (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectSection.tsx
🧰 Additional context used
📓 Path-based instructions (6)
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc
Use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.
For tRPC subscriptions with trpc-electron, ALWAYS use the observable pattern from @trpc/server/observable instead of async generators, as the library explicitly checks isObservable(result) and throws an error otherwise

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use object parameters for functions with 2+ parameters instead of positional arguments
Functions with 2+ parameters should accept a single params object with named properties for self-documentation and extensibility
Use prefixed console logging with context pattern: [domain/operation] message
Extract magic numbers and hardcoded values to named constants at module top
Use lookup objects/maps instead of repeated if (type === ...) conditionals
Avoid using any type - maintain type safety in TypeScript code
Never swallow errors silently - at minimum log them with context
Import from concrete files directly when possible - avoid barrel file abuse that creates circular dependencies
Avoid deep nesting (4+ levels) - use early returns, extract functions, and invert conditions
Use named properties in options objects instead of boolean parameters to avoid boolean blindness

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

One component per file - do not create multi-component files

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Drizzle ORM for all database operations - never use raw SQL

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome for formatting and linting - run at root level with bun run lint:fix or biome check --write

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
🧠 Learnings (1)
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/{ui,ai-elements,react-flow}/*.tsx : Use kebab-case single files for shadcn/ui components (e.g., button.tsx, base-node.tsx) in src/components/ui/, src/components/ai-elements, and src/components/react-flow/

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx
🧬 Code graph analysis (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx (1)
packages/ui/src/components/ui/tooltip.tsx (3)
  • Tooltip (76-76)
  • TooltipTrigger (76-76)
  • TooltipContent (76-76)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (2)
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectHeader.tsx (2)

14-14: LGTM! Import cleanup is correct.

The icon imports correctly reflect the simplified UI – only the plus icon remains for the add workspace button, with dropdown-related icons removed.


26-39: LGTM! Props interface correctly simplified.

The removal of dropdown-related props (onQuickCreate, isCreating, dropdownOpen, onDropdownOpenChange) correctly reflects the simplified workspace creation flow. The interface now contains only the essential props needed for the direct button approach.

@Kitenite Kitenite merged commit 11c2641 into main Jan 7, 2026
5 checks passed
@Kitenite Kitenite deleted the remove-quick-create-dropdown branch January 7, 2026 02:09
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant