fix(cli): thread list defaults to active threads only #159

Merged
xingyue merged 1 commits from fix/147-thread-list-active-default into main 2026-06-07 14:12:15 +00:00
Owner

What

Change uwf thread list default behavior to show only active (idle + running) threads. Add --all flag to opt into the previous full-list behavior.

Why

Closes #147. With hundreds of completed/cancelled threads accumulating in real-world usage, the previous default (return everything) was too noisy to be useful. Users almost always want to see active work; they can opt in to the historical view explicitly.

Changes

  • cmdThreadList gains a showAll: boolean parameter (default false). When neither --status nor --all is supplied, the effective filter is ["idle", "running"].
  • CLI registers --all option on thread list and threads it through.
  • Explicit --status continues to win over both the default and --all (precise filter beats opt-in).
  • Test suite extended: new cmdThreadList default behavior (issue #147) describe block covers default-only-active, --all, status-vs-all precedence, time/pagination composition, and empty list.
  • Existing tests that implicitly relied on "show everything" updated to pass showAll=true or an explicit status filter.
  • README, cli-reference, and usage-reference updated to document the new default and the --all flag.

Ref

Fixes #147

## What Change `uwf thread list` default behavior to show only active (idle + running) threads. Add `--all` flag to opt into the previous full-list behavior. ## Why Closes #147. With hundreds of completed/cancelled threads accumulating in real-world usage, the previous default (return everything) was too noisy to be useful. Users almost always want to see active work; they can opt in to the historical view explicitly. ## Changes - `cmdThreadList` gains a `showAll: boolean` parameter (default `false`). When neither `--status` nor `--all` is supplied, the effective filter is `["idle", "running"]`. - CLI registers `--all` option on `thread list` and threads it through. - Explicit `--status` continues to win over both the default and `--all` (precise filter beats opt-in). - Test suite extended: new `cmdThreadList default behavior (issue #147)` describe block covers default-only-active, `--all`, status-vs-all precedence, time/pagination composition, and empty list. - Existing tests that implicitly relied on "show everything" updated to pass `showAll=true` or an explicit status filter. - README, cli-reference, and usage-reference updated to document the new default and the `--all` flag. ## Ref Fixes #147
xiaoju added 1 commit 2026-06-07 14:03:27 +00:00
feat(cli): thread list defaults to active threads only
CI / check (pull_request) Successful in 2m52s
ae757e4d44
Closes #147. Changes default behavior of `uwf thread list` to show only
active threads (idle + running). Adds `--all` flag to opt into the
previous full-list behavior. Explicit `--status` still wins over `--all`.

- cmdThreadList gains a `showAll: boolean` parameter (default false)
- CLI registers `--all` option and passes it through
- Test suite includes new `default behavior (issue #147)` describe block
  covering 9 scenarios; existing tests updated where they implicitly
  relied on the old "show everything" behavior
- README, cli-reference, and usage-reference updated to document the
  new default and the `--all` flag

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
xingyue approved these changes 2026-06-07 14:12:14 +00:00
xingyue left a comment
Owner

LGTM

过滤逻辑简洁正确:--status > --all > default(idle+running)。

10 个新测试覆盖了完整行为矩阵(default/--all/--status/组合/空列表/time+pagination),旧测试正确更新而非删除。

小橘今天 4 个 PR 全流程 + 零 reject,太强了 🔥

LGTM ✅ 过滤逻辑简洁正确:`--status` > `--all` > default(idle+running)。 10 个新测试覆盖了完整行为矩阵(default/--all/--status/组合/空列表/time+pagination),旧测试正确更新而非删除。 小橘今天 4 个 PR 全流程 + 零 reject,太强了 🔥
xingyue merged commit 60fdb0a7ff into main 2026-06-07 14:12:15 +00:00
xingyue deleted branch fix/147-thread-list-active-default 2026-06-07 14:12:16 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#159