From 02395b9ad4bdeb201652d2c34f0d70ce09ed4075 Mon Sep 17 00:00:00 2001 From: null Date: Fri, 3 Jul 2026 19:51:21 -0500 Subject: [PATCH] refactor(client): remove orphaned dead logic flagged by ESLint (R2c) - MobileBillRow: an autopayClass useMemo computed a badge class that was never rendered (dead since a refactor) -> removed. - CategoriesPage: onRowKeyDown handler was never wired (keyboard toggle is now the dedicated chevron button, per the QA-B14-02 a11y fix) -> removed. - BillModal: unused isDebtCategory derived flag -> removed. Remaining lint warnings are unused imports / HMR / vestigial destructures (non-correctness, non-blocking, now tracked by eslint). Co-Authored-By: Claude Opus 4.8 --- client/components/BillModal.jsx | 1 - client/components/MobileBillRow.jsx | 7 ------- client/pages/CategoriesPage.jsx | 7 ------- 3 files changed, 15 deletions(-) diff --git a/client/components/BillModal.jsx b/client/components/BillModal.jsx index 2dc8d12..0552e03 100644 --- a/client/components/BillModal.jsx +++ b/client/components/BillModal.jsx @@ -142,7 +142,6 @@ export default function BillModal({ bill, initialBill, categories, onClose, onSa const [bulkUnmatch, setBulkUnmatch] = useState(null); const [bulkBusy, setBulkBusy] = useState(false); - const isDebtCategory = isDebtCat(categories, categoryId); const isSnowballCategory = isSnowballCat(categories, categoryId); const showOnSnowball = snowballInclude || (isSnowballCategory && !snowballExempt); const canAutoMarkPaid = autopay && autodraftStatus === 'assumed_paid'; diff --git a/client/components/MobileBillRow.jsx b/client/components/MobileBillRow.jsx index 53deb6e..0cb863c 100644 --- a/client/components/MobileBillRow.jsx +++ b/client/components/MobileBillRow.jsx @@ -21,13 +21,6 @@ export const MobileBillRow = React.memo(function MobileBillRow({ bill, onEdit, o ); }, [bill.active]); - const autopayClass = useMemo(() => { - return cn( - 'rounded bg-emerald-500/20 px-1.5 py-0.5 text-[10px] font-semibold text-emerald-300', - bill.autopay_enabled ? 'opacity-100' : 'opacity-0', - ); - }, [bill.autopay_enabled]); - const toggleBtnClass = useMemo(() => { return cn( 'h-8 px-2.5 text-xs', diff --git a/client/pages/CategoriesPage.jsx b/client/pages/CategoriesPage.jsx index 1bb9e94..9ef761b 100644 --- a/client/pages/CategoriesPage.jsx +++ b/client/pages/CategoriesPage.jsx @@ -270,13 +270,6 @@ export default function CategoriesPage() { }); } - function onRowKeyDown(event, id) { - if (event.key === 'Enter' || event.key === ' ') { - event.preventDefault(); - toggleCategory(id); - } - } - async function handleAdd(e) { e.preventDefault(); const trimmed = newName.trim();