Skip to content

Consolidate top bar item into avatar dropdown#506

Merged
Kitenite merged 3 commits into
mainfrom
male-rodent-8a04e1
Dec 25, 2025
Merged

Consolidate top bar item into avatar dropdown#506
Kitenite merged 3 commits into
mainfrom
male-rodent-8a04e1

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 25, 2025

  • add account dropdown

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

Release Notes

  • New Features

    • Added user avatar dropdown menu in the top-right corner with profile information, settings access, keyboard shortcuts, and contact options.
  • UI Updates

    • Consolidated Help menu functionality into the avatar dropdown, featuring Discord, X, and Email contact links.
    • Repositioned workspace action bar above the content area.
    • Contact Us action now opens your email client.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 25, 2025

📝 Walkthrough

Walkthrough

This PR consolidates Help menu functionality from a standalone HelpMenu component into a new AvatarDropdown component, removes the WorkspaceFooter component in favor of a repositioned WorkspaceActionBar, updates the TopBar to use AvatarDropdown instead of SettingsButton, and modifies COMPANY constants to replace CONTACT_URL with X_URL and MAIL_TO.

Changes

Cohort / File(s) Summary
Avatar Dropdown (New)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx, AvatarDropdown/index.ts
New React component with dropdown menu combining user avatar, settings, keyboard shortcuts, contact options (Discord, X, Email), report issue action, sign out functionality, and user info display. Replaces SettingsButton in TopBar.
Help Menu (Deleted)
apps/desktop/src/renderer/screens/main/components/HelpMenu/HelpMenu.tsx, HelpMenu/index.ts
Removed entire component including handlers for contact, report issue, join Discord, and view hotkeys; functionality migrated to AvatarDropdown.
TopBar
apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
Replaced SettingsButton import and usage with AvatarDropdown; layout and conditional rendering unchanged.
Workspace Action Bar (New)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx, WorkspaceActionBar/index.ts, WorkspaceActionBar/components/WorkspaceActionBarLeft/..., WorkspaceActionBar/components/WorkspaceActionBarRight/...
New component replacing WorkspaceFooter, positioned higher in right pane. Renamed from Footer to ActionBar; removed HelpMenu usage from left section; renamed interface WorkspaceFooterRightProps to WorkspaceActionBarRightProps.
Workspace Footer (Deleted)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx, WorkspaceFooter/index.ts, WorkspaceFooter/components/WorkspaceFooterLeft/index.ts, WorkspaceFooter/components/WorkspaceFooterRight/index.ts
Removed footer component and all re-exports; functionality replaced by WorkspaceActionBar.
Workspace View
apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
Replaced WorkspaceFooter import/usage with WorkspaceActionBar; inserted ActionBar above ContentView in right pane.
Constants
packages/shared/src/constants.ts
Removed CONTACT_URL from COMPANY object; added X_URL and MAIL_TO properties.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A menu finds a new home so bright,
In Avatar's dropdown, nestled just right!
Old Footer steps back, as ActionBar takes flight,
Help menus consolidated—what a delightful sight!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is mostly incomplete. Only a single bullet point 'add account dropdown' is provided; all required template sections (Related Issues, Type of Change, Testing) remain empty. Complete the description template by specifying the type of change (Refactor), describing test steps, and linking any related issues.
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 accurately describes the main change: consolidating top bar functionality (HelpMenu, SettingsButton) into a new AvatarDropdown component.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch male-rodent-8a04e1

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c23ccf and 2d1946f.

📒 Files selected for processing (11)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/components/WorkspaceFooterLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/components/WorkspaceFooterRight/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
💤 Files with no reviewable changes (4)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/components/WorkspaceFooterRight/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/components/WorkspaceFooterLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules in renderer process or shared code - use only in main process (src/main/)

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
apps/desktop/src/{main,renderer,preload}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use type-safe IPC communication - define channel types in apps/desktop/src/shared/ipc-channels.ts before implementing handlers

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
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/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
🧠 Learnings (3)
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules in renderer process or shared code - use only in main process (src/main/)

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to **/{components,features}/**/[!.]*.tsx : Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to src/components/{ui,ai-elements,react-flow}/**/*.tsx : Use kebab-case single files for shadcn/ui components in src/components/ui/, src/components/ai-elements, and src/components/react-flow/ directories

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx
🧬 Code graph analysis (2)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts (1)
  • WorkspaceActionBarRight (1-1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx (2)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx (1)
  • WorkspaceActionBarLeft (5-41)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx (1)
  • WorkspaceActionBarRight (52-183)
⏰ 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). (6)
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Web
  • GitHub Check: Build
