GeezerVison is showing github.com — fix(web): show Monitoring on board cards instead of Working (#356) · patroza/t3code@912340b
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/Sidebar.logic.test.ts +20Lines changed: 20 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,6 +29,7 @@ import { | 29 | 29 | resolveSidebarStageBadgeLabel, | 30 | 30 | resolveThreadRowClassName, | 31 | 31 | resolveSidebarV2Status, | | 32 | + resolveSidebarV2TopStatus, | 32 | 33 | resolveThreadStatusPill, | 33 | 34 | resolveWorkingStartedAt, | 34 | 35 | searchSidebarThreadsByTitle, | @@ -2147,3 +2148,22 @@ describe("sortLogicalProjectsForSidebar", () => { | 2147 | 2148 | ).toEqual(["logical-newer", "logical-older"]); | 2148 | 2149 | }); | 2149 | 2150 | }); | | 2151 | + | | 2152 | +describe("resolveSidebarV2TopStatus", () => { | | 2153 | + it("shows monitoring as its own calm status, not as Working", () => { | | 2154 | + // Board cards read this. Folding monitoring into Working gave a watch loop | | 2155 | + // the active-progress shimmer, which is what the v1 pill (pulse: false) and | | 2156 | + // the v2 sidebar row both deliberately avoid. | | 2157 | + const monitoring = resolveSidebarV2TopStatus({ status: "monitoring", isUnread: false }); | | 2158 | + expect(monitoring?.label).toBe("Monitoring"); | | 2159 | + expect(monitoring?.icon).toBeNull(); | | 2160 | + expect(monitoring?.className).not.toContain("animate-sidebar-working-text"); | | 2161 | + }); | | 2162 | + | | 2163 | + it("keeps working animated so the two remain distinguishable", () => { | | 2164 | + const working = resolveSidebarV2TopStatus({ status: "working", isUnread: false }); | | 2165 | + expect(working?.label).toBe("Working"); | | 2166 | + expect(working?.icon).toBe("working"); | | 2167 | + expect(working?.className).toContain("animate-sidebar-working-text"); | | 2168 | + }); | | 2169 | +}); |
Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/Sidebar.logic.ts +10-4Lines changed: 10 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -883,7 +883,7 @@ export function resolveSidebarV2Status(thread: SidebarV2StatusInput): SidebarV2S | 883 | 883 | } | 884 | 884 |
| 885 | 885 | export interface SidebarV2TopStatus { | 886 | | - label: "Working" | "Approval" | "Input" | "Failed" | "Done"; | | 886 | + label: "Working" | "Monitoring" | "Approval" | "Input" | "Failed" | "Done"; | 887 | 887 | icon: "working" | "done" | null; | 888 | 888 | className: string; | 889 | 889 | } | @@ -894,15 +894,21 @@ export function resolveSidebarV2TopStatus(input: { | 894 | 894 | }): SidebarV2TopStatus | null { | 895 | 895 | switch (input.status) { | 896 | 896 | case "working": | 897 | | - // Monitoring is live background work too. The v2 top-status label union has | 898 | | - // no Monitoring member, so it reads as Working rather than inventing one. | 899 | | - case "monitoring": | 900 | 897 | return { | 901 | 898 | label: "Working", | 902 | 899 | icon: "working", | 903 | 900 | className: | 904 | 901 | "animate-sidebar-working-text text-sky-600 motion-reduce:animate-none dark:text-sky-400", | 905 | 902 | }; | | 903 | + // Steady label, no icon, no duty-cycled shimmer: monitoring is calm | | 904 | + // background presence, not active progress (monitoring-pill D6). Matches the | | 905 | + // v2 sidebar row and the v1 pill, which uses pulse: false here. | | 906 | + case "monitoring": | | 907 | + return { | | 908 | + label: "Monitoring", | | 909 | + icon: null, | | 910 | + className: "text-sky-600 dark:text-sky-400", | | 911 | + }; | 906 | 912 | case "approval": | 907 | 913 | return { | 908 | 914 | label: "Approval", | |
|