From 9d4960f28f36a5b532fcc0695dabc3470a628092 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sat, 20 Jun 2026 14:35:49 +0000 Subject: [PATCH] fix(graph): lower year-filter floor to 1980, dynamic ceiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /graph "משנה / עד שנה" dropdown was hardcoded to 1994–2026, so dated precedents below 1994 were unreachable by the year filter. After backfilling decision dates, the corpus now has precedents from 1982 (ע"א 725/81), 1988 (910/86) and 1990 (בג"ץ 1578/90). Floor → 1980 (covers the oldest); ceiling → current year via getFullYear() so the range never ages out. Pure UI-logic change — same year_from/year_to params, no new data path (G2), no backend touch. Co-Authored-By: Claude Opus 4.8 (1M context) --- web-ui/src/components/graph/graph-filter-panel.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web-ui/src/components/graph/graph-filter-panel.tsx b/web-ui/src/components/graph/graph-filter-panel.tsx index 37d9ad4..f057cec 100644 --- a/web-ui/src/components/graph/graph-filter-panel.tsx +++ b/web-ui/src/components/graph/graph-filter-panel.tsx @@ -48,7 +48,14 @@ export type GraphControls = { }; const ALL = "__all__"; -const YEARS = Array.from({ length: 2026 - 1994 + 1 }, (_, i) => 2026 - i); +// Floor covers the oldest dated precedent in the corpus (currently ע"א 725/81 → +// 1982); ceiling tracks the current year so the range never ages out. +const YEAR_FLOOR = 1980; +const CURRENT_YEAR = new Date().getFullYear(); +const YEARS = Array.from( + { length: CURRENT_YEAR - YEAR_FLOOR + 1 }, + (_, i) => CURRENT_YEAR - i, +); const COLOR_BY: { value: ColorBy; label: string }[] = [ { value: "type", label: "סוג נקודה" },