@devries-cameron20 / t3code-1 / commits / 80fcb7f58f
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): boring sidebar folders put your latest message on top (#26391)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Theo Browne committed Oct 28, 2026 at 03:24 UTC 80fcb7f58f90b43ba5918383cbe38d3ae804da8e
1 file changed +9 -3
apps/web/src/components/Sidebar.tsx
+9 -3
@@ -337,6 +337,8 @@ interface SidebarThreadPartitionInput {
337 readonly serverConfigs: ReadonlyMap<EnvironmentId, EnvironmentServerConfig>;
338 readonly optimisticDrop: SidebarOptimisticDrop | null;
339 readonly workingShelfEnabled: boolean;
340 + /** Boring mode: folders list active threads by the user's latest message. */
341 + readonly sortActiveBySend: boolean;
342 // Snooze wakes, the queued-turn grace and the Working shelf's exit grace depend
343 // on the clock, so the minute tick, the precise snooze-wake tick and the inbox
344 // tracker's expiry version are inputs: a new key repartitions.
@@ -458,6 +460,7 @@ function useSidebarThreads(input: {
460 serverConfigs,
461 optimisticDrop,
462 workingShelfEnabled,
463 + sortActiveBySend: folderGroups !== null,
464 clockKey: `${nowMinute}:${snoozeWakeClock}:${inboxReturnsVersion}`,
465 });
466
@@ -592,6 +595,7 @@ function partitionSidebarThreads(input: SidebarThreadPartitionInput) {
595 serverConfigs,
596 optimisticDrop,
597 workingShelfEnabled,
598 + sortActiveBySend,
599 } = input;
600 const preciseNow = new Date().toISOString();
601 const visible = filterSidebarV2VisibleThreads(threads, scopedProjectKeys, delegatedUnderParent);
@@ -650,9 +654,11 @@ function partitionSidebarThreads(input: SidebarThreadPartitionInput) {
654 }
655 // A loaded config gates dragging only; the sort must not depend on it, so web and mobile agree.
656 const sortedPinned = sortPinnedThreadsForSidebar(pinned);
653 - const sortedActive = workingShelfEnabled
654 - ? sortInboxThreadsByReturn(active, inboxObservation.returnedAt)
655 - : sortThreadsForSidebar(active);
657 + const sortedActive = sortActiveBySend
658 + ? sortWorkingThreadsBySend(active)
659 + : workingShelfEnabled
660 + ? sortInboxThreadsByReturn(active, inboxObservation.returnedAt)
661 + : sortThreadsForSidebar(active);
662 return {
663 pinnedThreads:
664 optimisticDrop?.section !== "pinned" || optimisticDrop.order === null