From 1278bb9ecd29a331a960393b9be1292cda458fe5 Mon Sep 17 00:00:00 2001 From: Robin ELM <64148042+Robin-ELM@users.noreply.github.com> Date: Wed, 4 Nov 2026 21:46:30 +0300 Subject: [PATCH] fix(board): the foil perk never paints a held pin's shape (PIN-279, Bugbot on #242) --- src/ui/kit.test.ts | 6 ++++++ src/ui/stickers.tsx | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ui/kit.test.ts b/src/ui/kit.test.ts index ab3ad6b..437f2ed 100644 --- a/src/ui/kit.test.ts +++ b/src/ui/kit.test.ts @@ -65,6 +65,12 @@ describe("UI kit components (PIN-97)", () => { expect(held).toContain("pn-sticker-held"); expect(held).toContain("Under review"); expect(held).not.toContain(" {} })); expect(pin).not.toContain(" = { "--t": tilt ?? stickerTilt(seed) }; if (size !== undefined) vars["--pn-size"] = typeof size === "number" ? `${size}px` : size; - if (state === "cutting" || foil) vars["--src"] = `url("${src}")`; + // PIN-279: a held pin has no picture anywhere, foil mask included. + const foiled = Boolean(foil) && !held; + if (!held && (state === "cutting" || foiled)) vars["--src"] = `url("${src}")`; return ( @@ -61,7 +63,7 @@ export function Sticker({ ) : ( {alt} )} - {foil ?