@devries-cameron20 / t3code Mirror · read-only / commits / 03e135577c
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 02:45 UTC

fix(web): complete thread status icons and keep input threads prominent (#11461)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>

maria committed Sep 12, 2026 at 18:38 UTC 03e135577cbf861c2948981601c070dab038ea11
3 files changed +33 -19
apps/web/src/components/Sidebar.logic.test.ts
+12
@@ -395,6 +395,18 @@ describe("shouldRecedeSidebarThread", () => {
395 expect(shouldRecedeSidebarThread({ ...input, isActive: true })).toBe(false);
396 expect(shouldRecedeSidebarThread({ ...input, isSelected: true })).toBe(false);
397 });
398 +
399 + it.each([false, true])("keeps input-required threads prominent with unread=%s", (isUnread) => {
400 + expect(
401 + shouldRecedeSidebarThread({
402 + status: "input",
403 + isUnread,
404 + isWoke: false,
405 + isActive: false,
406 + isSelected: false,
407 + }),
408 + ).toBe(false);
409 + });
410 });
411
412 describe("createThreadJumpHintVisibilityController", () => {
apps/web/src/components/Sidebar.logic.ts
+2 -2
@@ -803,9 +803,9 @@ export function shouldRecedeSidebarThread(input: {
803 isActive: boolean;
804 isSelected: boolean;
805 }): boolean {
806 - if (input.isActive || input.isSelected) return false;
806 + if (input.isActive || input.isSelected || input.status === "input") return false;
807 if (input.status === "working" || input.status === "monitoring") return true;
808 - if (input.status === "ready" || input.status === "approval" || input.status === "input") {
808 + if (input.status === "ready" || input.status === "approval") {
809 return !input.isUnread && !input.isWoke;
810 }
811 return false;
apps/web/src/components/Sidebar.tsx
+19 -17
@@ -45,12 +45,15 @@ import {
45 CircleCheckIcon,
46 CircleDashedIcon,
47 ClockIcon,
48 + EyeIcon,
49 FolderIcon,
50 GitBranchIcon,
51 + MessageCircleQuestionIcon,
52 PinIcon,
53 PinOffIcon,
54 PlusIcon,
55 SettingsIcon,
56 + ShieldQuestionIcon,
57 SquarePenIcon,
58 TerminalIcon,
59 Undo2Icon,
@@ -1088,8 +1091,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1091 // switching sidebars must not light up every historical thread as unread.
1092 const isUnread = hasUnseenCompletion({ ...thread, lastVisitedAt });
1093 const status = resolveSidebarThreadStatus(thread);
1091 - const isInFlight =
1092 - status === "working" || status === "monitoring" || status === "approval" || status === "input";
1094 // A woken thread reappears at its original position (the sort is
1095 // deliberately static), so the pill has to carry the weight. Snoozing is
1096 // an explicit act, so the pill clears only when the user re-engages:
@@ -1123,35 +1124,32 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1124 icon: "working" as const,
1125 // No shimmer: a label that animates forever is noise in a sidebar
1126 // full of them (and repaints every vsync on high-refresh displays).
1126 - // Working is a background state, so it rests at the dim end of what
1127 - // the old pulse cycled through; only the thread you have open gets
1128 - // the label at full strength.
1129 - className: cn("text-sky-600 dark:text-sky-400", !props.isActive && "opacity-75"),
1127 + className: "text-sky-600 dark:text-sky-400",
1128 }
1129 : status === "monitoring"
1130 ? {
1131 // Monitoring is calm background presence, not active progress
1132 // (monitoring-pill D6), so it keeps the label at full strength.
1133 label: "Monitoring",
1136 - icon: null,
1137 - className: "text-sky-600 dark:text-sky-400",
1134 + icon: "monitoring" as const,
1135 + className: "text-foreground dark:text-white",
1136 }
1137 : status === "approval"
1138 ? {
1139 label: "Approval",
1142 - icon: null,
1140 + icon: "approval" as const,
1141 className: "text-amber-700 dark:text-amber-300",
1142 }
1143 : status === "input"
1144 ? {
1145 label: "Input",
1148 - icon: null,
1146 + icon: "input" as const,
1147 className: "text-indigo-600 dark:text-indigo-300",
1148 }
1149 : status === "failed"
1150 ? {
1151 label: "Failed",
1154 - icon: null,
1152 + icon: "failed" as const,
1153 className: "text-red-700 dark:text-red-300",
1154 }
1155 : isWoke
@@ -1396,10 +1394,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1394 : shouldRecede
1395 ? "text-sidebar-muted-foreground/75 hover:bg-sidebar-row-hover hover:text-sidebar-foreground"
1396 : "bg-transparent text-sidebar-foreground hover:bg-sidebar-row-hover",
1399 - isInFlight &&
1400 - !props.isActive &&
1401 - !isSelected &&
1402 - "opacity-70 transition-opacity hover:opacity-100",
1397 isFileDragOver && "ring-1 ring-inset ring-primary/70",
1398 // The hover tint must not clobber an active/selected row's own surface.
1399 isFileDragOver && !props.isActive && !isSelected && "bg-sidebar-row-hover",
@@ -1462,7 +1456,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1456 "truncate",
1457 shouldRecede
1458 ? "text-secondary-label"
1465 - : isUnread || isWoke
1459 + : isUnread || isWoke || status === "input"
1460 ? "text-foreground"
1461 : status === "failed"
1462 ? "text-foreground/95"
@@ -1472,7 +1466,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1466 "truncate group-focus-within/sidebar-row:text-foreground group-hover/sidebar-row:text-foreground",
1467 shouldRecede
1468 ? "text-secondary-label/70"
1475 - : props.isActive || isWoke
1469 + : props.isActive || isWoke || status === "input"
1470 ? "text-foreground"
1471 : isUnread
1472 ? "text-muted-foreground"
@@ -1814,6 +1808,14 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1808 >
1809 {topStatus.icon === "working" ? (
1810 <CircleDashedIcon aria-hidden className="size-4 shrink-0" />
1811 + ) : topStatus.icon === "input" ? (
1812 + <MessageCircleQuestionIcon aria-hidden className="size-4 shrink-0" />
1813 + ) : topStatus.icon === "approval" ? (
1814 + <ShieldQuestionIcon aria-hidden className="size-4 shrink-0" />
1815 + ) : topStatus.icon === "failed" ? (
1816 + <CircleAlertIcon aria-hidden className="size-4 shrink-0" />
1817 + ) : topStatus.icon === "monitoring" ? (
1818 + <EyeIcon aria-hidden className="size-4 shrink-0" />
1819 ) : topStatus.icon === "done" ? (
1820 <CircleCheckIcon aria-hidden className="size-4 shrink-0" />
1821 ) : null}