WL-0MP2ISZ8Q008Q19S: Support comma-separated --status filters in wl list#2005
Merged
SorraTheOrc merged 1 commit intoMay 22, 2026
Merged
Conversation
Changes: - src/types.ts: Changed WorkItemQuery.status from single WorkItemStatus to WorkItemStatus[] for OR semantics - src/cli-types.ts: Changed ListOptions.status to string (raw CLI input) - src/commands/list.ts: Parse comma-separated --status, validate each value against known statuses, return helpful error for invalid values - src/database.ts: Filter items against array of statuses with OR semantics (item.status matches any in the array) - src/commands/in-progress.ts: Wrap single status in array - src/api.ts: Parse comma-separated status from query params into array (both /items and /projects/:prefix/items endpoints) - src/tui/controller.ts: Wrap single status values in arrays - src/tui/wl-db-adapter.ts: Join status array with commas for CLI - tests/database.test.ts: Updated existing tests for array status, added test for multi-value status filtering - tests/cli/issue-status.test.ts: Added tests for comma-separated --status, combination with --stage, and invalid status validation - tests/sort-operations.test.ts, tests/tui/wl-db-adapter.test.ts: Updated status filter usage to array format - CLI.md, AGENTS.md, templates/AGENTS.md, EXAMPLES.md: Documented comma-separated --status usage with examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for comma-separated
--statusvalues inwl list, allowing users to filter by multiple statuses with OR semantics.Work Done
src/types.ts: ChangedWorkItemQuery.statusfrom singleWorkItemStatustoWorkItemStatus[]for OR semanticssrc/commands/list.ts: Parse comma-separated--status, validate each value against known statuses, return helpful error for invalid valuessrc/database.ts: Filter items against array of statuses with OR semanticssrc/commands/in-progress.ts,src/api.ts,src/tui/controller.ts,src/tui/wl-db-adapter.ts: Updated all usages ofquery.statusto use array format--stage, and invalid status validationHow to Test
Review Focus
WorkItemQuery.statustype change fromWorkItemStatustoWorkItemStatus[]affects several call sites — ensure all are properly updated--statusvalues continue to work as beforelist.tsprovides helpful error messages for invalid statusesRelated: WL-0MP2ISZ8Q008Q19S