From 83d30365c93d2374f51b6880b0234a380fbd7c28 Mon Sep 17 00:00:00 2001 From: Chaim Date: Mon, 8 Jun 2026 07:19:32 +0000 Subject: [PATCH] =?UTF-8?q?feat(nav):=20=D7=A7=D7=99=D7=91=D7=95=D7=A5=20?= =?UTF-8?q?=D7=94=D7=A0=D7=99=D7=95=D7=95=D7=98=20=D7=94=D7=A2=D7=9C=D7=99?= =?UTF-8?q?=D7=95=D7=9F=20=D7=91=D7=AA=D7=A4=D7=A8=D7=99=D7=98=D7=99=D7=9D?= =?UTF-8?q?=20=D7=A0=D7=A4=D7=AA=D7=97=D7=99=D7=9D=20(=D7=A4=D7=A1=D7=99?= =?UTF-8?q?=D7=A7=D7=94/=D7=A1=D7=92=D7=A0=D7=95=D7=9F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit שורת הניווט הצטמצמה מ-11 קישורים ישירים ל-4 קישורי-עבודה (בית · מרכז אישורים · הערות יו״ר · ארכיון) + 2 תפריטים נפתחים: - "פסיקה ▾": ספריית פסיקה · יומונים · פסיקה חסרה · ‎—ניתוח וכיול—‎ · מפת הקורפוס · מדגם-זהב - "סגנון ▾": אימון סגנון · מתודולוגיה מפת-הקורפוס, מדגם-זהב ומתודולוגיה הורדו-בדרגה מהשורה הראשית לתוך התפריטים (לפי בקשת היו"ר) — אך כל ה-routes נשמרים, אין שינוי URL. trigger התפריט מקבל הדגשה + קו-זהב תחתון כשאחד מילדיו פעיל; badge "פסיקה חסרה" מוצג גם על trigger "פסיקה" וגם בתוך הפריט. Invariants: מקיים G2 (איחוד מסלולי-ניווט, ללא יצירת מסלול מקביל — כל הדפים נותרים נגישים, deep-links נשמרים). Co-Authored-By: Claude Opus 4.8 (1M context) --- web-ui/src/components/app-shell.tsx | 136 +++++++++++++++++++++------- 1 file changed, 102 insertions(+), 34 deletions(-) diff --git a/web-ui/src/components/app-shell.tsx b/web-ui/src/components/app-shell.tsx index fd98e9d..63c41ed 100644 --- a/web-ui/src/components/app-shell.tsx +++ b/web-ui/src/components/app-shell.tsx @@ -1,6 +1,6 @@ "use client"; -import type { ReactNode } from "react"; +import { Fragment, type ReactNode } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { ChevronDown, Settings } from "lucide-react"; @@ -22,7 +22,7 @@ import { usePendingApprovals } from "@/lib/api/chair"; * Ezer Mishpati navigation shell — two-row header. * * Row 1 (brand): logo + dynamic context subtitle · global search · agent boards - * Row 2 (nav): work group · knowledge group · admin dropdown + * Row 2 (nav): work links · knowledge dropdowns (פסיקה/סגנון) · admin dropdown * * Editorial/judicial aesthetic preserved: * - Navy background with a gold hairline rule (border-b-3) @@ -33,29 +33,39 @@ import { usePendingApprovals } from "@/lib/api/chair"; * sighted users see where they are. */ -type NavItem = { href: string; label: string }; -type NavGroup = { id: string; items: NavItem[] }; +// `groupLabel`, when present, renders a separator + sub-heading inside a +// dropdown *before* this item — used to set off secondary tools. +type NavItem = { href: string; label: string; groupLabel?: string }; +type NavMenuDef = { id: string; label: string; items: NavItem[] }; -const NAV_GROUPS: NavGroup[] = [ +// Work cluster — direct links, the daily hubs. +const WORK_LINKS: NavItem[] = [ + { href: "/", label: "בית" }, + { href: "/approvals", label: "מרכז אישורים" }, + { href: "/feedback", label: "הערות יו״ר" }, + { href: "/archive", label: "ארכיון" }, +]; + +// Knowledge cluster — grouped under dropdowns so the bar stays scannable. +// All routes are preserved; only their placement in the nav changes. +const KNOWLEDGE_MENUS: NavMenuDef[] = [ { - id: "work", + id: "precedents", + label: "פסיקה", items: [ - { href: "/", label: "בית" }, - { href: "/approvals", label: "מרכז אישורים" }, - { href: "/feedback", label: "הערות יו״ר" }, - { href: "/archive", label: "ארכיון" }, + { href: "/precedents", label: "ספריית פסיקה" }, + { href: "/digests", label: "יומונים" }, + { href: "/missing-precedents", label: "פסיקה חסרה" }, + { href: "/graph", label: "מפת הקורפוס", groupLabel: "ניתוח וכיול" }, + { href: "/goldset", label: "מדגם-זהב" }, ], }, { - id: "knowledge", + id: "style", + label: "סגנון", items: [ - { href: "/precedents", label: "ספריית פסיקה" }, - { href: "/graph", label: "מפת הקורפוס" }, - { href: "/digests", label: "יומונים" }, - { href: "/missing-precedents", label: "פסיקה חסרה" }, - { href: "/goldset", label: "מדגם-זהב" }, - { href: "/training", label: "אימון סגנון" }, - { href: "/methodology", label: "מתודולוגיה" }, + { href: "/training", label: "אימון סגנון" }, + { href: "/methodology", label: "מתודולוגיה" }, ], }, ]; @@ -162,21 +172,17 @@ export function AppShell({ children }: { children: ReactNode }) { {/* ─── Row 2 — section nav ─── */}
@@ -249,7 +255,6 @@ function NavLink({ item, active }: { item: NavItem; active: boolean }) { `} > {item.label} - {item.href === "/missing-precedents" ? : null} {item.href === "/approvals" ? : null} {active && ( isActive(pathname, i.href)); + const hasMissingPrecedents = menu.items.some((i) => i.href === "/missing-precedents"); + return ( + + + {menu.label} + {hasMissingPrecedents ? : null} + + + + {menu.items.map((item) => { + const active = isActive(pathname, item.href); + return ( + + {item.groupLabel && ( + <> + + + {item.groupLabel} + + + )} + + + {item.label} + {item.href === "/missing-precedents" ? : null} + + + + ); + })} + + + ); +} + /* Total pending-approvals badge next to "מרכז אישורים" — Dafna's outstanding * human-gate items (halachot + missing precedents + feedback + qa_failed). * Renders only when >0 so the nav stays quiet when everything is cleared. */