# DRAFT · DCA-TRANCHES-GUI Component Status: planned (P2) Scope: GUI-Komponente, kein Code, kein Patch. --- ## 1. Idee Wiederverwendbarer Filament/Blade-Component `` für das Detail-Panel einer Position (in `ViewPosition.php` und in der neuen OPEN-POSITIONS-VIEW Page). Datenquelle: `dca_log.json` Tranche-Array für ein Symbol — read-only, zugänglich über denselben Service-Layer wie OPEN-POSITIONS-VIEW. --- ## 2. Datenkontrakt Component-Attribut: `:tranches="$tranches"` — Array of: ```php [ 'time' => '2026-05-16T18:53:40.778158+00:00', 'price' => 0.0000059, 'size' => 212.84, // USDT-Cost 'reason' => 'tranche_1', // oder 'DCA-Rettung (…)' / 'Pyramid: …' 'avg_after' => 0.0000059, // Avg-Preis nach diesem Buy ] ``` Tranche-Kind-Klassifikation (Frontend): | `reason` Pattern | Kind | Color | |---|---|---| | `tranche_1` | Initial | sky | | `tranche_1_t3fwd` | T3-Forward | violet | | `DCA-Rettung …` | DCA-Rescue | amber | | `Pyramid: …` | Pyramid | emerald | | sonst | Unknown | slate | --- ## 3. Skizze ``` +----------------------------------------+ | Tranchen-Historie | +----------------------------------------+ | ● 2026-05-16 18:53 [Initial] | | @ 0.000006 · 212.84 USDT | | Avg-after: 0.000006 | |----------------------------------------| | ● 2026-05-17 01:27 [DCA-Rescue] | | @ 0.000006 · 188.86 USDT | | Avg-after: 0.000006 (≈ unverändert)| | "Gap war 0.3% unter SL" | +----------------------------------------+ | Total invested: 401.70 USDT | | Initial Entry : 0.000006 | | Avg Entry : 0.000006 | | Drift Initial → Avg: 0.0% | +----------------------------------------+ ``` Bei Pyramid (KITE-ähnlich): ``` | ● 2026-05-16 08:42 [Initial] @ 0.207 · 212.59 USDT | | ● 2026-05-16 09:47 [Pyramid] @ 0.2122 · 132.87 USDT | | +2.5% über Entry — Avg-after: 0.20897 | | Total invested: 345.46 · Initial 0.207 · Avg 0.20897 (+0.95%)| ``` --- ## 4. Boundaries - Component liest nur Array, kein eigener File-Access. - Keine neuen Routes, keine Form-Actions. - Keine emoji im UI ohne Operator-Bestätigung (CLAUDE.md global). --- ## 5. Test-Skizze - snapshot-test: tranches = [tranche_1] → 1 row mit „Initial"-Badge - tranches = [tranche_1, DCA-Rettung-X] → 2 rows, 2. mit „DCA-Rescue" - tranches = [tranche_1, Pyramid-X] → 2 rows, 2. mit „Pyramid" - tranches = [] → empty-state „Keine Tranchen aufgezeichnet" --- ## 6. STOP Kein Code vor Operator-GO.