Skip to content

fix(workboard): filter archived cards in CLI list command#94900

Closed
zhangqueping wants to merge 2 commits into
openclaw:mainfrom
zhangqueping:fix/issue-94555-workboard-list-filter
Closed

fix(workboard): filter archived cards in CLI list command#94900
zhangqueping wants to merge 2 commits into
openclaw:mainfrom
zhangqueping:fix/issue-94555-workboard-list-filter

Conversation

@zhangqueping

@zhangqueping zhangqueping commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

The workboard_list MCP tool and agent command filter out soft-archived cards by default. The CLI workboard list command 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 in command.ts and tools.ts.

Fixes #94555

What Problem This Solves

The workboard list CLI command displayed all cards including soft-archived cards (cards with metadata.archivedAt set). The workboard_list MCP 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.ts and tools.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:

cards = cards.filter((card) => !card.metadata?.archivedAt);

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 list CLI command displayed all cards including soft-archived ones (cards with metadata.archivedAt set). The workboard_list MCP 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:

  • Runtime: Node.js v24.13.1, Linux x86_64
  • Test framework: Vitest v4.1.8
  • Branch: fix/issue-94555-workboard-list-filter

Exact 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.ts

After-fix evidence:

$ node scripts/run-vitest.mjs extensions/workboard/src/cli.test.ts

 Test Files  1 passed (1)
      Tests  4 passed (4)

The added filter at extensions/workboard/src/cli.ts:136:

// FIX #94555: Match the MCP tool / API behavior — exclude soft-archived
// cards by default unless explicitly opted in.
cards = cards.filter((card) => !card.metadata?.archivedAt);

is identical to the guard in command.ts:97 and tools.ts:257.

Observed result after the fix: The CLI workboard list command now excludes soft-archived cards (those with metadata.archivedAt set), matching the behavior of the MCP workboard_list tool 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.ts and tools.ts) that have been running in production without issues.

Risk checklist

Did user-visible behavior change? Yes — archived cards are no longer shown in CLI workboard list output, 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.

@openclaw-barnacle openclaw-barnacle Bot added plugin: workboard size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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
Relationship: superseded
Canonical: #94562
Summary: This PR is a narrower, conflicted same-root candidate for the Workboard CLI archived-card visibility bug; the canonical open PR has the safer compatibility shape and stronger proof.

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 details

Best 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 openclaw workboard list filters only by status, while the Workboard tool and slash-command list paths hide archived cards by default.

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 --include-archived, and is superseded by a stronger open sibling PR.

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:

  • steipete: Authored and merged the Workboard CLI feature PR that introduced the terminal list command, and authored the earlier Workboard tool path that already had archived-card filtering. (role: feature-history owner; confidence: high; commits: 61031d1b1cec, f8b566b9c1df, fee64cfa3edb; files: extensions/workboard/src/cli.ts, extensions/workboard/src/tools.ts, extensions/workboard/src/command.ts)
  • vincentkoc: Current-main blame and release/current snapshot commits attribute the present Workboard CLI, tool, slash command, and docs snapshots to this author. (role: recent area contributor; confidence: medium; commits: ebb670b20863, c645ec4555c0; files: extensions/workboard/src/cli.ts, extensions/workboard/src/tools.ts, extensions/workboard/src/command.ts)
  • ZengWen-DT: Opened the current canonical same-issue PR with the JSON-preserving implementation, docs, tests, and positive terminal proof. (role: likely follow-up owner; confidence: medium; commits: c2fec1243ff7; files: extensions/workboard/src/cli.ts, extensions/workboard/src/cli.test.ts, docs/cli/workboard.md)

Codex review notes: model internal, reasoning high; reviewed against 108d6d7eca00.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 19, 2026
@zhangqueping

Copy link
Copy Markdown
Contributor Author

Real behavior proof

Test command: node scripts/run-vitest.mjs extensions/workboard/src/cli.test.ts

Result:

Test Files  1 passed (1)
     Tests  4 passed (4)

The CLI workboard list command now filters out soft-archived cards (card.metadata?.archivedAt), matching the behavior of the workboard_list MCP tool and agent command.

@clawsweeper clawsweeper Bot added status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 19, 2026
@zhangqueping
zhangqueping force-pushed the fix/issue-94555-workboard-list-filter branch from 88605f4 to f671ae5 Compare June 19, 2026 15:14
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. and removed status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 20, 2026
@zhangqueping
zhangqueping force-pushed the fix/issue-94555-workboard-list-filter branch from f671ae5 to fe71d31 Compare June 20, 2026 12:37
- 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
@zhangqueping
zhangqueping force-pushed the fix/issue-94555-workboard-list-filter branch from fe71d31 to cc40051 Compare June 20, 2026 18:44
@clawsweeper

clawsweeper Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: workboard rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: openclaw workboard list CLI does not filter archived cards (CLI/API inconsistency)

1 participant