Feature 47/archive tasks #97

Merged
noe.trevino merged 8 commits from feature-47/archive-tasks into main 2026-02-16 04:41:06 -06:00
Owner

Checklist

  • Read CONTRIBUTING.md
  • Ran tests (go test ./... -race) locally
  • Formatted and linted with gofmt -w . and golangci-lint run ./... respectively
  • Added tests if necessary (significant changes/complex logic)
  • Updated documentation if applicable
  • Updated README.md if applicable

Summary

Closes #49

## Checklist - [x] Read `CONTRIBUTING.md` - [x] Ran tests (`go test ./... -race`) locally - [x] Formatted and linted with `gofmt -w .` and `golangci-lint run ./...` respectively - [x] Added tests if necessary (significant changes/complex logic) - [x] Updated documentation if applicable - [x] Updated `README.md` if applicable ## Summary <!-- What does this PR change and/or fix? Examples: Closes: 54 Fixes: 67 --> Closes #49
github-actions[bot] commented 2026-02-16 04:27:39 -06:00 (Migrated from github.com)

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.golden
  • internal/testing/snapshots/tui/testdata/board_with_labels.golden
  • internal/testing/snapshots/tui/testdata/board_with_multiple_tasks.golden
  • internal/testing/snapshots/tui/testdata/board_with_tasks.golden
  • internal/testing/snapshots/tui/testdata/connection_disconnected.golden
  • internal/testing/snapshots/tui/testdata/connection_reconnecting.golden
  • internal/testing/snapshots/tui/testdata/empty_project_board.golden
  • internal/testing/snapshots/tui/testdata/notification_error.golden
  • internal/testing/snapshots/tui/testdata/notification_warning.golden
<!-- snapshot-warning --> **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 <details> <summary>Changed snapshot files (9 files)</summary> - `internal/testing/snapshots/cli/testdata/e2e/task-show.golden` - `internal/testing/snapshots/tui/testdata/board_with_labels.golden` - `internal/testing/snapshots/tui/testdata/board_with_multiple_tasks.golden` - `internal/testing/snapshots/tui/testdata/board_with_tasks.golden` - `internal/testing/snapshots/tui/testdata/connection_disconnected.golden` - `internal/testing/snapshots/tui/testdata/connection_reconnecting.golden` - `internal/testing/snapshots/tui/testdata/empty_project_board.golden` - `internal/testing/snapshots/tui/testdata/notification_error.golden` - `internal/testing/snapshots/tui/testdata/notification_warning.golden` </details>
claude[bot] (Migrated from github.com) reviewed 2026-02-16 04:28:37 -06:00
@ -50,13 +50,21 @@ func toGeneratedGetTaskBelowParams(t types.GetTaskBelowParams) generated_sqlite.
}
claude[bot] (Migrated from github.com) commented 2026-02-16 04:28:37 -06:00

The variable showArchived is declared as interface{} but is only assigned int64 values. This can be simplified to var showArchived int64 and directly assigned without the unnecessary type widening.

The variable `showArchived` is declared as `interface{}` but is only assigned `int64` values. This can be simplified to `var showArchived int64` and directly assigned without the unnecessary type widening.
claude[bot] (Migrated from github.com) reviewed 2026-02-16 04:28:39 -06:00
@ -51,2 +51,4 @@
func toGeneratedGetTaskSummariesWithFiltersParams(t types.GetTaskSummariesWithFiltersParams) generated_sqlite.GetTaskSummariesWithFiltersParams {
var showArchived int64
if t.ShowArchived {
claude[bot] (Migrated from github.com) commented 2026-02-16 04:28:39 -06:00

This if-else can be simplified using a ternary-style approach or direct boolean-to-int conversion. Consider:

showArchived := int64(0)
if t.ShowArchived {
	showArchived = int64(1)
}

This eliminates the else branch entirely (guard pattern flattening).

This if-else can be simplified using a ternary-style approach or direct boolean-to-int conversion. Consider: ```suggestion showArchived := int64(0) if t.ShowArchived { showArchived = int64(1) } ``` This eliminates the else branch entirely (guard pattern flattening).
claude[bot] (Migrated from github.com) reviewed 2026-02-16 04:28:41 -06:00
@ -49,13 +44,47 @@ func RenderFilterBar(props FilterBarProps) string {
Width(props.Width).
claude[bot] (Migrated from github.com) commented 2026-02-16 04:28:41 -06:00

Typo: "creats" should be "creates".

Typo: "creats" should be "creates".
claude[bot] commented 2026-02-16 04:28:55 -06:00 (Migrated from github.com)

PR Review Summary

Found a few minor issues:

  1. 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.

  2. 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.

## PR Review Summary Found a few minor issues: 1. **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. 2. **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.
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!97
No description provided.