Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ export function TerminalSessionDropdown({
};

const triggerTitle = context.pane.titleOverride ?? "Terminal";
const currentSession = sessions.find(
(session) => session.terminalId === terminalId,
);
const currentCreatedAtLabel = formatCreatedAt(currentSession?.createdAt);

return (
<DropdownMenu open={isOpen} onOpenChange={setIsOpen}>
Expand All @@ -215,14 +211,13 @@ export function TerminalSessionDropdown({
type="button"
aria-label="Terminal sessions"
title={triggerTitle}
className="@container/terminal-session flex min-w-0 max-w-full flex-1 items-center gap-1.5 rounded px-1.5 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
className="flex min-w-32 max-w-96 items-center gap-1.5 rounded px-1.5 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
onMouseDown={(event) => event.stopPropagation()}
onClick={(event) => event.stopPropagation()}
>
<TerminalSquare className="size-3.5 shrink-0" />
<span className="min-w-0 truncate">{triggerTitle}</span>
<span className="hidden shrink-0 text-[10px] text-muted-foreground/70 @min-[160px]/terminal-session:inline">
{currentCreatedAtLabel}
<span className="min-w-0 flex-1 truncate text-left">
{triggerTitle}
</span>
{sessionsQuery.isFetching && isOpen ? (
<LoaderCircle className="size-3 shrink-0 animate-spin" />
Expand All @@ -231,7 +226,7 @@ export function TerminalSessionDropdown({
)}
</button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-80">
<DropdownMenuContent align="start" className="w-96">
<DropdownMenuLabel className="text-xs">
Terminal Sessions
</DropdownMenuLabel>
Expand Down Expand Up @@ -269,7 +264,7 @@ export function TerminalSessionDropdown({
<span className="min-w-0 flex-1 truncate text-xs">
{title}
</span>
<span className="shrink-0 text-[10px] text-muted-foreground/70">
<span className="shrink-0 text-xs text-muted-foreground/70">
{createdAtLabel}
</span>
<span className="shrink-0 text-xs text-muted-foreground">
Expand Down
Loading