diff --git a/web-ui/src/components/precedents/halacha-review-panel.tsx b/web-ui/src/components/precedents/halacha-review-panel.tsx index c4aa39c..1004216 100644 --- a/web-ui/src/components/precedents/halacha-review-panel.tsx +++ b/web-ui/src/components/precedents/halacha-review-panel.tsx @@ -614,6 +614,8 @@ function HalachaRestoreCard({ ))} + {h.panel_round && } +
+ )} +
+ + {searching && !isPending && !error && ( +
+ מציג עבור + + {search} + + + · {matchCount} {matchCount === 1 ? "התאמה" : "התאמות"} + + +
+ )} + + {body} + + ); } // ─── Pending queue panel (main review flow) ─────────────────────────────────── diff --git a/web-ui/src/lib/api/precedent-library.ts b/web-ui/src/lib/api/precedent-library.ts index 50f4720..b929da7 100644 --- a/web-ui/src/lib/api/precedent-library.ts +++ b/web-ui/src/lib/api/precedent-library.ts @@ -668,14 +668,21 @@ export function isExtractionFixItem(h: Halacha): boolean { ); } -export function useHalachotByStatus(status: string, limit = 300) { +export function useHalachotByStatus( + status: string, + opts: { limit?: number; search?: string } = {}, +) { + const { limit = 300, search = "" } = opts; + const term = search.trim(); + // include_panel_round surfaces the 3-judge deliberation on these tabs too + // (same card as the pending queue), so the chair sees WHY an item was + // auto-rejected/approved; search locates an item server-side beyond the window. + const qs = `review_status=${encodeURIComponent(status)}&include_panel_round=true&limit=${limit}` + + (term ? `&search=${encodeURIComponent(term)}` : ""); return useQuery({ - queryKey: libraryKeys.halachot({ review_status: status, limit: String(limit) }), + queryKey: libraryKeys.halachot({ review_status: status, limit: String(limit), search: term }), queryFn: ({ signal }) => - apiRequest<{ items: Halacha[]; count: number }>( - `/api/halachot?review_status=${encodeURIComponent(status)}&limit=${limit}`, - { signal }, - ), + apiRequest<{ items: Halacha[]; count: number }>(`/api/halachot?${qs}`, { signal }), staleTime: 10_000, refetchOnMount: "always", });