Frequency-bands table interactions and status display (ticket 05) + .gitignore for doc/done #5

Merged
ykpmusicstudio merged 2 commits from ticket-05-bands into master 2026-09-06 10:17:03 +02:00
ykpmusicstudio commented 2026-09-05 23:19:18 +02:00 (Migrated from github.com)

Implement ticket 05: the frequency-bands panel becomes live.

Includes the local .gitignore change (ignore doc/done/ archive) as requested.

Model (core/model.py): replace_band(index, band) (edit + re-sort, fails without mutating on bad input) and delete_bands(indices) (set-based removal, survivors keep identity — no shifted-row mistakes).

UI policy (ui/policy.py, pure/headless-tested): next_band_fmin_fmax (Add rule: start at current max Fmax, +1 MHz step, clamped to MaxFrequency, None when exhausted), band_status_display (Empty/N/A, Valid, Reduce BW, Fc error vocabulary), generation_enabled (Generate gating).

Window (ui/main_window.py): editable Treeview (double-click inline edit, Enter commits / Esc cancels, invalid values rejected with a message), Add (+)/Delete (-) buttons (Delete enabled only when rows exist AND a row is selected), bandwidth/center/validity status labels, and Generate enabled exactly when validations pass (still shows the not-implemented notice on click). refresh() repopulates the sorted tree, updates status, re-gates Generate.

Tests: model edit/delete helpers, policy add-step/status/gating, 9 new display-guarded window tests (tree population, add/reject, delete identity, delete enablement, status labels, generate gating). 116 passed + 1 display-guarded skip locally, coverage 97.5%, ruff/mypy/format clean. The CI test job runs the display tests under xvfb.

Implement ticket 05: the frequency-bands panel becomes live. Includes the local `.gitignore` change (ignore `doc/done/` archive) as requested. **Model** (`core/model.py`): `replace_band(index, band)` (edit + re-sort, fails without mutating on bad input) and `delete_bands(indices)` (set-based removal, survivors keep identity — no shifted-row mistakes). **UI policy** (`ui/policy.py`, pure/headless-tested): `next_band_fmin_fmax` (Add rule: start at current max Fmax, +1 MHz step, clamped to MaxFrequency, None when exhausted), `band_status_display` (Empty/N/A, Valid, Reduce BW, Fc error vocabulary), `generation_enabled` (Generate gating). **Window** (`ui/main_window.py`): editable Treeview (double-click inline edit, Enter commits / Esc cancels, invalid values rejected with a message), Add (+)/Delete (-) buttons (Delete enabled only when rows exist AND a row is selected), bandwidth/center/validity status labels, and Generate enabled exactly when validations pass (still shows the not-implemented notice on click). `refresh()` repopulates the sorted tree, updates status, re-gates Generate. **Tests**: model edit/delete helpers, policy add-step/status/gating, 9 new display-guarded window tests (tree population, add/reject, delete identity, delete enablement, status labels, generate gating). 116 passed + 1 display-guarded skip locally, coverage 97.5%, ruff/mypy/format clean. The CI `test` job runs the display tests under xvfb.
Sign in to join this conversation.
No description provided.