feat(nav): הסרת פילי-טאבים ותגי-ניווט + הורדת "פסיקה חסרה" מהתפריט (#3/#4)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 4s
Lint — undefined names / undefined-names (pull_request) Successful in 10s

#3 — הסרת תגי-המספר הקטנים:
- app-shell: הוסרו ApprovalsBadge ("מרכז אישורים") ו-MissingPrecedentsBadge.
- precedents: הוסרו CountPill/PendingPill/PlansPendingPill/IncomingPill מהטאבים;
  הקו-תחתון-זהב לבדו נושא את מצב-הטאב-הפעיל.

#4 — "פסיקה חסרה" ירדה מתפריט-הניווט "פסיקה" (כפולה לטאב "פסיקה נכנסת"
ב-/precedents). הדף /missing-precedents נשאר נגיש מתוך אותו טאב.

מאושר דרך שער-העיצוב (Claude Design 07-precedents).

Invariants: G2 — הסרת תגים-מקבילים; INV-IA1 — מרכז-האישורים נשאר שער-יחיד
(התג ירד, הדף לא).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 18:49:56 +00:00
parent 576a4b916b
commit 37e881bf8c
2 changed files with 13 additions and 88 deletions

View File

@@ -15,8 +15,6 @@ import {
} from "@/components/ui/dropdown-menu";
import { GlobalSearch } from "@/components/global-search";
import { headerSubtitle } from "@/components/header-context";
import { useMissingPrecedentsOpenCount } from "@/lib/api/missing-precedents";
import { usePendingApprovals } from "@/lib/api/chair";
/**
* Ezer Mishpati navigation shell — two-row header.
@@ -55,11 +53,12 @@ const KNOWLEDGE_MENUS: NavMenuDef[] = [
{
id: "precedents",
label: "פסיקה",
// #4: "פסיקה חסרה" (/missing-precedents) ירד מהתפריט — הוא כפול לטאב
// "פסיקה נכנסת" בתוך /precedents. הדף עצמו נשאר נגיש מתוך אותו טאב.
items: [
{ href: "/precedents", label: "ספריית פסיקה" },
{ href: "/digests", label: "יומונים" },
{ href: "/missing-precedents", label: "פסיקה חסרה" },
{ href: "/graph", label: "מפת הקורפוס" },
{ href: "/precedents", label: "ספריית פסיקה" },
{ href: "/digests", label: "יומונים" },
{ href: "/graph", label: "מפת הקורפוס" },
],
},
{
@@ -260,7 +259,6 @@ function NavLink({ item, active }: { item: NavItem; active: boolean }) {
`}
>
<span>{item.label}</span>
{item.href === "/approvals" ? <ApprovalsBadge /> : null}
{active && (
<span
className="absolute -bottom-[19px] inset-x-2 h-[2px] bg-gold"
@@ -278,7 +276,6 @@ function NavLink({ item, active }: { item: NavItem; active: boolean }) {
* pending count stays visible without opening the menu. */
function NavMenu({ menu, pathname }: { menu: NavMenuDef; pathname: string }) {
const menuActive = menu.items.some((i) => isActive(pathname, i.href));
const hasMissingPrecedents = menu.items.some((i) => i.href === "/missing-precedents");
return (
<DropdownMenu>
<DropdownMenuTrigger
@@ -293,7 +290,6 @@ function NavMenu({ menu, pathname }: { menu: NavMenuDef; pathname: string }) {
aria-label={`${menu.label} — תפריט`}
>
<span>{menu.label}</span>
{hasMissingPrecedents ? <MissingPrecedentsBadge /> : null}
<ChevronDown className="size-3" aria-hidden="true" />
{menuActive && (
<span
@@ -323,7 +319,6 @@ function NavMenu({ menu, pathname }: { menu: NavMenuDef; pathname: string }) {
className={`flex items-center cursor-pointer ${active ? "font-semibold" : ""}`}
>
<span>{item.label}</span>
{item.href === "/missing-precedents" ? <MissingPrecedentsBadge /> : null}
</Link>
</DropdownMenuItem>
</Fragment>
@@ -334,34 +329,3 @@ function NavMenu({ menu, pathname }: { menu: NavMenuDef; pathname: string }) {
);
}
/* 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. */
function ApprovalsBadge() {
const { data } = usePendingApprovals();
const total = data?.total_pending ?? 0;
if (!total) return null;
return (
<span
className="ms-1 inline-flex items-center justify-center min-w-[1.25rem] h-4 px-1 rounded-full bg-gold text-navy text-[0.65rem] font-semibold"
aria-label={`${total} פריטים ממתינים לאישורך`}
>
{total}
</span>
);
}
/* Small open-count badge next to "פסיקה חסרה" — only renders when >0
* so the nav stays quiet in normal operation. */
function MissingPrecedentsBadge() {
const { data: openCount } = useMissingPrecedentsOpenCount();
if (!openCount) return null;
return (
<span
className="ms-1 inline-flex items-center justify-center min-w-[1.25rem] h-4 px-1 rounded-full bg-gold text-navy text-[0.65rem] font-semibold"
aria-label={`${openCount} פסיקות חסרות פתוחות`}
>
{openCount}
</span>
);
}