7 Commits

Author SHA1 Message Date
4550c4132a Merge pull request 'chore: השבתת הג׳וב stale-case-reminder (legal-ai#1117)' (#23) from chore/1117-disable-stale-case-reminder into main
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (push) Successful in 3s
2026-10-26 10:34:26 +00:00
294833ccc5 chore: השבתת הג'וב stale-case-reminder — רעש בלבד (#1117)
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (pull_request) Successful in 4s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 12:34:24 +02:00
f48579d574 Merge pull request 'chore: השבתת הג׳וב sync-case-status — הסנכרון עבר ל-legal-ai (legal-ai#1117)' (#22) from chore/1117-disable-sync-case-status into main
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (push) Successful in 4s
2026-10-26 06:58:53 +00:00
c5a605ab1d chore: השבתת הג'וב sync-case-status — הסנכרון עבר ל-legal-ai (#1117)
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (pull_request) Successful in 8s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 08:58:50 +02:00
517b3ee844 Merge pull request 'fix(ui): כלי הלשונית דרך fetch של ה-worker; דשבורד דרך status-index (legal-ai #1117)' (#21) from fix/1117-ui-handlers into main
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (push) Successful in 5s
2026-10-24 17:27:54 +00:00
75aa931f85 fix(ui): כלי הלשונית (arguments/precedents/missing) דרך fetch של ה-worker; דשבורד דרך status-index (legal-ai #1117)
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (pull_request) Successful in 6s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 20:24:03 +03:00
2d4113e581 Merge pull request 'fix(jobs): stale/weekly דרך fetch של ה-worker; sync-case-status דרך status-index (legal-ai #1117)' (#20) from fix/1117-job-fetch into main
All checks were successful
INV-INT9 issue.status write-ownership / int9-guard (push) Successful in 4s
2026-10-24 16:09:23 +00:00
3 changed files with 13 additions and 18 deletions

View File

@@ -194,6 +194,7 @@ export class LegalApi {
export interface CaseStatusEntry {
case_number: string;
status: string;
updated_at?: string | null;
}
export interface CaseSummary {

View File

@@ -179,19 +179,13 @@ export default {
},
],
jobs: [
{
jobKey: "sync-case-status",
displayName: "Sync Legal Case Status",
description:
"Polls legal-ai for case status changes and updates Paperclip issues",
schedule: "*/15 * * * *",
},
{
jobKey: "stale-case-reminder",
displayName: "תזכורת תיקים תקועים",
description: "מזהה תיקים שלא עודכנו 30+ ימים ומוסיף תגובה ל-issue",
schedule: "0 8 * * *",
},
// הושבת (legal-ai #1117, INV-INT9 — כותב יחיד ל-issue.status): הסנכרון עבר
// לצד-השרת (`_case_status_sync_loop` ב-legal-ai, CASE_STATUS_SYNC_MODE).
// הסרה מההצהרה גורמת ל-Paperclip להעביר את הג'וב ל-`paused` בהתקנה הבאה.
// ה-handler ב-worker.ts נשאר רשום אך לא יופעל.
// הושבת (legal-ai #1117, הוראת חיים): תיק ללא תנועה לעיתים הוא מכוון, והתזכורות
// היו רעש בלבד. הסרה מההצהרה => Paperclip מעביר ל-`paused` בהתקנה הבאה.
// ה-handler ב-worker.ts נשאר רשום אך לא יופעל.
{
jobKey: "weekly-feedback-analysis",
displayName: "ניתוח פידבק שבועי",

View File

@@ -1391,7 +1391,7 @@ const plugin = definePlugin({
if (!caseNumber) return null;
const apiBase = await resolveApiBase(ctx, companyIdOf(params));
try {
const resp = await ctx.http.fetch(
const resp = await fetchLegalApi(
`${apiBase}/api/cases/${encodeURIComponent(caseNumber)}/legal-arguments`,
);
if (!resp.ok) {
@@ -1428,7 +1428,7 @@ const plugin = definePlugin({
if (!caseNumber) return [];
const apiBase = await resolveApiBase(ctx, companyIdOf(params));
try {
const resp = await ctx.http.fetch(
const resp = await fetchLegalApi(
`${apiBase}/api/cases/${encodeURIComponent(caseNumber)}/precedents`,
);
if (!resp.ok) {
@@ -1467,7 +1467,7 @@ const plugin = definePlugin({
const url = new URL(`${apiBase}/api/missing-precedents`);
url.searchParams.set("case_number", caseNumber);
url.searchParams.set("status", "open");
const resp = await ctx.http.fetch(url.toString());
const resp = await fetchLegalApi(url.toString());
if (!resp.ok) {
ctx.logger.warn("legal-case-missing-precedents: API error", {
caseNumber,
@@ -1488,13 +1488,13 @@ const plugin = definePlugin({
ctx.data.register("legal-dashboard-stats", async () => {
try {
const cases = await api.listCases();
const cases = await api.listCaseStatuses();
const byStatus: Record<string, number> = {};
let weekActivity = 0;
const weekAgoMs = Date.now() - 7 * 24 * 60 * 60 * 1000;
for (const c of cases) {
byStatus[c.status] = (byStatus[c.status] ?? 0) + 1;
const updated = (c as { updated_at?: string | null }).updated_at;
const updated = c.updated_at;
if (updated) {
const t = Date.parse(updated);
if (!Number.isNaN(t) && t >= weekAgoMs) weekActivity += 1;