Two-mode workspace, working Kleros v2 connector, MASC keyword RAG, Ollama engine selector
SegPar's second commit ships the fork's actual product differentiation: a parallel Mediation workspace alongside the existing Legal surface, a real GraphQL connector to Kleros Court v2 on Arbitrum, a keyword-indexed MASC legal corpus, and an Ollama local-model integration. Some of it is real; some is polished scaffolding over mock data.
The workspace architecture lives in WorkspaceContext.tsx. It stores mode (legal/mediation), role (lawyer/private_mediator/certified_mediator), and activeEngine, all persisted to localStorage. AppSidebar.tsx branches on mode to swap nav items entirely and applies a separate dark-gold-on-purple color palette for Mediation. A ModeSwitcher pill toggles between them. This is roughly 200 lines that has no dependency on the mediation domain - reusable shape if you need dual product surfaces.
The Kleros connector (backend/src/lib/kleros/client.ts, 357 lines) is working code. It queries the Kleros v2 subgraph on Arbitrum One via The Graph, fetches MetaEvidence from the IPFS gateway at cdn.kleros.link with an 8-second timeout, and exposes getCasesByWallet and getCaseDetail. The submitVote function is an explicit placeholder returning { success: false, pending: true } - on-chain signing must happen in the browser. Both KLEROS_SUBGRAPH_URL and KLEROS_IPFS_GATEWAY are env-configurable.
The MASC RAG is a TF-IDF-style keyword index over three hand-curated TypeScript files: Ley MASC CDMX (94 lines), Código Civil Federal arts. 1792-1798 and 2944-2955 (78 lines), and MASC doctrine (140 lines). Scores weight keyword matches at 3x, title at 2x, body at 1x, with Spanish NFD normalization. Exposed at GET /rag/analyze?q=&topK=. The code marks itself as a placeholder for pgvector. Don't pull this as a production RAG.
Ollama: backend/src/lib/llm/ollama.ts probes localhost:11434/api/tags, GET /engines/local returns availability and model list, and AIEnginePanel.tsx (330 lines) renders Cloud and Local engine sections. The selected engine is persisted to WorkspaceContext.
The six mediation pages and five Kleros UI components are visually complete but mostly mock-data-driven. Hardcoded case ID MX-001, hardcoded credential history, mock activity feed. IgniaAssistantPanel does call the real /rag/analyze endpoint, but passes a hardcoded Spanish query. The backend/.env.example gains a second block of API key assignments, creating duplicate keys in the file; it also lacks a trailing newline.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?