From 82b60f134955c6c94f800532c8c5b022ff47a670 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Fri, 27 Feb 2026 10:47:24 +0100 Subject: [PATCH] fix: resolve Calendar identifier conflict in DynamicPropertiesPanel - Rename Calendar import from lucide-react to CalendarIcon2 to avoid conflict with Calendar from @/components/ui/calendar - Add tsc --noEmit and pnpm build steps to CI to catch type/bundler errors before tests run (prevents this class of bug from reaching main) --- .github/workflows/ci.yml | 7 +++++++ src/components/DynamicPropertiesPanel.tsx | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb50111c..4330e104 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,13 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + # ── 0. Build check (catches type errors and bundler failures) ───────── + - name: TypeScript type check + run: pnpm exec tsc --noEmit + + - name: Vite build check + run: pnpm build + # ── 1. Tests ────────────────────────────────────────────────────────── - name: Run frontend tests run: pnpm test diff --git a/src/components/DynamicPropertiesPanel.tsx b/src/components/DynamicPropertiesPanel.tsx index 1c93a361..7ac96797 100644 --- a/src/components/DynamicPropertiesPanel.tsx +++ b/src/components/DynamicPropertiesPanel.tsx @@ -11,7 +11,7 @@ import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, Sele import { CalendarIcon, XIcon } from 'lucide-react' import { getTypeColor, getTypeLightColor } from '../utils/typeColors' import { countWords } from '../utils/wikilinks' -import { Check, X, Type, Calendar, ToggleLeft, Circle, Link } from 'lucide-react' +import { Check, X, Type, Calendar as CalendarIcon2, ToggleLeft, Circle, Link } from 'lucide-react' import { type PropertyDisplayMode, getEffectiveDisplayMode, @@ -237,7 +237,7 @@ function DisplayModeSelector({ propKey, currentMode, autoMode, onSelect }: { } const DISPLAY_MODE_ICONS: Record = { - text: Type, date: Calendar, boolean: ToggleLeft, status: Circle, url: Link, + text: Type, date: CalendarIcon2, boolean: ToggleLeft, status: Circle, url: Link, } function AddPropertyForm({ onAdd, onCancel }: {