Feature 50/move tasks across project #88
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature-50/move-tasks-across-project"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
Closes #50
Closes #79
Closes #78
@ -0,0 +24,4 @@return nil, fmt.Errorf("task ID and project ID are required")}if len(args) > 2 {The
len(args) > 2check is redundant because the cobra command already enforcesExactArgs(2)(see switch.go:36). This validation will never be reached.@ -754,0 +801,4 @@m.Forms.Form.EditingTaskID = 0}m.Pickers.Project.Reset()return m, nilMissing
m.Pickers.Project.Reset()call before returning. This can leave stale state in the picker after closing. Compare with the esc case at line 768 which correctly calls Reset().@ -48,9 +48,8 @@ type KeyMappings struct {Quit string `yaml:"quit"`Dead code:
SortListfield is no longer used after removing the sort functionality. Should be removed along with its default value and validation logic (lines 105, 218-219).When
sql.ErrNoRowsis returned, the error should be wrapped with a descriptive message instead of returning it directly. This makes it inconsistent with the handling of other database operations in this function (lines 1239-1240, 1248-1249). Should return something likefmt.Errorf("task %d not found", taskID)instead.Review Summary
Found 4 substantive issues:
Dead code in keymaps (internal/config/keymaps.go:53): The
SortListfield is no longer used after removing the sort functionality. Should be removed along with its default value and validation logic.Missing Reset() call (internal/tui/update_pickers.go:799-803): The project picker's enter case doesn't call
m.Pickers.Project.Reset()before returning, which can leave stale state. Compare with the esc case at line 768 which correctly calls Reset().Redundant validation (internal/cli/task/switch_logic.go:27): The
len(args) > 2check is redundant because cobra already enforcesExactArgs(2). This validation will never be reached.Inconsistent error handling (internal/services/task/service.go:1226-1228): When
sql.ErrNoRowsis returned, the error should be wrapped with a descriptive message instead of returned directly. This is inconsistent with other database operations in the same function (lines 1239-1240, 1248-1249).Score: 7/10
The implementation is functionally correct with good test coverage, but has cleanup issues (dead code) and minor bugs (missing Reset call, inconsistent error handling) that should be addressed.