Merge pull request 'feat(learning): FU-2 UI — התלבטות-הפאנל במסך-אישור היו"ר (#133)' (#220) from worktree-halacha-deliberation-ui into main
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m46s
G12 Leak-Guard / leak-guard (push) Successful in 9s

This commit was merged in pull request #220.
This commit is contained in:
2026-06-12 06:19:50 +00:00
4 changed files with 147 additions and 6 deletions

View File

@@ -111,6 +111,21 @@ export type Halacha = {
rule_statement: string;
cosine: number | null;
}[];
/* #133/FU-2 — the latest 3-judge panel deliberation (present only when fetched
* with include_panel_round). Surfaced in the review card so the chair sees WHY
* the panel split before she decides; her decision is the gold label the
* active-learning loop learns from. Capture-only — does not affect review_status. */
panel_round?: {
question: "keep" | "entailed";
verdict: "unanimous_yes" | "unanimous_no" | "split" | "incomplete";
applied_action: string;
round_ts: string | null;
judges: {
model: "claude" | "deepseek" | "gemini";
vote: boolean | null;
reason: string;
}[];
};
};
export type RelatedCase = {
@@ -597,9 +612,11 @@ export function useHalachotPending(
) {
const { limit = 200, needsFix = false } = opts;
const qs = needsFix
? `review_status=pending_review&exclude_low_quality=false&limit=${limit}`
? `review_status=pending_review&exclude_low_quality=false`
+ `&include_panel_round=true&limit=${limit}`
: `review_status=pending_review&exclude_low_quality=true`
+ `&order_by_priority=true&cluster=true&include_equivalents=true&limit=${limit}`;
+ `&order_by_priority=true&cluster=true&include_equivalents=true`
+ `&include_panel_round=true&limit=${limit}`;
return useQuery({
queryKey: [...libraryKeys.halachotPending(), needsFix ? "needsfix" : "clean"],
queryFn: async ({ signal }) => {