diff --git a/frontend/src/components/ui-new/actions/index.ts b/frontend/src/components/ui-new/actions/index.ts index a3cd6366..646ec09e 100644 --- a/frontend/src/components/ui-new/actions/index.ts +++ b/frontend/src/components/ui-new/actions/index.ts @@ -1,4 +1,5 @@ -import type { Icon } from '@phosphor-icons/react'; +import { forwardRef, createElement } from 'react'; +import type { Icon, IconProps } from '@phosphor-icons/react'; import type { NavigateFunction } from 'react-router-dom'; import type { QueryClient } from '@tanstack/react-query'; import type { EditorType, ExecutionProcess, Workspace } from 'shared/types'; @@ -50,6 +51,17 @@ import { getIdeName } from '@/components/ide/IdeIcon'; import { EditorSelectionDialog } from '@/components/dialogs/tasks/EditorSelectionDialog'; import { StartReviewDialog } from '@/components/dialogs/tasks/StartReviewDialog'; +// Mirrored sidebar icon for right sidebar toggle +const RightSidebarIcon: Icon = forwardRef( + (props, ref) => + createElement(SidebarSimpleIcon, { + ref, + ...props, + style: { transform: 'scaleX(-1)', ...props.style }, + }) +); +RightSidebarIcon.displayName = 'RightSidebarIcon'; + // Special icon types for ContextBar export type SpecialIconType = 'ide-icon' | 'copy-icon'; export type ActionIcon = Icon | SpecialIconType; @@ -440,7 +452,7 @@ export const Actions = { useLayoutStore.getState().isGitPanelVisible ? 'Hide Git Panel' : 'Show Git Panel', - icon: SidebarSimpleIcon, + icon: RightSidebarIcon, requiresTarget: false, isActive: (ctx) => ctx.isGitPanelVisible, execute: () => {