From 059327f0e58d2ddd0cbfc2c540bf52918f12c543 Mon Sep 17 00:00:00 2001 From: Kainoa Date: Sun, 14 Dec 2025 16:58:19 -0800 Subject: [PATCH 1/9] feat(ui): replace terminal tabs with dropdown selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Convert Worktree/Global button tabs to Select dropdown component - Add visual icons (TreePine for Worktree, Globe for Global) - Improve space utilization and modernize terminal interface - Maintain all existing functionality and disabled states - Adjust dropdown width to accommodate icons and full text 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../components/WorkspaceTerminalPanel.tsx | 82 ++++++++++++------- 1 file changed, 54 insertions(+), 28 deletions(-) diff --git a/src/renderer/components/WorkspaceTerminalPanel.tsx b/src/renderer/components/WorkspaceTerminalPanel.tsx index d197ba2b..18e29219 100644 --- a/src/renderer/components/WorkspaceTerminalPanel.tsx +++ b/src/renderer/components/WorkspaceTerminalPanel.tsx @@ -1,10 +1,17 @@ import React, { useMemo, useState, useEffect } from 'react'; import { TerminalPane } from './TerminalPane'; -import { Bot, Terminal, Plus, X } from 'lucide-react'; +import { Bot, Terminal, Plus, X, TreePine, Globe } from 'lucide-react'; import { useTheme } from '../hooks/useTheme'; import { useWorkspaceTerminals } from '@/lib/workspaceTerminalsStore'; import { cn } from '@/lib/utils'; import type { Provider } from '../types'; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select'; interface Workspace { id: string; @@ -171,34 +178,53 @@ const WorkspaceTerminalPanelComponent: React.FC = ({
-
{terminals.map((terminal) => { From 9ce6b80e7d21cf70f81887c853de9c1b0e8b685a Mon Sep 17 00:00:00 2001 From: Kainoa Date: Sun, 14 Dec 2025 18:59:45 -0800 Subject: [PATCH 2/9] fix: add missing accessibility elements to terminal scope selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add proper screen reader-only descriptions for ARIA attributes: - terminal-scope-description: explains the selector's purpose - workspace-disabled-reason: explains when workspace option is disabled - global-disabled-reason: explains when global option is disabled This resolves accessibility violations where aria-describedby referenced non-existent elements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../components/WorkspaceTerminalPanel.tsx | 44 ++++++++++++++----- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/src/renderer/components/WorkspaceTerminalPanel.tsx b/src/renderer/components/WorkspaceTerminalPanel.tsx index 18e29219..3bb3e05c 100644 --- a/src/renderer/components/WorkspaceTerminalPanel.tsx +++ b/src/renderer/components/WorkspaceTerminalPanel.tsx @@ -1,10 +1,11 @@ -import React, { useMemo, useState, useEffect } from 'react'; +import React, { useMemo, useState, useEffect, useCallback } from 'react'; import { TerminalPane } from './TerminalPane'; import { Bot, Terminal, Plus, X, TreePine, Globe } from 'lucide-react'; import { useTheme } from '../hooks/useTheme'; import { useWorkspaceTerminals } from '@/lib/workspaceTerminalsStore'; import { cn } from '@/lib/utils'; import type { Provider } from '../types'; +import { captureTelemetry } from '../lib/telemetryClient'; import { Select, SelectContent, @@ -39,6 +40,12 @@ const WorkspaceTerminalPanelComponent: React.FC = ({ const workspaceTerminals = useWorkspaceTerminals(workspaceKey, workspace?.path); const globalTerminals = useWorkspaceTerminals('global', projectPath, { defaultCwd: projectPath }); const [mode, setMode] = useState<'workspace' | 'global'>(workspace ? 'workspace' : 'global'); + + const handleModeChange = useCallback((value: string) => { + if (value === 'workspace' || value === 'global') { + setMode(value); + } + }, []); useEffect(() => { if (!workspace && mode === 'workspace') { setMode('global'); @@ -177,11 +184,28 @@ const WorkspaceTerminalPanelComponent: React.FC = ({ return (
+ {/* Screen reader-only accessibility descriptions */} + + Choose between workspace-specific or global terminal scope + + {!workspace && ( + + Workspace terminal requires an active workspace + + )} + {!projectPath && ( + + Global terminal requires a project path + + )} +