Commit Graph

19 Commits

Author SHA1 Message Date
OpenSquared
f9dddb7184 feat: graph patch grammar DSL for causal editor
New grammar panel replaces free-text AI prompt with a two-step workflow:
1. NL to Grammar: GPT-4o converts description to patch ops (new endpoint ai-to-grammar)
2. Apply: frontend parser applies grammar locally without AI

Grammar syntax: (+|-|~)(node|edge|coef|input|instruments) key=val key=val
Sign shortcuts: + positive, - negative, = neutral
Auto-positions new nodes when x/y omitted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 09:30:17 +02:00
OpenSquared
230ce3ff2b fix: prevent Nouveau button overflow in editor base panel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 09:11:58 +02:00
OpenSquared
40d6f14901 feat: causal lab — chip filters, editor zoom, AI modify prompt
Library:
- Color chip filters: category (with per-category colors), sub_type, instrument
- Date range filter (created_at) + text search
- Category labels unified to cover event_calendar, fundamental, calendar_event etc.
- Editer button on selected template → opens in editor tab
- Show created_at + created_by in template detail

Editor:
- Accepts initialId prop so Library can pre-load a template
- AI Modify zone: textarea prompt + button calls /api/causal-lab/template/{id}/ai-modify
- Returns modified graph_json from GPT-4o, applied live — user reviews then saves

Backend:
- New POST /api/causal-lab/template/{id}/ai-modify endpoint
  - Sends current graph_json + user prompt to GPT-4o
  - Returns validated modified graph_json (nodes/edges required)
  - Does not auto-save (user controls save)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 09:04:15 +02:00
OpenSquared
589faa633b feat: improve causal graph readability — scale positions, bigger fonts, less overlap
- Scale node positions by 1.55x to spread graph vertically/horizontally
- Increase node size: 120x42 -> 130x48 (normal), 130x50 -> 140x54 (editor)
- Bigger label font: 11px -> 12px inside nodes
- Edge labels: 8.5px -> 9.5px, lag/decay: 8px -> 9px
- Better label stagger along bezier: lag at t=0.13, label at t=0.42, decay at t=0.84
- Larger perpendicular offset: 10px -> 16px (less overlap on diagonal edges)
- SVG height: 480 -> 560 (normal), 540 -> 620 (editor)
- Use scaledNodes array for node rendering to apply position transform

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 08:46:07 +02:00
OpenSquared
394580c8c8 feat: causal lab 2026-06-29 11:35:24 +02:00
OpenSquared
bcdf1fbf2e feat: causal lab 2026-06-29 10:32:18 +02:00
OpenSquared
6ebbf4326e feat: causal lab 2026-06-28 18:08:09 +02:00
OpenSquared
863ba67610 feat: causal lab 2026-06-28 14:18:43 +02:00
OpenSquared
b5d4eb71e7 feat: instrument analysis 2026-06-28 13:35:29 +02:00
OpenSquared
b94291623d feat: instrument analysis 2026-06-28 13:04:24 +02:00
OpenSquared
98d6be8212 feat: temporal params (lag/diffusion/decay) sur aretes causales
- CausalEdge: lag_min, diffusion_min, decay_days
- SVG: labels +Xm (jaune, source) et decay (gris, cible) sur les aretes
- Editeur: champs lag/diffusion/decay dans add-edge et edit-edge
- Bibliotheque: section Parametres temporels avec grille editable + sauvegarde PATCH
- Backend: _drift_metrics utilise lag_min pour decaler fenetre intraday 5min
- analyze: calcule effective_lag depuis aretes → market_asset, retourne dans resultat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 11:47:04 +02:00
OpenSquared
cb33fa0dd7 fix: delete button visible pour tous les templates (grise si systeme) 2026-06-28 11:35:23 +02:00
OpenSquared
1117e9ee8a feat: causal lab - delete template + observable mapping + edge editing
- TabLibrary: bouton Supprimer (templates user uniquement)
- TabEditor: inputMapping dans EditorState, panneau mapping visible quand noeud observable selectionne
- TabEditor: edition d aretes (cliquer sur arête pour modifier style/force/signe/label)
- Backend: GET /api/causal-lab/data-sources (prices/macro_series/ff_events)
- analyze: auto-fetch market_watchlist+economic_events+ff_calendar depuis input_mapping
- TabAnalyze: affiche inputs auto-recuperes vs manuels dans les resultats

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 10:53:50 +02:00
OpenSquared
dd31f92aaf feat: causal lab - bouton Mettre a jour + PATCH endpoint
- TabEditor: updateExisting() + bouton bleu visible si templateId set
- Bouton Creer renomme en copie pour clarifier
- PATCH /api/causal-lab/template/{id} pour graph_json + metadonnees

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 10:02:28 +02:00
OpenSquared
e8fb7c13aa feat: causal lab — éditeur visuel, types nœuds, force/signe arêtes, NFP v2 2026-06-28 09:28:43 +02:00
OpenSquared
83a8e8c5be fix: causal lab — URL relative /api (pas localhost:8000) 2026-06-27 23:38:38 +02:00
OpenSquared
7a0263989a feat: causal lab — debug endpoint + error display in UI 2026-06-27 23:36:22 +02:00
OpenSquared
a7f5369d7b Causal lab v2 2026-06-27 23:25:59 +02:00
OpenSquared
9ac3ebb4b5 causal lab 2026-06-27 21:45:10 +02:00