Skip to content

fix(sidebar): keep the pin visible on the chat you're viewing - #6377

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/sidebar-pin-active-chat
Aug 7, 2026
Merged

fix(sidebar): keep the pin visible on the chat you're viewing#6377
waleedlatif1 merged 1 commit into
stagingfrom
fix/sidebar-pin-active-chat

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Pinned chats lost their pin glyph the moment you opened them. The pin's guard carried a stale !isCurrentRoute term, copy-pasted from the status dot's guard back when the dot was also hidden on the current route — improvement(platform): remove tour, simplify sidebar/header, drop loading skeletons #4354 relaxed the dot's guard and left the pin's byte-identical.
  • Derive showStatusDot once and express the pin as its negation, so the two conditions in that slot can't drift apart again.
  • Collapsed rail never forwarded isCurrentRoute to ConversationListItem, so the chat you were already reading showed an unread dot there but not in the expanded sidebar. Same chat, same data, two answers.
  • Pin now hides by the same transition-opacity mechanism the dot uses, instead of group-hover:hidden plus a mount guard. That asymmetry is what let the guards drift in the first place.

Behavior

The trailing 18px slot holds one glyph. Precedence is unchanged: status dot > pin, and the ... button covers both on hover. So a pinned chat that is currently generating still shows the yellow dot, and the pin returns once it settles — the dot is transient and time-sensitive, the pin is persistent and already implied by the row sorting to the top.

Type of Change

  • Bug fix

Testing

bun run type-check and biome check pass. Not verified in a browser — worth a visual pass on the hover/menu-open states, and on the pin's fade, which is new motion.

Follow-ups (not in this PR)

  • SidebarChatItem duplicates the dot that ConversationListItem already owns for two other call sites, including an identically-named showStatusDot const with a different formula. Folding them together means teaching the shared component about the stacked slot, absolute positioning, and the overlaid ... — too big for a 4-line fix.
  • #EAB308 is a raw hex in exactly two files repo-wide (here and conversation-list-item.tsx); it wants a real token.
  • The collapsed rail renders no pin at all. Feature gap rather than this bug — pinned chats already sort to the head of that list.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

The pin glyph carried a stale `!isCurrentRoute` guard copy-pasted from the
status dot back when the dot was also hidden on the current route. #4354 later
relaxed the dot's guard but left the pin's untouched, so opening a pinned chat
made its pin vanish.

Derive `showStatusDot` once and express the pin as its negation so the two
conditions can no longer drift apart. Also align the collapsed rail, which
never forwarded `isCurrentRoute` and so showed an unread dot on the chat you
were already reading, and hide the pin by the same opacity mechanism the dot
uses instead of a display toggle plus a mount guard.
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 7, 2026 5:16pm

Request Review

@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Localized sidebar presentation logic with no API, auth, or data changes; worth a quick visual check of hover and menu-open states for the pin fade.

Overview
Fixes sidebar chat trailing glyphs so pinned chats stay pinned while you're viewing them, and the collapsed rail matches the expanded list on unread dots.

In SidebarChatItem, a single showStatusDot (active or unread on another route) drives both the status dot and the pin: the pin shows when !showStatusDot && isPinned, removing the stale !isCurrentRoute guard that hid the pin on the open chat. The pin now fades with transition-opacity on menu open and hover, aligned with the dot instead of group-hover:hidden.

In CollapsedChatFlyoutItem, ConversationListItem gets isUnread={!!chat.isUnread && !isCurrentRoute} so the chat you're already on doesn't show an unread dot in the collapsed flyout.

Reviewed by Cursor Bugbot for commit b192064. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns status-dot behavior between the collapsed and expanded sidebars while keeping the pin visible for the currently viewed chat.

  • Derives a shared status-dot condition and renders the pin as its complement.
  • Uses matching opacity transitions for status, pin, and menu glyphs.
  • Suppresses current-route unread state in the collapsed flyout while preserving active-generation status.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete functional or security issues identified.

Active-generation status remains independently visible, current-route unread behavior is consistent across sidebar variants, and the menu button retains control of the shared trailing slot.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/collapsed-sidebar-menu/collapsed-sidebar-menu.tsx Aligns current-route unread suppression with the expanded sidebar while continuing to pass active status independently.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx Unifies status-dot and pin precedence and applies consistent hover/menu opacity behavior without an identified functional regression.

Reviews (1): Last reviewed commit: "fix(sidebar): keep the pin visible on th..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 77649d3 into staging Aug 7, 2026
24 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/sidebar-pin-active-chat branch August 7, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant