←
TRCKR-103
Created: 2025-12-08
•
Updated: 2025-12-16
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-08
Successfully consolidated quick edit callback patterns in tui/app.py.
**What was done:**
1. Added generic _handle_quick_edit() helper method at line 1345 in tui/app.py
- Takes entity_type, entity_id, table_id, field_name, new_value, cursor_row, cursor_col, refresh_callback
- Supports field_type parameter: 'single', 'nullable', 'list'
- Handles table lookup, QuickEditHandler instantiation, and dispatching to appropriate handler method
2. Refactored all 8 quick edit callbacks to use the new helper:
- _on_quick_edit_status (line 1390) - issue status
- _on_quick_edit_priority (line 1399) - issue priority
- _on_quick_edit_milestone (line 1408) - issue milestone with custom formatter
- _on_quick_edit_labels (line 1425) - issue labels list
- _on_quick_edit_project_status (line 1435) - project status
- _on_quick_edit_project_owner (line 1444) - project owner (nullable)
- _on_quick_edit_project_repos (line 1454) - project repos with CSV parsing
- _on_quick_edit_project_tags (line 1467) - project tags list
**Code reduction:**
- Before: ~177 lines of boilerplate
- After: 86 lines (including the 44-line helper method)
- Net reduction: ~91 lines of duplicated code
**Testing:**
- All 832 tests passing
- No syntax errors
- Verified with: make test
**Special handling:**
- Milestone callback uses custom formatter to lookup milestone name
- Repos callback parses CSV string into list before calling helper
Commit: 4c99150
Branch: TRCKR-103 (merged to master)