fix(precedents): deferred (snooze) לא נספר כ"ממתין" ולא צובע שורה אדום
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 6s

המשך ל-#215. תור-הסקירה האמיתי (list_halachot) מסנן pending_review בלבד —
deferred ("נדחה למועד", #84 snooze) מוסט במכוון מהתור הפעיל. לכן ספירתו
כ"ממתין" צבעה שורות אדום על עבודה שדפנה כבר הסיטה הצידה — בדיוק ההטעיה
ש-#215 בא לתקן.

- backend: pending_count = pending_review בלבד (היה pending_review+deferred);
  deferred_count חדש ונפרד. אותה שאילתה, מקור-אמת יחיד (G2).
- UI: deferred מוצג כמקטע מושתק (⏸ N) רק כשקיים — לא צובע אדום, לא נספר
  בממתינות. הצבע האדום + רקע-השורה מונעים מ-pending_count (=pending_review)
  בלבד, בעקביות עם התור.

Invariants: G2 (ספירה ממקור-אמת יחיד תואמת-תור). שינוי-UI לפי החלטת היו"ר.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-12 04:40:26 +00:00
parent 56bc72760a
commit b0411db80b
3 changed files with 18 additions and 4 deletions

View File

@@ -140,14 +140,20 @@ function StatusPill({ p }: { p: Precedent }) {
}
// Split the count into approved / pending / rejected so a high total no
// longer reads as "lots waiting" when the remainder is actually rejected.
// Pending is the only state that needs the chair — highlight it in red.
// Only pending_review needs the chair — it (and only it) is highlighted red
// and tints the row. deferred ("snoozed", #84) was deliberately set aside and
// is excluded from the active review queue, so it never alarms — it shows as
// a separate muted segment, surfaced only when present.
const hasPending = p.pending_count > 0;
const title =
`${p.approved_count} מאושרות · ${p.pending_count} ממתינות · ${p.rejected_count} נדחו` +
(p.deferred_count > 0 ? ` · ${p.deferred_count} נדחו למועד` : "");
return (
<Badge
variant="outline"
dir="ltr"
className="bg-gold-wash text-gold-deep border-gold/40 tabular-nums"
title={`${p.approved_count} מאושרות · ${p.pending_count} ממתינות · ${p.rejected_count} נדחו`}
title={title}
>
<span className="text-success font-semibold">{p.approved_count}</span>
<span className="text-ink-light">/</span>
@@ -156,6 +162,11 @@ function StatusPill({ p }: { p: Precedent }) {
</span>
<span className="text-ink-light">/</span>
<span className="text-ink-muted">{p.rejected_count}</span>
{p.deferred_count > 0 ? (
<span className="ms-1 text-[0.7rem] text-ink-light">
( {p.deferred_count})
</span>
) : null}
<span className="ms-1 text-[0.7rem] text-ink-muted">הלכות</span>
</Badge>
);

View File

@@ -59,6 +59,7 @@ export type Precedent = {
approved_count: number;
pending_count: number;
rejected_count: number;
deferred_count: number;
};
export type Halacha = {