OpenSquared
a630cdc708
feat: Find Similar + Merge in Pattern Library
Backend (patterns.py):
- POST /api/patterns/find-similar — GPT-4o-mini compares a library pattern
against all others; returns merge_as_instance | counter_scenario | new_pattern
- POST /api/patterns/merge — full transactional merge: remaps pattern_id in
pattern_score_history, trade_entry_prices, ai_reasoning_traces, ai_call_logs,
skipped_trades; unions historical_instances (dedup); sums backtest counters;
deletes the discarded pattern
Frontend (PatternExplorer.tsx + useApi.ts):
- ScanSearch button on each non-builtin card triggers find-similar
- Inline result panel: duplicate → merge CTA with confirmation + destructive warning
counter_scenario → apply regime_tag CTA; new_pattern → green "unique" badge
- useFindSimilarPattern + useMergePatterns hooks invalidate all-patterns on success
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 12:13:33 +02:00
..
2026-06-23 09:57:18 +02:00
2026-06-22 18:20:22 +02:00
2026-06-23 12:13:33 +02:00
2026-06-23 12:13:33 +02:00
2026-06-22 20:09:01 +02:00
2026-06-23 09:57:18 +02:00
2026-06-22 21:10:10 +02:00
2026-06-16 20:29:59 +02:00