Commit ab7aa5a
refactor: smart CSV import/export with templates, auto-detection, and review UI
Import flow:
- Add parseCSVRaw() to csv.ts for relaxed CSV parsing (no required columns)
- Add action templates (trade, cancel, withdraw, deposit, transfer, wait)
mirroring ActionsDAGParserParams from actions_dag_parser.py
- Add smart column detector with regex value patterns (crypto addresses,
trading pairs, amounts) and fuzzy header matching
- Rewrite ImportTask as 3-step flow: Upload -> Column Mapping -> Review
- Auto-detect best action template per row, allow user to change
- Color-coded confidence badges on auto-matched parameters
Export flow:
- Add ExportResultsDialog with template-based table view
- Pre-defined templates (General, Trade, Transfer, Full Details)
- User can add custom columns by selecting discovered JSON paths
- Sort/filter on any column via @tanstack/react-table
- Column visibility toggles
- Export filtered/sorted data as CSV
Tests:
- Add vitest with 71 tests covering action templates, column detector,
CSV parsing, JSON path utilities, and export templates
https://claude.ai/code/session_014uGX2qb5mYMuMKVUY4Z6Az1 parent 71ccb10 commit ab7aa5a
21 files changed
Lines changed: 3795 additions & 167 deletions
File tree
- packages/tentacles/Services/Interfaces/node_web_interface
- src
- components/Tasks
- ImportSteps
- lib
- __tests__
- routes/_layout/octobots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
0 commit comments