fix(sidebar): keep the pin visible on the chat you're viewing - #6377
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview In In Reviewed by Cursor Bugbot for commit b192064. Configure here. |
Greptile SummaryThe PR aligns status-dot behavior between the collapsed and expanded sidebars while keeping the pin visible for the currently viewed chat.
Confidence Score: 5/5The 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.
|
| 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
Summary
!isCurrentRouteterm, 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.showStatusDotonce and express the pin as its negation, so the two conditions in that slot can't drift apart again.isCurrentRoutetoConversationListItem, so the chat you were already reading showed an unread dot there but not in the expanded sidebar. Same chat, same data, two answers.transition-opacitymechanism the dot uses, instead ofgroup-hover:hiddenplus 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
Testing
bun run type-checkandbiome checkpass. 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)
SidebarChatItemduplicates the dot thatConversationListItemalready owns for two other call sites, including an identically-namedshowStatusDotconst 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.#EAB308is a raw hex in exactly two files repo-wide (here andconversation-list-item.tsx); it wants a real token.Checklist