fix(header): inactive-tab rename actually starts; snappier tab state change
Rename from another tab's menu stored only a boolean that the session-switch reset effect wiped before the menu finished closing, so the tab activated but rename never began. The pending rename now carries the target session id and begins exactly when that session becomes active (whether the menu closes before or after the switch), without the reset effect cancelling it — and without an in-flight rename being cancelled by unrelated re-renders. Tab background/text state changes animate at 75ms so activation reads immediate.
This commit is contained in:
@@ -222,10 +222,11 @@ const SessionTabItem: React.FC<{
|
||||
data-controls-open={overlayVisible ? 'true' : 'false'}
|
||||
className={cn(
|
||||
'session-tab group/session-tab relative flex h-7 w-full min-w-0 select-none items-center rounded-md px-2',
|
||||
'transition-colors duration-75',
|
||||
isActive
|
||||
? 'bg-interactive-selection'
|
||||
: cn(
|
||||
'cursor-pointer text-muted-foreground transition-colors duration-150 hover:bg-interactive-hover hover:text-foreground',
|
||||
'cursor-pointer text-muted-foreground hover:bg-interactive-hover hover:text-foreground',
|
||||
overlayVisible && 'bg-interactive-hover text-foreground',
|
||||
),
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user