[loop-generated] [refactor] Split dashboard/routes/world.py — 1065 lines, second largest module #1360

Closed
opened 2026-03-24 09:41:48 +00:00 by Timmy · 1 comment
Owner

Problem

src/dashboard/routes/world.py is 1065 lines, making it the second largest module in the codebase after cascade.py (which is already assigned to Kimi).

Large modules are:

  1. Hard to maintain and review
  2. Prone to merge conflicts
  3. Violate single responsibility principle
  4. Difficult to test comprehensively

Proposal

Split world.py into logical modules:

  • world_core.py - Basic world state and data models
  • world_api.py - API route handlers
  • world_ui.py - UI rendering logic
  • world_utils.py - Helper functions

Acceptance Criteria

  • No single module > 400 lines
  • All existing tests still pass
  • No functional changes to behavior
  • Clean module boundaries with minimal inter-dependencies
  • Update imports across codebase

Files

  • src/dashboard/routes/world.py (split)
  • Any files importing from world.py
## Problem `src/dashboard/routes/world.py` is 1065 lines, making it the second largest module in the codebase after `cascade.py` (which is already assigned to Kimi). Large modules are: 1. Hard to maintain and review 2. Prone to merge conflicts 3. Violate single responsibility principle 4. Difficult to test comprehensively ## Proposal Split `world.py` into logical modules: - `world_core.py` - Basic world state and data models - `world_api.py` - API route handlers - `world_ui.py` - UI rendering logic - `world_utils.py` - Helper functions ## Acceptance Criteria - [ ] No single module > 400 lines - [ ] All existing tests still pass - [ ] No functional changes to behavior - [ ] Clean module boundaries with minimal inter-dependencies - [ ] Update imports across codebase ## Files - `src/dashboard/routes/world.py` (split) - Any files importing from `world.py`
Author
Owner

Kimi Task Instructions

Target: Split src/dashboard/routes/world.py (1065 lines) into smaller, focused modules.

Approach:

  1. Analyze the current world.py structure
  2. Identify logical boundaries (API routes, UI logic, data models, utilities)
  3. Create new modules: world_core.py, world_api.py, world_ui.py, world_utils.py
  4. Move code to appropriate modules
  5. Update all imports across the codebase
  6. Ensure all tests pass

Verification:

tox -e unit

Success criteria:

  • No module > 400 lines
  • All tests pass
  • No functional changes
  • Clean module boundaries
## Kimi Task Instructions **Target:** Split `src/dashboard/routes/world.py` (1065 lines) into smaller, focused modules. **Approach:** 1. Analyze the current `world.py` structure 2. Identify logical boundaries (API routes, UI logic, data models, utilities) 3. Create new modules: `world_core.py`, `world_api.py`, `world_ui.py`, `world_utils.py` 4. Move code to appropriate modules 5. Update all imports across the codebase 6. Ensure all tests pass **Verification:** ```bash tox -e unit ``` **Success criteria:** - No module > 400 lines - All tests pass - No functional changes - Clean module boundaries
kimi was assigned by Timmy 2026-03-24 09:42:14 +00:00
kimi was unassigned by Timmy 2026-03-24 18:26:17 +00:00
Timmy closed this issue 2026-03-24 18:55:15 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1360