From 29119e1d6de2f5d40bb5207099889245acd5accd Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:56:57 -0700 Subject: [PATCH] fix: resolve TypeScript build errors for unused variable and return type (#71) Remove unused `paneTransportsRef` from context menu hook and fix `EditorPanel` return type to allow `null`. Co-authored-by: Claude Opus 4.6 --- src/renderer/src/components/editor/EditorPanel.tsx | 2 +- src/renderer/src/components/terminal-pane/TerminalPane.tsx | 1 - .../terminal-pane/use-terminal-pane-context-menu.ts | 4 ---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/renderer/src/components/editor/EditorPanel.tsx b/src/renderer/src/components/editor/EditorPanel.tsx index e3e5a53b3..e3d1e7b46 100644 --- a/src/renderer/src/components/editor/EditorPanel.tsx +++ b/src/renderer/src/components/editor/EditorPanel.tsx @@ -16,7 +16,7 @@ type DiffContent = { modifiedContent: string } -export default function EditorPanel(): React.JSX.Element { +export default function EditorPanel(): React.JSX.Element | null { const openFiles = useAppStore((s) => s.openFiles) const activeFileId = useAppStore((s) => s.activeFileId) const markFileDirty = useAppStore((s) => s.markFileDirty) diff --git a/src/renderer/src/components/terminal-pane/TerminalPane.tsx b/src/renderer/src/components/terminal-pane/TerminalPane.tsx index 80f7d9d50..7443582c4 100644 --- a/src/renderer/src/components/terminal-pane/TerminalPane.tsx +++ b/src/renderer/src/components/terminal-pane/TerminalPane.tsx @@ -192,7 +192,6 @@ export default function TerminalPane({ const contextMenu = useTerminalPaneContextMenu({ managerRef, - paneTransportsRef, toggleExpandPane }) diff --git a/src/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.ts b/src/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.ts index 4e97b38ce..b59efc6b1 100644 --- a/src/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.ts +++ b/src/renderer/src/components/terminal-pane/use-terminal-pane-context-menu.ts @@ -1,12 +1,9 @@ import { useEffect, useRef, useState } from 'react' import type { ManagedPane, PaneManager } from '@/lib/pane-manager/pane-manager' -import type { PtyTransport } from './pty-transport' - const CLOSE_ALL_CONTEXT_MENUS_EVENT = 'orca-close-all-context-menus' type UseTerminalPaneContextMenuDeps = { managerRef: React.RefObject - paneTransportsRef: React.RefObject> toggleExpandPane: (paneId: number) => void } @@ -29,7 +26,6 @@ type TerminalMenuState = { export function useTerminalPaneContextMenu({ managerRef, - paneTransportsRef, toggleExpandPane }: UseTerminalPaneContextMenuDeps): TerminalMenuState { const contextPaneIdRef = useRef(null)