←
TRCKR-101
Created: 2025-12-08
•
Updated: 2025-12-16
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-08
Completed table factory refactoring.
Created /tmp/trckr-TRCKR-101/tui/table_factory.py with:
- ColumnSpec dataclass (header, key, width)
- TableDefinition dataclass (name, columns, cursor_type, disable_auto_width, default_sort_column, default_sort_reverse)
- TableFactory class with static methods:
- setup_table(table, definition) - configures a DataTable with column specs
- populate_table(table, rows, key_col) - fills table with row data
Updated /tmp/trckr-TRCKR-101/tui/app.py:
- Added _get_table_definitions() method (lines 209-287) that returns dict mapping TableIDs to TableDefinition objects
- Replaced 50+ line _setup_tables() method with 10-line implementation using TableFactory (lines 483-496)
- All 6 tables (issues, projects, milestones, labels, tags, comments) now use centralized definitions
Results:
- All 832 tests pass
- Reduced setup code from ~50 lines to ~10 lines
- Column definitions centralized in one location
- Easier to modify tables or add new ones
- Merge conflicts resolved with master (filters import)
Commit: 8fece43 (on TRCKR-101 branch)
Merged to master: c38b833
Pushed to origin/master successfully.