diff --git a/src/ui/Desktop/Apps/Terminal/Terminal.tsx b/src/ui/Desktop/Apps/Terminal/Terminal.tsx index 5c4ace5a..ba276730 100644 --- a/src/ui/Desktop/Apps/Terminal/Terminal.tsx +++ b/src/ui/Desktop/Apps/Terminal/Terminal.tsx @@ -720,9 +720,6 @@ export const Terminal = forwardRef( setVisible(true); return () => { - console.log( - `🔴 Terminal UNMOUNTING - this should NOT happen during drag!`, - ); isUnmountingRef.current = true; shouldNotReconnectRef.current = true; isReconnectingRef.current = false; @@ -745,21 +742,10 @@ export const Terminal = forwardRef( }, [xtermRef, terminal]); useEffect(() => { - console.log(`📡 Terminal connection useEffect triggered:`, { - terminal: !!terminal, - hostConfig: !!hostConfig, - visible, - isConnected, - isConnecting, - }); - if (!terminal || !hostConfig || !visible) return; if (isConnected || isConnecting) return; - console.log( - `🔌 Initiating NEW connection - this should only happen on mount!`, - ); setIsConnecting(true); const readyFonts = diff --git a/src/ui/Desktop/Navigation/AppView.tsx b/src/ui/Desktop/Navigation/AppView.tsx index e5e7c72f..6a40a5cd 100644 --- a/src/ui/Desktop/Navigation/AppView.tsx +++ b/src/ui/Desktop/Navigation/AppView.tsx @@ -133,23 +133,10 @@ export function AppView({ const isJustReorder = !lengthChanged && tabIdsChanged && !currentTabChanged && !splitChanged; - console.log("AppView useEffect:", { - lengthChanged, - currentTabChanged, - splitChanged, - tabIdsChanged, - isJustReorder, - willCallHideThenFit: - (lengthChanged || currentTabChanged || splitChanged) && !isJustReorder, - }); - if ( (lengthChanged || currentTabChanged || splitChanged) && !isJustReorder ) { - console.log( - "CALLING hideThenFit - this will set ready=false and cause Terminal isVisible to become false!", - ); hideThenFit(); } diff --git a/src/ui/Desktop/Navigation/Tabs/Tab.tsx b/src/ui/Desktop/Navigation/Tabs/Tab.tsx index 719ba7e9..df55ea2b 100644 --- a/src/ui/Desktop/Navigation/Tabs/Tab.tsx +++ b/src/ui/Desktop/Navigation/Tabs/Tab.tsx @@ -16,6 +16,7 @@ interface TabProps { tabType: string; title?: string; isActive?: boolean; + isSplit?: boolean; onActivate?: () => void; onClose?: () => void; onSplit?: () => void; @@ -32,6 +33,7 @@ export function Tab({ tabType, title, isActive, + isSplit = false, onActivate, onClose, onSplit, @@ -47,7 +49,7 @@ export function Tab({ // Firefox-style tab classes using cn utility const tabBaseClasses = cn( - "relative flex items-center gap-1.5 px-3 min-w-fit max-w-[200px]", + "relative flex items-center gap-1.5 px-3 w-full min-w-0", "rounded-t-lg border-t-2 border-l-2 border-r-2", "transition-all duration-150 h-[42px]", isDragOver && @@ -63,10 +65,34 @@ export function Tab({ "bg-background/80 text-muted-foreground border-border hover:bg-background/90", ); + // Helper function to split title into base and suffix + const splitTitle = (fullTitle: string): { base: string; suffix: string } => { + const match = fullTitle.match(/^(.*?)(\s*\(\d+\))$/); + if (match) { + return { base: match[1], suffix: match[2] }; + } + return { base: fullTitle, suffix: "" }; + }; + if (tabType === "home") { return (
-
+
{isServer ? ( ) : isFileManager ? ( @@ -119,7 +145,8 @@ export function Tab({ ) : ( )} - {displayTitle} + {base} + {suffix && {suffix}}
{canSplit && ( @@ -136,7 +163,9 @@ export function Tab({ disableSplit ? t("nav.cannotSplitTab") : t("nav.splitScreen") } > - + )} @@ -159,21 +188,21 @@ export function Tab({ } if (tabType === "ssh_manager") { + const displayTitle = title || t("nav.sshManager"); + const { base, suffix } = splitTitle(displayTitle); + return (
-
- - {title || t("nav.sshManager")} - +
+ {base} + {suffix && {suffix}}
{canClose && ( @@ -195,19 +224,21 @@ export function Tab({ } if (tabType === "admin") { + const displayTitle = title || t("nav.admin"); + const { base, suffix } = splitTitle(displayTitle); + return (
-
- {title || t("nav.admin")} +
+ {base} + {suffix && {suffix}}
{canClose && ( diff --git a/src/ui/Desktop/Navigation/TopNavbar.tsx b/src/ui/Desktop/Navigation/TopNavbar.tsx index 99cb5fc4..4d9d4e8f 100644 --- a/src/ui/Desktop/Navigation/TopNavbar.tsx +++ b/src/ui/Desktop/Navigation/TopNavbar.tsx @@ -486,7 +486,7 @@ export function TopNavbar({ >
{tabs.map((tab: TabData, index: number) => { const isActive = tab.id === currentTab; @@ -601,12 +601,16 @@ export function TopNavbar({ cursor: isDraggingThisTab ? "grabbing" : "grab", userSelect: "none", WebkitUserSelect: "none", + flex: tab.type === "home" ? "0 0 auto" : "1 1 150px", + minWidth: tab.type === "home" ? "auto" : "150px", + display: "flex", }} > handleTabActivate(tab.id)} onClose={ isTerminal ||