Skip to content

fix(cli): report all matching tasks in task_list total, not just the limited page - #4324

Merged
ruvnet merged 1 commit into
ruvnet:mainfrom
kevin9327:fix-task-list-total
Oct 20, 2026
Merged

ruvnet merged 1 commit into
ruvnet:mainfrom
kevin9327:fix-task-list-total

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Summary

task_list sets total after applying limit, so total always equals the number of returned tasks. ruflo task list then prints Showing 20 of 20 tasks even when 50 tasks match, and MCP callers can't tell that the list was truncated.

Change

mcp-tools/task-tools.ts: count the filtered tasks before slice(0, limit) and return that as total. The returned tasks array and the filters are unchanged.

Tests

New __tests__/task-list-total.test.ts (temp CLAUDE_FLOW_CWD, 4 tasks):

  • limit: 2 returns 2 tasks with total: 4
  • type: 'feature', limit: 1 returns 1 task with total: 3 (filters still apply to the count)
  • with no limit, total equals the number of returned tasks

Before the fix, the first two fail (total is 2 and 1); after it, all pass. __tests__/mcp-tools-deep.test.ts still passes.

This is separate from #4321 (status tasks with status: 'all') and doesn't depend on it.

This change was prepared with AI assistance; I reviewed the diff and verified it by running the tests above.

@kevin9327
kevin9327 requested a review from ruvnet as a code owner October 20, 2026 12:41
@ruvnet
ruvnet merged commit fbddf12 into ruvnet:main Oct 20, 2026
111 checks passed
@ruvnet ruvnet mentioned this pull request Oct 20, 2026
meefs pushed a commit to meefs/claude-code-flow that referenced this pull request Oct 20, 2026
Minor release (new backward-compatible flags: Grok Build CLI host
surface ruvnet#3512, memory list/search tag filter ruvnet#3526) bundled with a
round of correctness fixes merged since 3.58.1: memory delete-sync
(ruvnet#4138), real AgentDB HNSWIndex replacing the dead getController('hnsw')
path with safe exact-search fallback (ruvnet#4249/ruvnet#4322), harness live-process
reporting (ruvnet#3521), RaBitQ on-demand index build (ruvnet#4318/ruvnet#4319),
metaharness ADR-152 cost-dimension and verdict-band fix (ruvnet#3520), swarm
idle-agent heartbeat false-positive (ruvnet#4320), ephemeral-agent termination
idempotency (ruvnet#4323), status/task_list field-mapping and total-count
fixes (ruvnet#4321/ruvnet#4324).

Also fixes the actual cause of broken images/links on
npmjs.com/package/ruflo: `ruflo/package.json`'s `repository.directory:
"ruflo"` field added an extra path layer on top of the README content
(the root README.md, copied in verbatim by `prepublishOnly` at publish
time, which is already written with repo-root-relative paths) — every
relative image/link resolved to e.g. `raw/main/ruflo/ruflo/assets/...`
instead of `raw/main/ruflo/assets/...`. Removed the `directory` field to
match claude-flow's own (directory-less) repository entry. A prior PR
(ruvnet#4325) fixed `ruflo/README.md`'s own relative paths for anyone browsing
that file directly on GitHub, but that file is overwritten by the root
README at publish time and was never the actual npm-rendered content.

Published to npm: @claude-flow/[email protected], [email protected],
[email protected], and standalone @claude-flow/[email protected] (the ruvnet#4249 fix —
not part of the 3-package train, published separately per its own
leaf's npm presence). All three umbrella packages' latest/alpha/v3alpha
dist-tags verified pointing at 3.59.0.

Co-Authored-By: RuFlo <[email protected]>
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.

2 participants