🔇 Additional comments (9)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/index.ts (1)

1-1: LGTM! Clean barrel export following project structure.

The barrel export properly follows the established pattern of ComponentName/index.ts re-exporting from ComponentName.tsx.

apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/WorkspaceActionBarLeft.tsx (1)

5-41: LGTM! Clean refactoring with consistent naming.

The component renaming from WorkspaceFooterLeft to WorkspaceActionBarLeft is consistent with the broader refactoring. The removal of HelpMenu aligns with the PR objective to consolidate functionality into the AvatarDropdown. The branch display logic remains intact and correct.

apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarLeft/index.ts (1)

1-1: LGTM! Proper barrel export.

Follows the established project pattern for component organization.

apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/index.ts (1)

1-1: LGTM! Standard barrel export.

Properly exposes the WorkspaceActionBar composition component.

apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/components/WorkspaceActionBarRight/WorkspaceActionBarRight.tsx (4)

48-54: LGTM! Consistent renaming throughout.

The interface and component have been properly renamed from WorkspaceFooterRight to WorkspaceActionBarRight, maintaining consistency with the broader refactoring.


30-46: LGTM! Robust path formatting logic.

The formatWorktreePath helper correctly handles path shortening and splits the path into prefix and worktree name, with proper edge case handling when no slash is present.


55-78: LGTM! Proper tRPC integration.

The component correctly uses tRPC queries for data fetching and mutations for actions, with appropriate cache invalidation on success. The mutation handlers are clean and type-safe.


81-182: LGTM! Well-implemented UI with keyboard shortcuts.

The UI implementation is polished with:

  • Tooltips showing keyboard shortcuts
  • Dropdown menu for app selection with nested JetBrains submenu
  • Visual feedback on hover states
  • Proper accessibility with button types and ARIA-friendly structure
  • Tailwind v4 compatible classes
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceActionBar/WorkspaceActionBar.tsx (1)

8-21: LGTM! Clean composition pattern.

The WorkspaceActionBar component properly composes the left and right action bar components with:

  • Defensive early return when worktreePath is undefined
  • Clean layout using flexbox with proper spacing
  • Correct prop drilling to WorkspaceActionBarRight
  • Tailwind v4 compatible classes

This follows the established pattern for component composition in the project.


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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 25, 2025

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

Service Status
Neon Database (Neon)

Thank you for your contribution! 🎉


Preview resources have been processed for cleanup

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: 1

🧹 Nitpick comments (2)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx (1)

117-120: LGTM! Layout reordering is clean.

The WorkspaceFooter now renders before ContentView in the flex-col container, positioning it at the top of the right pane. The implementation is correct and the reordering aligns with the PR's UI consolidation objectives.

Optional: Consider renaming for semantic clarity

Despite being named "WorkspaceFooter", the component now appears at the top of the workspace view. Consider renaming to better reflect its position and purpose (e.g., WorkspaceToolbar, WorkspaceStatusBar, or WorkspaceHeader) to avoid confusion for future maintainers.

This is purely a semantic improvement and doesn't affect functionality.

apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx (1)

32-34: Consider adding error handling for the sign out mutation.

While the success toast is helpful, users won't receive feedback if sign out fails. Adding an onError handler would improve the user experience.

🔎 Suggested enhancement
 const signOutMutation = trpc.auth.signOut.useMutation({
   onSuccess: () => toast.success("Signed out"),
+  onError: (error) => toast.error(`Failed to sign out: ${error.message}`),
 });
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97a5e88 and 9a190de.

