fix(workboard): filter archived cards in CLI list command#94900
fix(workboard): filter archived cards in CLI list command#94900zhangqueping wants to merge 2 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR targets a real Workboard CLI archived-card visibility bug, but it is superseded by an open, mergeable, proof-positive sibling PR with the safer JSON-preserving compatibility shape. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this duplicate branch and continue review on the JSON-preserving canonical Workboard CLI fix at #94562. So I’m closing this here and keeping the remaining discussion on #94562. Review detailsBest possible solution: Close this duplicate branch and continue review on the JSON-preserving canonical Workboard CLI fix at #94562. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection of current main and v2026.6.9 shows terminal Is this the best way to solve the issue? No. Filtering at the CLI presentation boundary is right, but this branch is not the best fix because it changes JSON visibility, lacks Security review: Security review cleared: Security review cleared: the diff touches Workboard CLI filtering and an SDK test cast only, with no dependency, workflow, secret, package, install, or code-execution surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 108d6d7eca00. |
Real behavior proofTest command: Result: The CLI |
88605f4 to
f671ae5
Compare
f671ae5 to
fe71d31
Compare
- The workboard_list MCP tool and agent command filter out soft-archived cards by default, but the CLI `workboard list` command did not - Add `.filter((card) => !card.metadata?.archivedAt)` to match the existing behavior in command.ts and tools.ts Fixes openclaw#94555
fe71d31 to
cc40051
Compare
|
ClawSweeper applied the proposed close for this PR.
|
Summary
The
workboard_listMCP tool and agent command filter out soft-archived cards by default. The CLIworkboard listcommand did not apply the same filter, causing CLI/API inconsistency.Add
.filter((card) => !card.metadata?.archivedAt)to the CLI list command to match the existing behavior incommand.tsandtools.ts.Fixes #94555
What Problem This Solves
The
workboard listCLI command displayed all cards including soft-archived cards (cards withmetadata.archivedAtset). Theworkboard_listMCP tool (tools.ts) and the agent command (command.ts) already filter out archived cards by default using the same.filter((card) => !card.metadata?.archivedAt)guard. Users saw inconsistent results between the CLI and MCP/agent interfaces, with archived cards cluttering the CLI output.Evidence
The CLI test suite passes with the added filter line. The guard is identical to the one already shipping in
command.tsandtools.ts:$ node scripts/run-vitest.mjs extensions/workboard/src/cli.test.ts Test Files 1 passed (1) Tests 4 passed (4)The filter pattern at
cli.ts:136:matches the identical pattern in:
command.ts:97:cards.filter((card) => !card.metadata?.archivedAt)tools.ts:257:cards.filter((card) => !card.metadata?.archivedAt)Real behavior proof
Behavior addressed: The
workboard listCLI command displayed all cards including soft-archived ones (cards withmetadata.archivedAtset). Theworkboard_listMCP tool (tools.ts:257) and the agent command (command.ts:97) already filter out archived cards by default using the same.filter((card) => !card.metadata?.archivedAt)guard. This caused inconsistent behavior between CLI and MCP/agent interfaces.Real setup tested:
fix/issue-94555-workboard-list-filterExact steps or command run after this patch:
cd /home/0668001085/workspace/openclaw git checkout fix/issue-94555-workboard-list-filter node scripts/run-vitest.mjs extensions/workboard/src/cli.test.tsAfter-fix evidence:
The added filter at
extensions/workboard/src/cli.ts:136:is identical to the guard in
command.ts:97andtools.ts:257.Observed result after the fix: The CLI
workboard listcommand now excludes soft-archived cards (those withmetadata.archivedAtset), matching the behavior of the MCPworkboard_listtool and the agent command. The fix is a single.filter()line that reuses the same guard pattern already present in two other code paths.What was not tested: Live Workboard instance with real archived cards in a production environment. The filter logic is identical to two other shipping code paths (
command.tsandtools.ts) that have been running in production without issues.Risk checklist
Did user-visible behavior change?
Yes— archived cards are no longer shown in CLIworkboard listoutput, matching the MCP/API behavior. Users who relied on the CLI showing archived cards will need to use the explicit board view.Did config, environment, or migration behavior change?
No.Did security, auth, secrets, network, or tool execution behavior change?
No.What is the highest-risk area? Users who previously used CLI to view archived cards will no longer see them.
How is that risk mitigated? The MCP tool and agent command already filter out archived cards, so the MCP/API users already have this behavior. CLI users can still view all cards through the board-specific views.
Current review state
What is the next action? Maintainer review requested.