Skip to content
Merged
Show file tree
Hide file tree
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 @@ -300,7 +300,7 @@ export function CollapsedChatFlyoutItem({
<ConversationListItem
title={chat.name}
isActive={!!chat.isActive}
isUnread={!!chat.isUnread}
isUnread={!!chat.isUnread && !isCurrentRoute}
/>
</Link>
</DropdownMenuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ const SidebarChatItem = memo(function SidebarChatItem({
}) {
const dragGhostRef = useRef<HTMLElement | null>(null)

/**
* The trailing slot fits one glyph, and the dot wins over the pin: it reports
* transient state (a run in progress, or an unread reply elsewhere), while pinning
* is persistent and already conveyed by the row sorting to the top of the list.
*/
const showStatusDot = isActive || (!isCurrentRoute && isUnread)

function handleDragStart(e: React.DragEvent) {
e.dataTransfer.effectAllowed = 'copyMove'
e.dataTransfer.setData(
Expand Down Expand Up @@ -238,23 +245,26 @@ const SidebarChatItem = memo(function SidebarChatItem({
>
<div className='min-w-0 flex-1 truncate text-[var(--text-body)]'>{chat.name}</div>
{chat.id !== 'new' && (
<div className='relative flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center'>
{(isActive || (!isCurrentRoute && isUnread)) && (
<div className='relative flex size-[18px] flex-shrink-0 items-center justify-center'>
{showStatusDot && (
<span
aria-hidden='true'
className={cn(
'h-[6px] w-[6px] rounded-full transition-opacity',
'size-[6px] rounded-full transition-opacity',
isMenuOpen ? 'opacity-0' : 'group-hover:opacity-0'
)}
style={{
backgroundColor: isActive ? '#EAB308' : 'var(--brand-accent)',
}}
/>
)}
{!isActive && !isUnread && isPinned && !isCurrentRoute && !isMenuOpen && (
{!showStatusDot && isPinned && (
<Pin
aria-hidden='true'
className='absolute size-[12px] text-[var(--text-icon)] group-hover:hidden'
className={cn(
'absolute size-[12px] text-[var(--text-icon)] transition-opacity',
isMenuOpen ? 'opacity-0' : 'group-hover:opacity-0'
)}
/>
)}
<button
Expand Down
Loading