Skip to content

refactor(cli): remove client-side tag filtering from issue.go#383

Open
proboscis wants to merge 1 commit intomainfrom
issue/orch-389/run-20260201-104239
Open

refactor(cli): remove client-side tag filtering from issue.go#383
proboscis wants to merge 1 commit intomainfrom
issue/orch-389/run-20260201-104239

Conversation

@proboscis
Copy link
Owner

Summary

  • Pass --tag and --tag-any filters to daemon API instead of filtering client-side
  • Remove matchTagsAnd and matchIssueFilters functions from issue.go (daemon handles this server-side)
  • Keep matchTagsOr for edge case when both --tag and --tag-any are specified

Changes

File Change
internal/daemon/proto_client.go Add tags and tagsMode parameters to ListIssues
internal/orchapi/daemon_client.go Pass tag filters through to proto client
internal/cli/issue.go Use daemon API for tag filtering, remove client-side functions
internal/cli/issue_test.go Remove tests for deleted functions

Verification

# All tests pass
go test ./internal/cli/... ./internal/daemon/... ./internal/orchapi/...

# Build succeeds
go build ./...

Notes

The daemon already supported server-side tag filtering via ListIssuesRequest.tags and ListIssuesRequest.tags_mode (implemented in orch-383). This PR updates the CLI to leverage that capability instead of duplicating the filtering logic client-side.

When both --tag (AND) and --tag-any (OR) are specified, we pass --tag to daemon and do secondary filtering client-side for --tag-any since the daemon only supports one tag mode at a time.

Closes orch-389

Pass --tag and --tag-any filters to daemon API instead of filtering
client-side. The daemon already supports server-side tag filtering
via ListIssuesRequest.tags and ListIssuesRequest.tags_mode fields.

Changes:
- Update proto_client.ListIssues to accept tags/tagsMode parameters
- Update daemon_client.ListIssues to pass tag filters through
- Modify runIssueListViaDaemon to pass tags to daemon API
- Remove matchTagsAnd function (daemon handles AND logic)
- Remove matchIssueFilters function (no longer used)
- Keep matchTagsOr for edge case when both --tag and --tag-any are used

Note: When both --tag (AND) and --tag-any (OR) are specified, we pass
--tag to daemon and do secondary filtering client-side for --tag-any
since daemon only supports one tag mode at a time.

Closes orch-389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant