From c89d21189a573406a9f2098cbe2801224ef9329d Mon Sep 17 00:00:00 2001 From: "hermes-seaeye[bot]" <307254004+hermes-seaeye[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 00:21:21 +0000 Subject: [PATCH] fmt(js): `npm run fix` on merge (#72992) Co-authored-by: github-actions[bot] --- .../chat/composer/status-stack/coding-row.tsx | 8 ++++++- .../chat/sidebar/projects/project-menu.tsx | 24 ++++++++++++++++--- .../app/chat/sidebar/session-actions-menu.tsx | 8 ++++++- .../src/app/settings/env-var-actions-menu.tsx | 8 ++++++- .../src/components/ui/actions-menu.tsx | 19 +++++++++++---- 5 files changed, 57 insertions(+), 10 deletions(-) diff --git a/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx b/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx index 4ffc400a6525..14cb89d3ddcd 100644 --- a/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx +++ b/apps/desktop/src/app/chat/composer/status-stack/coding-row.tsx @@ -3,7 +3,13 @@ import { memo, useEffect, useRef, useState } from 'react' import { WorktreeDialog } from '@/app/chat/sidebar/projects/worktree-dialog' import { StatusRow } from '@/components/chat/status-row' -import { type ActionItemSpec, ActionsContextMenu, ActionsMenu, type MenuKit, renderActionItem } from '@/components/ui/actions-menu' +import { + type ActionItemSpec, + ActionsContextMenu, + ActionsMenu, + type MenuKit, + renderActionItem +} from '@/components/ui/actions-menu' import { Button } from '@/components/ui/button' import { Codicon } from '@/components/ui/codicon' import { DiffCount } from '@/components/ui/diff-count' diff --git a/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx b/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx index 801702bc5c76..f601007c7e38 100644 --- a/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx +++ b/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx @@ -2,7 +2,13 @@ import { useStore } from '@nanostores/react' import type * as React from 'react' import { useState } from 'react' -import { type ActionItemSpec, ActionsContextMenu, DROPDOWN_KIT, type MenuKit, renderActionItem } from '@/components/ui/actions-menu' +import { + type ActionItemSpec, + ActionsContextMenu, + DROPDOWN_KIT, + type MenuKit, + renderActionItem +} from '@/components/ui/actions-menu' import { Codicon } from '@/components/ui/codicon' import { ConfirmDialog } from '@/components/ui/confirm-dialog' import { @@ -98,7 +104,13 @@ function useProjectActions({ label: p.reveal, onSelect: () => void revealPath(project.path) }, - { disabled: !project.path, icon: 'copy', key: 'copy', label: p.copyPath, onSelect: () => void copyPath(project.path) } + { + disabled: !project.path, + icon: 'copy', + key: 'copy', + label: p.copyPath, + onSelect: () => void copyPath(project.path) + } ] const dangerItem: ActionItemSpec = project.isAuto @@ -286,7 +298,13 @@ interface ProjectContextMenuProps { // Wrap a project row so right-clicking it opens the same actions as its kebab. // The kebab's row-anchored Appearance popover can't nest in a context menu, so // here Appearance is a submenu with the same swatch + icon picker. -export function ProjectContextMenu({ project, isActive, scoped = false, onExitScope, children }: ProjectContextMenuProps) { +export function ProjectContextMenu({ + project, + isActive, + scoped = false, + onExitScope, + children +}: ProjectContextMenuProps) { const { t } = useI18n() const p = t.sidebar.projects diff --git a/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx b/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx index 47095263e723..f8049b07509b 100644 --- a/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx +++ b/apps/desktop/src/app/chat/sidebar/session-actions-menu.tsx @@ -8,7 +8,13 @@ import { closeTreeTabsToRight, treeTabCloseTargets } from '@/components/pane-shell/tree/store' -import { type ActionItemSpec, ActionsContextMenu, ActionsMenu, type MenuKit, renderActionItem } from '@/components/ui/actions-menu' +import { + type ActionItemSpec, + ActionsContextMenu, + ActionsMenu, + type MenuKit, + renderActionItem +} from '@/components/ui/actions-menu' import { Button } from '@/components/ui/button' import { Codicon } from '@/components/ui/codicon' import { ColorSwatches } from '@/components/ui/color-swatches' diff --git a/apps/desktop/src/app/settings/env-var-actions-menu.tsx b/apps/desktop/src/app/settings/env-var-actions-menu.tsx index df010ca24aec..73e3833acf1d 100644 --- a/apps/desktop/src/app/settings/env-var-actions-menu.tsx +++ b/apps/desktop/src/app/settings/env-var-actions-menu.tsx @@ -1,6 +1,12 @@ import type * as React from 'react' -import { type ActionItemSpec, ActionsContextMenu, ActionsMenu, type MenuKit, renderActionItem } from '@/components/ui/actions-menu' +import { + type ActionItemSpec, + ActionsContextMenu, + ActionsMenu, + type MenuKit, + renderActionItem +} from '@/components/ui/actions-menu' import { Button } from '@/components/ui/button' import { Codicon } from '@/components/ui/codicon' import { Tip } from '@/components/ui/tooltip' diff --git a/apps/desktop/src/components/ui/actions-menu.tsx b/apps/desktop/src/components/ui/actions-menu.tsx index 2aa7f7d07734..99a6b2e32394 100644 --- a/apps/desktop/src/components/ui/actions-menu.tsx +++ b/apps/desktop/src/components/ui/actions-menu.tsx @@ -80,7 +80,10 @@ export interface ActionItemSpec { } /** Render one `ActionItemSpec` with the given kit's Item component. */ -export function renderActionItem(kit: MenuKit, { className, disabled, icon, iconNode, key, label, onSelect, variant }: ActionItemSpec) { +export function renderActionItem( + kit: MenuKit, + { className, disabled, icon, iconNode, key, label, onSelect, variant }: ActionItemSpec +) { return ( , 'align' | 'side' | 'sideOffset'> { +interface ActionsMenuProps extends Pick< + React.ComponentProps, + 'align' | 'side' | 'sideOffset' +> { /** The trigger (a kebab button). Wrapped in `DropdownMenuTrigger asChild`. */ children: React.ReactNode /** The action rows, rendered with `DROPDOWN_KIT`. Share this with `ActionsContextMenu`. */ @@ -161,7 +166,13 @@ interface ActionsContextMenuProps { * Wrap a row so right-clicking it opens the same menu as its kebab. Pass the * kebab's `items` render function so both surfaces mirror each other. */ -export function ActionsContextMenu({ ariaLabel, children, contentClassName, disabled, items }: ActionsContextMenuProps) { +export function ActionsContextMenu({ + ariaLabel, + children, + contentClassName, + disabled, + items +}: ActionsContextMenuProps) { if (disabled) { return <>{children} }