Skip to content

feat(tabs): add bulk close options to tab context menu - #306

Merged
letstri merged 6 commits into
mainfrom
feat/context-menu
Jan 23, 2026
Merged

feat(tabs): add bulk close options to tab context menu#306
letstri merged 6 commits into
mainfrom
feat/context-menu

Conversation

@ifeelBALANCED

@ifeelBALANCED ifeelBALANCED commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes

What was changed?

  • Added context menu component (packages/ui/src/components/context-menu.tsx)

    • Created a reusable context menu component using Radix UI primitives
    • Follows Shadcn-style API with consistent styling matching the design system
    • Includes all standard menu components: items, separators, shortcuts, submenus, checkboxes, radio groups
  • Integrated context menu with tabs (apps/desktop/src/routes/_protected/database/$id/table/-components/tabs.tsx)

    • Added right-click functionality to table tabs
    • Implemented multiple tab management options:
      • Close - Close the current tab (with keyboard shortcut display)
      • Close Others - Close all tabs except the current one
      • Close to the Right - Close all tabs to the right of the current tab
      • Close All - Close all open tabs
    • Added intelligent disabled states for options when not applicable
    • Refactored SortableTab component props to use a TypeScript interface for better maintainability

Why was it changed?

  • User experience improvement: Right-click context menus are a standard UI pattern that users expect, especially for tab management
  • Web compatibility: Since the application will have a web version, we needed a web-compatible context menu solution (not native Electron menus)
  • Enhanced tab management: The bulk close options (Close Others, Close to the Right, Close All) provide efficient ways to manage multiple tabs, which is especially useful when working with many database tables
  • Consistency: The context menu component follows the same design patterns as other UI components (dropdown-menu, etc.) ensuring visual and functional consistency

Any related issues or discussions?

This implementation enables right-click functionality on tabs as requested, with support for both desktop and web versions of the application.

Checklist

  • My changes are scoped and focused
  • I have tested the code locally
  • Context menu appears correctly on right-click
  • All close options work as expected
  • Disabled states are properly applied
  • Keyboard shortcuts are displayed correctly for different OS
  • Menu doesn't interfere with tab drag-and-drop functionality

Closes #305

@railway-app

railway-app Bot commented Jan 21, 2026

Copy link
Copy Markdown

This PR was not deployed automatically as @ifeelBALANCED does not have access to the Railway project.

In order to get automatic PR deploys, please add @ifeelBALANCED to your workspace on Railway.

@ifeelBALANCED
ifeelBALANCED requested a review from letstri January 21, 2026 23:28
@ifeelBALANCED ifeelBALANCED changed the title feat(tabs): add bulk close options to tab context menu [Draft] feat(tabs): add bulk close options to tab context menu Jan 22, 2026
@ifeelBALANCED ifeelBALANCED changed the title [Draft] feat(tabs): add bulk close options to tab context menu feat(tabs): add bulk close options to tab context menu Jan 22, 2026

Copilot AI left a comment

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.

Pull request overview

Adds a reusable context menu component to the UI package and wires it into the desktop table tabs to support bulk tab-closing actions via right-click.

Changes:

  • Added @conar/ui ContextMenu component wrapper (Base UI-based) with Shadcn-style subcomponents.
  • Integrated a right-click context menu on table tabs with Close / Close Others / Close to the Right / Close All.
  • Updated workspace dependencies by removing @radix-ui/react-context-menu (and lockfile updates).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Removes Radix context-menu from the catalog and updates built-deps list.
pnpm-lock.yaml Lockfile updates reflecting dependency removals.
packages/ui/src/components/context-menu.tsx Introduces a reusable context menu component API for the design system.
packages/ui/package.json Removes @radix-ui/react-context-menu dependency from @conar/ui.
apps/desktop/src/routes/_protected/database/$id/table/-components/tabs.tsx Adds context menu to tabs and implements bulk close actions + prop refactor.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/ui/src/components/context-menu.tsx
Comment thread apps/desktop/src/components/table/provider.tsx Outdated
@letstri
letstri merged commit cbb2505 into main Jan 23, 2026
1 check passed
@letstri
letstri deleted the feat/context-menu branch January 23, 2026 11:01
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.

Implement global right-click context menu

3 participants