Feature 47/archive tasks #97
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!97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature-47/archive-tasks"
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 #49
Informational Warning:
The snapshot tests have been changed.
Please add a screenshot showing what has been changed, and a description of why it was changed.
If you do not provide an explanation and screenshot in 3 days, this PR will be closed.
@TheNoeTrevino
Changed snapshot files (9 files)
internal/testing/snapshots/cli/testdata/e2e/task-show.goldeninternal/testing/snapshots/tui/testdata/board_with_labels.goldeninternal/testing/snapshots/tui/testdata/board_with_multiple_tasks.goldeninternal/testing/snapshots/tui/testdata/board_with_tasks.goldeninternal/testing/snapshots/tui/testdata/connection_disconnected.goldeninternal/testing/snapshots/tui/testdata/connection_reconnecting.goldeninternal/testing/snapshots/tui/testdata/empty_project_board.goldeninternal/testing/snapshots/tui/testdata/notification_error.goldeninternal/testing/snapshots/tui/testdata/notification_warning.golden@ -50,13 +50,21 @@ func toGeneratedGetTaskBelowParams(t types.GetTaskBelowParams) generated_sqlite.}The variable
showArchivedis declared asinterface{}but is only assignedint64values. This can be simplified tovar showArchived int64and directly assigned without the unnecessary type widening.@ -51,2 +51,4 @@func toGeneratedGetTaskSummariesWithFiltersParams(t types.GetTaskSummariesWithFiltersParams) generated_sqlite.GetTaskSummariesWithFiltersParams {var showArchived int64if t.ShowArchived {This if-else can be simplified using a ternary-style approach or direct boolean-to-int conversion. Consider:
This eliminates the else branch entirely (guard pattern flattening).
@ -49,13 +44,47 @@ func RenderFilterBar(props FilterBarProps) string {Width(props.Width).Typo: "creats" should be "creates".
PR Review Summary
Found a few minor issues:
internal/database/adapters/sqlite/convert_to.go:53-58 - Unnecessary use of interface{} type for showArchived variable when int64 would suffice. The if-else structure can also be flattened following guard pattern principles.
internal/tui/components/filter_bar.go:55 - Typo in comment: "creats" should be "creates".
The implementation is sound overall. The archived task feature is correctly integrated across database layers (migrations, queries, adapters), service layer, and UI components. Test coverage is comprehensive with the new filter_bar_test.go file.
Score: 8/10
Deductions for the unnecessary type widening and minor documentation typo.