📒 Files selected for processing (10)
  • apps/desktop/src/main/lib/menu.ts
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • apps/desktop/src/renderer/screens/main/components/HelpMenu/HelpMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/HelpMenu/index.ts
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/components/WorkspaceFooterLeft/WorkspaceFooterLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • packages/shared/src/constants.ts
💤 Files with no reviewable changes (3)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/components/WorkspaceFooterLeft/WorkspaceFooterLeft.tsx
  • apps/desktop/src/renderer/screens/main/components/HelpMenu/index.ts
  • apps/desktop/src/renderer/screens/main/components/HelpMenu/HelpMenu.tsx
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/main/lib/menu.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • packages/shared/src/constants.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/main/lib/menu.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • packages/shared/src/constants.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules in renderer process or shared code - use only in main process (src/main/)

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
apps/desktop/src/{main,renderer,preload}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use type-safe IPC communication - define channel types in apps/desktop/src/shared/ipc-channels.ts before implementing handlers

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/main/lib/menu.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
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/AvatarDropdown/AvatarDropdown.tsx
  • apps/desktop/src/main/lib/menu.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
apps/desktop/src/main/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Accept object parameters in IPC handlers - do not use positional parameters in ipcMain.handle()

Files:

  • apps/desktop/src/main/lib/menu.ts
🧠 Learnings (1)
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : For Electron interprocess communication, ALWAYS use tRPC as defined in `src/lib/trpc`

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx
🧬 Code graph analysis (4)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx (6)
apps/desktop/src/renderer/stores/app-state.ts (1)
  • useOpenSettings (68-68)
packages/ui/src/components/ui/sonner.tsx (1)
  • toast (40-40)
packages/shared/src/constants.ts (1)
  • COMPANY (12-24)
packages/ui/src/components/ui/dropdown-menu.tsx (8)
  • DropdownMenu (249-249)
  • DropdownMenuTrigger (251-251)
  • DropdownMenuContent (252-252)
  • DropdownMenuSeparator (259-259)
  • DropdownMenuItem (255-255)
  • DropdownMenuSub (261-261)
  • DropdownMenuSubTrigger (262-262)
  • DropdownMenuSubContent (263-263)
packages/ui/src/components/ui/avatar.tsx (3)
  • Avatar (53-53)
  • AvatarImage (53-53)
  • AvatarFallback (53-53)
packages/ui/src/components/ui/kbd.tsx (2)
  • KbdGroup (28-28)
  • Kbd (28-28)
apps/desktop/src/main/lib/menu.ts (1)
packages/shared/src/constants.ts (1)
  • COMPANY (12-24)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/index.tsx (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx (1)
  • WorkspaceFooter (8-21)
apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx (2)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx (1)
  • AvatarDropdown (29-144)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts (1)
  • AvatarDropdown (1-1)
⏰ 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). (6)
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Admin
  • GitHub Check: Build
🔇 Additional comments (6)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceFooter/WorkspaceFooter.tsx (1)

12-12: LGTM! Minor visual adjustment.

The added top padding aligns with the component's new position in the layout (now rendering before ContentView in the parent).

apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx (1)

71-144: LGTM! Well-structured dropdown implementation.

The component implementation is clean and follows best practices:

  • Proper conditional rendering for user information
  • Accessible trigger button with aria-label
  • Well-organized menu structure with nested submenu for Contact Us
  • Visual keyboard shortcut hints for discoverability
  • Appropriate use of icons and spacing
apps/desktop/src/main/lib/menu.ts (1)

49-49: LGTM! Proper use of shell.openExternal for mailto link.

The change from CONTACT_URL to MAIL_TO aligns with the updated constants, and shell.openExternal correctly handles mailto: URIs in the main process.

apps/desktop/src/renderer/screens/main/components/TopBar/index.tsx (1)

2-2: LGTM! Clean component substitution.

The replacement of SettingsButton with AvatarDropdown is straightforward and maintains the existing layout structure.

Also applies to: 24-24

apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts (1)

1-1: LGTM! Follows component organization guidelines.

The barrel export follows the project guideline for component structure (ComponentName/ComponentName.tsx with index.ts barrel export).

packages/shared/src/constants.ts (1)

19-20: LGTM! Clean constant additions.

The addition of X_URL and MAIL_TO properly supports the new contact flows in the avatar dropdown. The mailto: URI scheme for MAIL_TO is correct and will work properly with shell.openExternal.

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: 1

