From 450229522b7708d3d9b5477841cfed6a6267c838 Mon Sep 17 00:00:00 2001 From: le king fu Date: Sun, 5 Jul 2026 20:55:16 -0400 Subject: [PATCH] polish(reports): drop dead category_type projection from the monthly query (#256 review) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getCategoryOverTime's monthly pivot selected COALESCE(c.type,'expense') AS category_type but nothing read it — the `types` map is built from the top-N query. Remove the unused projection and its row-type field. No behaviour change. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/services/reportService.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/services/reportService.ts b/src/services/reportService.ts index 7e1af0a..046ae5a 100644 --- a/src/services/reportService.ts +++ b/src/services/reportService.ts @@ -140,7 +140,6 @@ export async function getCategoryOverTime( month: string; category_id: number | null; category_name: string; - category_type: "expense" | "income" | "transfer"; total: number; }> >( @@ -148,7 +147,6 @@ export async function getCategoryOverTime( strftime('%Y-%m', t.date) AS month, t.category_id, COALESCE(c.name, 'Uncategorized') AS category_name, - COALESCE(c.type, 'expense') AS category_type, ABS(SUM(t.amount)) AS total FROM transactions t LEFT JOIN categories c ON t.category_id = c.id