feat(sidebar): pin chats within projects #4047
Closed12ya(GitHub profile, opens in a new tab)wants to merge 15 commits into
main fromrefs/pull/4047/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- apps/web/src/components/Sidebar.tsx line 1170OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -978,0 +1150,21 @@1150+1151+ const handleThreadDragEnd = useCallback(1152+ (event: DragEndEvent) => {1153+ const activeThreadKey = String(event.active.id);1154+ const action = dragFlowRef.current;1155+ setIsThreadDragActive(false);1156+ updateDragFlow(null);1157+ if (action !== null) {1158+ toggleThreadPinned(activeThreadKey, action === "pin");1159+ }1160+ },1161+ [toggleThreadPinned, updateDragFlow],1162+ );1163+ const renderedPinnedThreads = renderedThreads.filter((thread) =>1164+ pinnedThreadKeys.includes(scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id))),1165+ );1166+ const renderedRegularThreads = renderedThreads.filter(1167+ (thread) =>1168+ !pinnedThreadKeys.includes(scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id))),1169+ );1170+ const pinnedDividerOverlayEdge =
- apps/web/src/components/Sidebar.tsx line 1597Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -1317,8 +1561,12 @@13171561 },13181562 });13191563 };1320- const hasOverflowingThreads = visibleProjectThreads.length > sidebarThreadPreviewCount;1321- const previewThreads =1322- isThreadListExpanded || !hasOverflowingThreads1323- ? visibleProjectThreads1324- : visibleProjectThreads.slice(0, sidebarThreadPreviewCount);1564+ const threadPreview = getVisibleThreadsForProject({1565+ threads: visibleProjectThreads,1566+ activeThreadId: activeRouteThreadKey ?? undefined,1567+ isThreadListExpanded,1568+ previewLimit: sidebarThreadPreviewCount,1569+ getThreadId: (thread) => scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id)),1570+ });1571+ const hasOverflowingThreads = threadPreview.hasHiddenThreads;1572+ const previewThreads = threadPreview.visibleThreads;
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
54cdaed2-8d5b-4589-86d0-a057eabb9f7fYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share