feat: Litigation AI assistant + command center enhancements - #46
Conversation
- Add Litigation AI page with 3-step evidence pipeline (Synthesize → Draft → QC)
using Cloudflare AI Gateway, replacing standalone Gemini-based HTML dashboard
- Add backend routes: POST /api/litigation/{synthesize,draft,qc}
- Add command center components (ActionStream, SystemPulse, VitalSigns)
- Add scrape jobs schema migration, fan-out dispatcher, job routes
- Add chittyId columns to obligations, properties, legal_deadlines, documents
- Expand cron with job scheduling capabilities
- Add MCP tool registration endpoints
- Redesign dashboard with command center layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
📝 WalkthroughWalkthroughThis PR introduces a comprehensive job-orchestration system for managing scrape operations, integrates fan-out notifications to downstream services upon scrape completion, adds an AI-powered litigation-assistance feature with synthesis and QC workflows, refactors the dashboard into a command-center layout with action streams and vital metrics, and exposes new job-management HTTP endpoints and MCP tools. Changes
Sequence Diagram(s)sequenceDiagram
actor Cron as Cron Scheduler
participant JobDisp as Job Dispatcher
participant DB as Database
participant Client as Scraper/Router Client
Cron->>JobDisp: enqueueJob(type, target, options)
JobDisp->>DB: INSERT into cc_scrape_jobs (queued status)
DB-->>JobDisp: jobId
JobDisp-->>Cron: jobId
Cron->>JobDisp: processQueue()
JobDisp->>DB: SELECT jobs WHERE status='queued' LIMIT N
DB-->>JobDisp: jobs[]
loop For each job
JobDisp->>DB: UPDATE status='running'
JobDisp->>Client: execute scrape (job.type, job.target)
alt Success
Client-->>JobDisp: { data, recordsSynced }
JobDisp->>DB: INSERT results, UPDATE status='succeeded'
else Failure
Client-->>JobDisp: error
JobDisp->>DB: UPDATE attempt++, reschedule or status='dead_letter'
end
end
JobDisp-->>Cron: { processed, succeeded, failed }
sequenceDiagram
participant JobDisp as Job Dispatcher
participant DB as Database
participant FanOut as Fan-Out Orchestrator
participant Intel as Intelligence Service
participant Cal as Calendar Service
participant Triage as Triage Service
participant Ledger as Ledger Service
JobDisp->>DB: UPDATE job status='succeeded', store result
JobDisp->>FanOut: fanOutScrapeResult(jobId, jobType, result, ...)
FanOut->>Intel: POST /agents/intelligence/observe
FanOut->>Cal: POST /agents/calendar/create (if court_docket + hearing date)
FanOut->>Triage: router.classifyDispute() (if entries present)
FanOut->>Ledger: POST /entries (audit log, if CHITTYLEDGER_URL set)
par All downstream calls concurrent
Intel-->>FanOut: 200 OK
Cal-->>FanOut: 200 OK
Triage-->>FanOut: 200 OK
Ledger-->>FanOut: 200 OK
end
FanOut-->>JobDisp: Promise<void> (no failure propagation)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
|
To use Codex here, create a Codex account and connect to github. |
Summary
Test plan
npx tsc --noEmitpasses (backend + UI)npx vite buildsucceeds🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Style