diff --git a/src/components/TerminalsView/components/CustomTabBar.tsx b/src/components/TerminalsView/components/CustomTabBar.tsx index 4c0e348b..2a2791df 100644 --- a/src/components/TerminalsView/components/CustomTabBar.tsx +++ b/src/components/TerminalsView/components/CustomTabBar.tsx @@ -7,7 +7,6 @@ import type { CustomTab, ActiveTab } from '../types'; interface CustomTabBarProps { tabs: CustomTab[]; activeTab: ActiveTab; - canCreateTab: boolean; onSelectTab: (tabId: string) => void; onCreateTab: (name: string) => void; onDeleteTab: (tabId: string) => void; @@ -18,7 +17,6 @@ interface CustomTabBarProps { export default function CustomTabBar({ tabs, activeTab, - canCreateTab, onSelectTab, onCreateTab, onDeleteTab, @@ -181,50 +179,48 @@ export default function CustomTabBar({ ))} {/* Create tab button + dialog */} - {canCreateTab && ( -
- +
+ - {showCreateDialog && ( -
-

Board name

- setCreateName(e.target.value)} - onKeyDown={handleCreateKeyDown} - placeholder="e.g. Frontend, Backend..." - className="w-full px-2 py-1.5 bg-secondary border border-border text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-white/30 mb-2" - maxLength={20} - /> -
- - -
+ {showCreateDialog && ( +
+

Board name

+ setCreateName(e.target.value)} + onKeyDown={handleCreateKeyDown} + placeholder="e.g. Frontend, Backend..." + className="w-full px-2 py-1.5 bg-secondary border border-border text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-white/30 mb-2" + maxLength={20} + /> +
+ +
- )} -
- )} +
+ )} +
); } diff --git a/src/components/TerminalsView/hooks/useTabManager.ts b/src/components/TerminalsView/hooks/useTabManager.ts index cf68a487..0ad80a03 100644 --- a/src/components/TerminalsView/hooks/useTabManager.ts +++ b/src/components/TerminalsView/hooks/useTabManager.ts @@ -6,7 +6,6 @@ import { LAYOUT_PRESETS, getAutoLayout } from '../constants'; import { deleteTabLayouts } from './useGridLayoutStorage'; const STORAGE_KEY = 'terminals-tab-manager'; -const MAX_TABS = 6; interface TabManagerState { customTabs: CustomTab[]; @@ -87,7 +86,6 @@ export function useTabManager({ existingAgentIds, isLoading }: UseTabManagerOpti const createTab = useCallback((name: string) => { setState(prev => { - if (prev.customTabs.length >= MAX_TABS) return prev; const newTab: CustomTab = { id: crypto.randomUUID(), name: name || `Tab ${prev.customTabs.length + 1}`, @@ -208,7 +206,6 @@ export function useTabManager({ existingAgentIds, isLoading }: UseTabManagerOpti const isCustomTabActive = state.activeTab.type === 'custom'; const isProjectTabActive = state.activeTab.type === 'project'; - const canCreateTab = state.customTabs.length < MAX_TABS; return { customTabs: state.customTabs, @@ -225,6 +222,5 @@ export function useTabManager({ existingAgentIds, isLoading }: UseTabManagerOpti activeProjectPath, isCustomTabActive, isProjectTabActive, - canCreateTab, }; } diff --git a/src/components/TerminalsView/index.tsx b/src/components/TerminalsView/index.tsx index 5ca44397..de8c35df 100644 --- a/src/components/TerminalsView/index.tsx +++ b/src/components/TerminalsView/index.tsx @@ -344,7 +344,6 @@ export default function TerminalsView() { tabManager.setActiveTab({ type: 'custom', tabId })} onCreateTab={tabManager.createTab} onDeleteTab={tabManager.deleteTab}