summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-28 10:13:52 +0200
committerPaul Buetow <paul@buetow.org>2026-02-28 12:50:12 +0200
commitafbdcef805dc572ee2f3a79a52fde99818715bd4 (patch)
treecf45d6b721736399602e20923035d63d84b86287 /cmd
parent72b5a6f7b2100d228a0f16171c6c08b8f311f0d4 (diff)
refactor(ui): break up large functions in ui package
Go/MEDIUM task (UUID d8b51046): several functions exceeded 50 lines. Extract logical sections into focused helpers: renderTaskDetail() (238→20 lines): delegates to detailStyles(), renderDetailFieldRows() + per-field helpers (Priority, Tags, Due, Project, Recur), renderDetailDescription(), renderDetailAnnotations(), renderDetailFooter(). handleDetailFieldEdit() (128→32 lines): uses switch + shared activation helpers (activatePriorityEdit, activateDueEdit, activateTagsEdit, activateProjectEdit, activateRecurEdit, handleDetailDynamicFields). handleEnterOrEdit() (120→42 lines): reuses the same shared helpers from handlers.go; adds a taskStr closure to remove repetitive nil-guards. View() (82→25 lines): extracts appendInlineInputOverlay() that iterates the active editing overlays and appends the focused widget to the layout. Also fix hardcoded Description blink index (was always 9); introduce detailDescriptionFieldIndex() which returns 9 or 10 depending on whether the task has a Recurrence field, matching the dynamic render position. Clarify that Annotations are read-only in the detail view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions