diff --git a/surfsense_web/atoms/tabs/tabs.atom.ts b/surfsense_web/atoms/tabs/tabs.atom.ts index 3bb06c8e3..dba459cc9 100644 --- a/surfsense_web/atoms/tabs/tabs.atom.ts +++ b/surfsense_web/atoms/tabs/tabs.atom.ts @@ -136,7 +136,7 @@ export const syncChatTabAtom = atom( const newTab: Tab = { id: tabId, type: "chat", - title: title || `Chat ${chatId}`, + title: title || "New Chat", chatId, chatUrl, searchSpaceId, diff --git a/surfsense_web/components/layout/ui/tabs/TabBar.tsx b/surfsense_web/components/layout/ui/tabs/TabBar.tsx index ebb701389..27e87f600 100644 --- a/surfsense_web/components/layout/ui/tabs/TabBar.tsx +++ b/surfsense_web/components/layout/ui/tabs/TabBar.tsx @@ -158,35 +158,41 @@ export function TabBar({ data-tab-id={tab.id} onClick={() => handleTabClick(tab)} className={cn( - "group relative flex h-full items-center px-3 min-w-[120px] max-w-[240px] min-h-0 overflow-hidden text-[13px] font-medium rounded-md transition-all duration-150 shrink-0", + "group relative flex h-full items-center px-3 w-[180px] min-h-0 overflow-hidden text-[13px] font-medium rounded-md transition-colors duration-150 shrink-0", isActive - ? "bg-muted/60 text-foreground" - : "bg-transparent text-muted-foreground hover:bg-muted/30 hover:text-foreground" + ? "bg-muted text-foreground" + : "bg-transparent text-muted-foreground hover:bg-muted/50 hover:text-foreground" )} > - + {tab.title} - {/* biome-ignore lint/a11y/useSemanticElements: cannot nest button inside button */} - handleTabClose(e, tab.id)} - onKeyDown={(e) => { - if (e.key === "Enter" || e.key === " ") { - e.preventDefault(); - handleTabClose(e as unknown as React.MouseEvent, tab.id); - } - }} + {/* Hover-only gradient + close overlay (sidebar pattern) — keeps pill width fixed and avoids ellipsis shift. */} +
- - + {/* biome-ignore lint/a11y/useSemanticElements: cannot nest button inside button */} + handleTabClose(e, tab.id)} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault(); + handleTabClose(e as unknown as React.MouseEvent, tab.id); + } + }} + className="pointer-events-auto rounded-full p-0.5 transition-colors hover:bg-muted-foreground/15" + > + + +
); })}