From 8600f183b1a4b5688897cb9c3dba07557b1c639d Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Mon, 20 Apr 2026 10:57:27 +0700 Subject: [PATCH] feat(sidebar): restore PR state color, swap badge order, brighten checks on hover - PR icon color reflects merge state (open/merged/closed) via the existing getWorkspacePrIconColor helper. - PR badge is rendered before the failed-checks badge in the workspace row. - Hovering the PR badge swaps the GitPullRequest icon for ExternalLink in place (same size, no layout shift) and removes the trailing arrow. - Hovering the checks row in the workspace hover card brightens the icon and "Checks" label to foreground. --- .../src/components/sidebar-workspace-list.tsx | 11 +++++++---- .../src/components/workspace-hover-card.tsx | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/app/src/components/sidebar-workspace-list.tsx b/packages/app/src/components/sidebar-workspace-list.tsx index db32a5f81..de1c6ce72 100644 --- a/packages/app/src/components/sidebar-workspace-list.tsx +++ b/packages/app/src/components/sidebar-workspace-list.tsx @@ -28,7 +28,6 @@ import * as Clipboard from "expo-clipboard"; import { DiffStat } from "@/components/diff-stat"; import { Archive, - ArrowUpRight, CircleAlert, ChevronDown, ChevronRight, @@ -216,6 +215,7 @@ export function PrBadge({ hint }: { hint: PrHint }) { const { theme } = useUnistyles(); const [isHovered, setIsHovered] = useState(false); const activeColor = isHovered ? theme.colors.foreground : theme.colors.foregroundMuted; + const iconColor = getWorkspacePrIconColor(theme, hint.state); const handlePressIn = useCallback((event: GestureResponderEvent) => { event.stopPropagation(); @@ -240,11 +240,14 @@ export function PrBadge({ hint }: { hint: PrHint }) { onHoverOut={() => setIsHovered(false)} style={({ pressed }) => [prBadgeStyles.badge, pressed && prBadgeStyles.badgePressed]} > - + {isHovered ? ( + + ) : ( + + )} #{hint.number} - ); } @@ -1138,8 +1141,8 @@ function WorkspaceRowInner({ {prHint ? ( - + ) : null} diff --git a/packages/app/src/components/workspace-hover-card.tsx b/packages/app/src/components/workspace-hover-card.tsx index 730ba442b..e51b098ad 100644 --- a/packages/app/src/components/workspace-hover-card.tsx +++ b/packages/app/src/components/workspace-hover-card.tsx @@ -306,14 +306,24 @@ function WorkspaceHoverCardContent({ badgeLabel = `${checks.length} passed`; } + const iconColor = hovered + ? theme.colors.foreground + : theme.colors.foregroundMuted; return ( <> {hovered ? ( - + ) : ( - + )} - Checks + + Checks + @@ -395,6 +405,9 @@ const styles = StyleSheet.create((theme) => ({ fontWeight: theme.fontWeight.normal, color: theme.colors.foregroundMuted, }, + checksSummaryLabelHovered: { + color: theme.colors.foreground, + }, checksSummaryCounts: { flexDirection: "row", alignItems: "center",