+
+ שינוי draft→final: {s.change_percent ?? "—"}%
+ סטיית יחסי-זהב מקס׳: {s.ratio_max_deviation_pp ?? "—"} נק׳
+ אנטי-דפוסים: {s.anti_pattern_total}
+
+ {Object.keys(data.golden_ratio_adherence.sections).length > 0 && (
+
+ {Object.entries(data.golden_ratio_adherence.sections).map(([sec, v]) => (
+ 0 ? "text-danger" : ""}>
+ {sec}: {v.actual_pct}% (יעד {v.target[0]}-{v.target[1]})
+
+ ))}
+
+ )}
+ {data.anti_pattern_hits.total > 0 && (
+
+ {Object.entries(data.anti_pattern_hits.by_pattern).map(([n, v]) => (
+ {n}: {v.count}
+ ))}
+
+ )}
+
+ );
+}
+
+function Row({ pair }: { pair: DraftFinalPair }) {
+ const [open, setOpen] = useState(false);
+ return (
+ שגיאה בטעינת הפנקס.
;
+ if (isPending) return
+
+ פנקס-ההתאמה (INV-LRN4): כל החלטה נסגרת מול הסופי של דפנה; כל סופי מנותח מול הטיוטה.
+ לחיצה על תיק → מדד מרחק-הסגנון שלו.
+
+ {items.length === 0 ? (
+
אין עדיין השוואות. הן נוצרות כשמסמנים החלטה כסופית.
+ ) : (
+ items.map((p) =>
|
)
+ )}
+
+ );
+}
diff --git a/web-ui/src/lib/api/learning.ts b/web-ui/src/lib/api/learning.ts
new file mode 100644
index 0000000..0003db7
--- /dev/null
+++ b/web-ui/src/lib/api/learning.ts
@@ -0,0 +1,69 @@
+/**
+ * Style-acquisition learning surface (T6/T13) — reconciliation ledger + style-distance.
+ * Backs the /training "למידה" tab. Endpoints under /api/learning.
+ */
+
+import { useQuery } from "@tanstack/react-query";
+import { apiRequest } from "./client";
+
+export type DraftFinalPair = {
+ id: string;
+ case_id: string | null;
+ case_number: string;
+ title: string;
+ status: "final_received" | "analyzed" | "lessons_folded" | string;
+ change_percent: number | null;
+ created_at: string | null;
+ updated_at: string | null;
+};
+
+export type StyleDistance = {
+ case_number: string;
+ outcome: string;
+ golden_ratio_adherence: {
+ outcome: string;
+ total_words: number;
+ sections: Record