add quick edit keybindings for labels, priority, and assignee from ka… #64

Merged
noe.trevino merged 3 commits from feature/kanban-keybindings into main 2026-02-11 23:47:48 -06:00
Owner

…nban board

…nban board
github-actions[bot] commented 2026-02-11 22:28:57 -06:00 (Migrated from github.com)

PR Summary (auto-generated)

  • Added quick-edit keybindings for labels (ctrl+l), priority (ctrl+r), and assignee (ctrl+a) directly from the kanban board
  • Changed default label keybinding from "l" to "ctrl+l" to avoid conflicts with the new quick-edit workflow
  • Implemented three new picker initialization functions (initLabelPickerForBoard, initPriorityPickerForBoard, initAssigneePickerForBoard) that open pickers in "view mode" where selections apply immediately to the database
  • Updated internal/config/keymaps.go to include new EditPriority and EditAssignee fields with default values and fallback logic
  • Modified picker update handlers to clear EditingTaskID when returning to NormalMode, preventing state leakage between board and form contexts
  • Key files affected: internal/config/keymaps.go, internal/tui/model.go, internal/tui/update_normal.go, internal/tui/update_pickers.go
**PR Summary** _(auto-generated)_ - Added quick-edit keybindings for labels (ctrl+l), priority (ctrl+r), and assignee (ctrl+a) directly from the kanban board - Changed default label keybinding from "l" to "ctrl+l" to avoid conflicts with the new quick-edit workflow - Implemented three new picker initialization functions (initLabelPickerForBoard, initPriorityPickerForBoard, initAssigneePickerForBoard) that open pickers in "view mode" where selections apply immediately to the database - Updated internal/config/keymaps.go to include new EditPriority and EditAssignee fields with default values and fallback logic - Modified picker update handlers to clear EditingTaskID when returning to NormalMode, preventing state leakage between board and form contexts - Key files affected: internal/config/keymaps.go, internal/tui/model.go, internal/tui/update_normal.go, internal/tui/update_pickers.go
claude[bot] (Migrated from github.com) reviewed 2026-02-11 22:29:07 -06:00
claude[bot] (Migrated from github.com) commented 2026-02-11 22:29:07 -06:00

DRY violation: This entire function duplicates the pattern from initLabelPickerForForm (lines ~920-946). The only differences are:

  1. ReturnMode assignment (NormalMode vs TicketFormMode)
  2. Setting EditingTaskID

Extract the common logic into a shared helper function that accepts the return mode and whether to set EditingTaskID as parameters.

DRY violation: This entire function duplicates the pattern from `initLabelPickerForForm` (lines ~920-946). The only differences are: 1. ReturnMode assignment (NormalMode vs TicketFormMode) 2. Setting `EditingTaskID` Extract the common logic into a shared helper function that accepts the return mode and whether to set EditingTaskID as parameters.
claude[bot] (Migrated from github.com) reviewed 2026-02-11 22:29:08 -06:00
claude[bot] (Migrated from github.com) commented 2026-02-11 22:29:08 -06:00

DRY violation: This function is nearly identical to initPriorityPickerForForm (lines ~920-946). The only difference is the ReturnMode assignment and setting EditingTaskID. Extract shared initialization logic into a common helper function.

DRY violation: This function is nearly identical to `initPriorityPickerForForm` (lines ~920-946). The only difference is the ReturnMode assignment and setting EditingTaskID. Extract shared initialization logic into a common helper function.
claude[bot] (Migrated from github.com) reviewed 2026-02-11 22:29:10 -06:00
claude[bot] (Migrated from github.com) commented 2026-02-11 22:29:10 -06:00

DRY violation: This function duplicates initAssigneePickerForForm (lines 980-1007) almost verbatim. The only differences are ReturnMode and EditingTaskID assignment. The entire cursor positioning logic (lines 1114-1121) is identical. Refactor to eliminate this duplication.

DRY violation: This function duplicates `initAssigneePickerForForm` (lines 980-1007) almost verbatim. The only differences are ReturnMode and EditingTaskID assignment. The entire cursor positioning logic (lines 1114-1121) is identical. Refactor to eliminate this duplication.
claude[bot] (Migrated from github.com) reviewed 2026-02-11 22:29:13 -06:00
@ -537,0 +560,4 @@
func (m Model) handleQuickEditAssignee() (tea.Model, tea.Cmd) {
if !m.initAssigneePicker(state.NormalMode) {
return m, nil
}
claude[bot] (Migrated from github.com) commented 2026-02-11 22:29:13 -06:00

Unnecessary guard pattern: These three handler functions (lines 544-566) have identical structure. This pattern can be flattened with a helper function that takes the picker initialization function and mode as parameters, reducing from 21 lines to ~7 lines.

Unnecessary guard pattern: These three handler functions (lines 544-566) have identical structure. This pattern can be flattened with a helper function that takes the picker initialization function and mode as parameters, reducing from 21 lines to ~7 lines.
claude[bot] (Migrated from github.com) reviewed 2026-02-11 22:29:15 -06:00
@ -44,2 +44,4 @@
// In view mode: return to NormalMode
m.UIState.Mode = state.NormalMode
// Clear EditingTaskID when returning to board
m.Forms.Form.EditingTaskID = 0
claude[bot] (Migrated from github.com) commented 2026-02-11 22:29:15 -06:00

DRY violation: This "clear EditingTaskID when returning to board" pattern is repeated identically in 3 places (lines 46-47, 667-669, 762-765, 824-827). Extract into a helper method or consolidate the clearing logic.

DRY violation: This "clear EditingTaskID when returning to board" pattern is repeated identically in 3 places (lines 46-47, 667-669, 762-765, 824-827). Extract into a helper method or consolidate the clearing logic.
claude[bot] (Migrated from github.com) reviewed 2026-02-11 22:29:17 -06:00
claude[bot] (Migrated from github.com) commented 2026-02-11 22:29:17 -06:00

Inconsistent error handling: When getCurrentProject() returns nil at line 1020, the function silently returns false without logging or notifying the user. This is inconsistent with the error handling pattern at lines 1014-1016 where a notification is added. Either add a notification here or document why this case is expected to fail silently.

Inconsistent error handling: When `getCurrentProject()` returns nil at line 1020, the function silently returns false without logging or notifying the user. This is inconsistent with the error handling pattern at lines 1014-1016 where a notification is added. Either add a notification here or document why this case is expected to fail silently.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
noe.trevino/paso!64
No description provided.