♻️ Duplicate comments (1)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx (1)

46-60: Replace window.open calls with tRPC external.openUrl mutation for proper Electron IPC.

All four handlers use window.open directly to open external URLs. Per the previous review comment and coding guidelines, these should use the tRPC external.openUrl mutation to ensure type-safe IPC through the main process.

Based on learnings, for Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a190de and 6c23ccf.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

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

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules in renderer process or shared code - use only in main process (src/main/)

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
apps/desktop/src/{main,renderer,preload}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use type-safe IPC communication - define channel types in apps/desktop/src/shared/ipc-channels.ts before implementing handlers

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
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/AvatarDropdown/AvatarDropdown.tsx
🧠 Learnings (5)
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : For Electron interprocess communication, ALWAYS use tRPC as defined in `src/lib/trpc`

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to apps/desktop/src/{main,renderer,preload}/**/*.{ts,tsx} : Use type-safe IPC communication - define channel types in apps/desktop/src/shared/ipc-channels.ts before implementing handlers

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : 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

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to apps/desktop/src/main/**/*.ts : Accept object parameters in IPC handlers - do not use positional parameters in ipcMain.handle()

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules in renderer process or shared code - use only in main process (src/main/)

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
🧬 Code graph analysis (1)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx (6)
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/index.ts (1)
  • AvatarDropdown (1-1)
apps/desktop/src/renderer/stores/app-state.ts (1)
  • useOpenSettings (68-68)
packages/shared/src/constants.ts (1)
  • COMPANY (12-24)
packages/ui/src/components/ui/dropdown-menu.tsx (8)
  • DropdownMenu (249-249)
  • DropdownMenuTrigger (251-251)
  • DropdownMenuContent (252-252)
  • DropdownMenuSeparator (259-259)
  • DropdownMenuItem (255-255)
  • DropdownMenuSub (261-261)
  • DropdownMenuSubTrigger (262-262)
  • DropdownMenuSubContent (263-263)
packages/ui/src/components/ui/avatar.tsx (3)
  • Avatar (53-53)
  • AvatarImage (53-53)
  • AvatarFallback (53-53)
apps/desktop/src/shared/hotkeys.ts (1)
  • HOTKEYS (65-217)
⏰ 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). (6)
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Web
  • GitHub Check: Build

Comment on lines +35 to +40
const initials = user?.name
?.split(" ")
.map((n) => n[0])
.join("")
.toUpperCase()
.slice(0, 2);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix optional chaining to prevent runtime error when user name is missing.

The optional chaining stops at ?.split(" "), but subsequent .map(), .join(), etc. are called unconditionally. If user?.name is nullish, ?.split(" ") returns undefined, and then .map() throws a TypeError.

🔎 Proposed fix
-const initials = user?.name
-  ?.split(" ")
-  .map((n) => n[0])
-  .join("")
-  .toUpperCase()
-  .slice(0, 2);
+const initials = user?.name
+  ?.split(" ")
+  .map((n) => n[0])
+  .join("")
+  .toUpperCase()
+  .slice(0, 2) ?? undefined;

Better approach:

-const initials = user?.name
-  ?.split(" ")
-  .map((n) => n[0])
-  .join("")
-  .toUpperCase()
-  .slice(0, 2);
+const initials = user?.name
+  ? user.name
+      .split(" ")
+      .map((n) => n[0])
+      .join("")
+      .toUpperCase()
+      .slice(0, 2)
+  : undefined;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const initials = user?.name
?.split(" ")
.map((n) => n[0])
.join("")
.toUpperCase()
.slice(0, 2);
const initials = user?.name
? user.name
.split(" ")
.map((n) => n[0])
.join("")
.toUpperCase()
.slice(0, 2)
: undefined;
🤖 Prompt for AI Agents
In
apps/desktop/src/renderer/screens/main/components/AvatarDropdown/AvatarDropdown.tsx
around lines 35-40, the optional chaining only guards .split() so when
user?.name is nullish the subsequent .map/.join calls will throw; change the
expression to ensure you operate on a string (e.g., default user?.name to an
empty string or early-return) before calling split/map/join/toUpperCase/slice so
the chain always runs on a string and returns an empty initials string when name
is missing.

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