Extract dashboard state logic into a separate model module #158

Closed
opened 2026-06-02 22:30:43 -04:00 by didericis-claude · 0 comments
Collaborator

Tracked from the medium-priority refactoring playbook in #154.

dashboard.py is 2,103 lines. Mixed UI rendering and state management in one file makes the logic harder to test in isolation and slows navigation.

Work

  • Identify the state/model layer within dashboard.py (data structures, state transitions, derived values) and extract it into a new module (e.g. dashboard_model.py or dashboard_state.py).
  • Keep rendering/display logic in dashboard.py, importing from the new model module.
  • No behavioral changes; confirm existing tests still pass and add unit tests for any newly isolated state logic that was previously untestable without the full dashboard.
Tracked from the medium-priority refactoring playbook in #154. `dashboard.py` is 2,103 lines. Mixed UI rendering and state management in one file makes the logic harder to test in isolation and slows navigation. ## Work - Identify the state/model layer within `dashboard.py` (data structures, state transitions, derived values) and extract it into a new module (e.g. `dashboard_model.py` or `dashboard_state.py`). - Keep rendering/display logic in `dashboard.py`, importing from the new model module. - No behavioral changes; confirm existing tests still pass and add unit tests for any newly isolated state logic that was previously untestable without the full dashboard.
didericis added the Kind/Enhancement label 2026-06-02 23:33:04 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#158