From c6950e7699d034b4f4f7e895a2eec3ddc5b66220 Mon Sep 17 00:00:00 2001 From: shad Date: Sun, 14 Jun 2026 17:20:50 +0400 Subject: [PATCH] fix(approvals): isMachineId catches 20+ hex anywhere in string Previous regex was anchored to whole string. Real EA2 display_names embed the 32-hex case-key as a prefix ('25f89310... #7a9cd1d1'), so they slipped through. Now any 20-char hex run anywhere in the string flips the value to machine-shaped. --- src/scenes/Approvals.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scenes/Approvals.tsx b/src/scenes/Approvals.tsx index 38ae71c..3c2dd2f 100644 --- a/src/scenes/Approvals.tsx +++ b/src/scenes/Approvals.tsx @@ -26,7 +26,9 @@ function ageLabel(item: WorkItem): string { function isMachineId(s?: string | null): boolean { if (!s) return true; - return /^[a-f0-9]{20,}$/i.test(s) || /^process_\d{10,}$/.test(s); + if (/[a-f0-9]{20,}/i.test(s)) return true; + if (/^process_\d{10,}/.test(s)) return true; + return false; } function friendlyCaseTitle(item: WorkItem): string {