05/23 Phase 11

This commit is contained in:
2026-05-23 12:31:20 -04:00
parent f8c11b8979
commit 78e88ae8ab
5 changed files with 412 additions and 27 deletions
+15
View File
@@ -325,6 +325,21 @@ All actions are logged to console and optionally to a log file:
---
### ✅ Phase 11 — Saved Predictions Viewer
- [x] Add `delete_prediction(pred_id)` and `delete_all_predictions(game_id=None)` to `db/models.py`
- [x] Refactor `ui/predictor_ui.py` to ttk.Notebook with two tabs
- [x] Generate tab — existing UI unchanged
- [x] Saved tab — treeview of all DB predictions (ID, Game, Strategy, Numbers, Bonus, Matches, Saved)
- [x] Match column — shows "X/5" comparing prediction vs last real draw (green if > 0, grey if zero)
- [x] Game filter dropdown — show all games or filter to one
- [x] Delete Selected — removes checked rows from DB + refreshes
- [x] Clear All — confirm dialog, then wipes all (or game-filtered) predictions
- [x] Auto-refreshes Saved tab after Save to DB
- [x] `_count_matches()` helper — set intersection between prediction and last draw numbers
- [x] `tests/test_saved_predictions.py` — 17 tests (214/214 total passing)
---
### ✅ Phase 10 — Complete Analysis Screen (7 Charts)
- [x] Extend `ui/analysis.py` with 4 new chart tabs (was 3, now 7)
- [x] Pairs — horizontal bar chart, top-20 most common number pairs