From 47204dee676983190a71fc03472400c4f823bc61 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 20 Jun 2026 21:51:09 +1000 Subject: [PATCH] fix(cn): use canonical twMerge(clsx) so class overrides resolve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The local cn() joined classes with filter(Boolean).join(' '), which doesn't dedupe conflicting Tailwind utilities — consumer className overrides could silently lose to the component's base classes. Switch to the standard twMerge(clsx(...)) (clsx + tailwind-merge are already app deps). Behaviour is unchanged except conflicting overrides now win correctly. Build-verified (skyai-finance clean; vibespace transforms all modules). Frontend audit rank 4. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 0b4b24e..99c1f36 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,3 +1,5 @@ +import { clsx } from "clsx" +import { twMerge } from "tailwind-merge" // PURPOSE: Personal-records primitives — kind-typed record cards, group // sections with privacy framing, field tables and spec-driven // field inputs, tier badges, the record→Markdown renderer, and a @@ -47,7 +49,7 @@ import { /* ------------------------------------------------------------------ */ function cn(...classes: (string | false | null | undefined)[]): string { - return classes.filter(Boolean).join(" "); + return twMerge(clsx(classes)) } /* ------------------------------------------------------------------ */