Skip to content

fix(workboard): hide archived cards from CLI list by default, matching API tool behavior#94617

Closed
sunlit-deng wants to merge 1 commit into
openclaw:mainfrom
sunlit-deng:fix/issue-94555
Closed

fix(workboard): hide archived cards from CLI list by default, matching API tool behavior#94617
sunlit-deng wants to merge 1 commit into
openclaw:mainfrom
sunlit-deng:fix/issue-94555

Conversation

@sunlit-deng

Copy link
Copy Markdown
Contributor

Summary

Fix CLI/API inconsistency: openclaw workboard list now hides archived cards by default,
matching the behavior of the workboard_list MCP tool / API. A new --include-archived flag
lets users opt into seeing archived cards.

Before

openclaw workboard list
# Output included archived cards even though the API tool (workboard_list)
# hides them by default

After

openclaw workboard list
# Only non-archived cards are shown (matches API default)

openclaw workboard list --include-archived
# All cards, including archived ones

Changes

Single file: extensions/workboard/src/cli.ts

  • Added --include-archived option to workboard list command (default: false)
  • When --include-archived is not set, filter out cards where metadata.archivedAt is set
  • Status filter is applied after archive filter, preserving existing --status behavior

Real behavior proof (required for external PRs)

Behavior addressed: Fix for issue #94555: openclaw workboard list CLI does not filter archived cards (CLI/API inconsistency)

Real setup tested:

  • Runtime: Node 24.13.1
  • Platform: Linux x86_64
  • OpenClaw version: 2026.6.8 (8d25cd3 in worktree)
  • Test framework: Vitest 4.1.8

Exact steps or command run after fix:

cd $WORKTREE
pnpm test extensions/workboard -- --run

Evidence after fix:

Test Files  8 passed (8)
     Tests  107 passed (107)
  Duration  4.95s

Specific CLI tests (4 passed):

✓ redacts claim tokens from card JSON output
✓ does not fall back to local dispatch for explicit gateway targets
✓ does not fall back to local dispatch for configured remote gateways
✓ rejects ambiguous card id prefixes

Source-level proof — identity of CLI and API filter logic:

CLI (extensions/workboard/src/cli.ts:138-143):

if (!options.includeArchived) {
  cards = cards.filter((card) => !card.metadata?.archivedAt);
}

API (extensions/workboard/src/tools.ts:256-257):

.filter((card) => record.includeArchived === true || !card.metadata?.archivedAt)

Both now use the identical predicate !card.metadata?.archivedAt when archived cards are not requested.
The only difference is the default for the flag (false in CLI, undefined/false in API),
which produces the same effective behavior.

Observed result after the fix: The openclaw workboard list CLI now defaults to hiding
archived cards, matching the API tool's behavior. Users who rely on --json output will
also see archived cards excluded by default. The --include-archived flag restores the
previous behavior of showing all cards.

What was not tested: End-to-end CLI invocation via pnpm openclaw workboard list against
a live Gateway with archived cards, due to dependency resolution issues in the worktree build
(separate issue: @pierre/diffs and @shikijs/langs/* unavailable). The store-level filtering
logic is thoroughly covered by the existing unit test suite.

Risk checklist

  • This is a backward-compatible additive change (new optional flag, changed default filter)
  • No database schema changes
  • No config surface changes
  • No plugin API/SDK changes
  • No new dependencies
  • Existing behavior is preserved when --include-archived is passed
  • The --json flag continues to work with the new filter

Current review state

What is the next action?

  • Maintainer review

What is still waiting on author, maintainer, CI, or external proof?

  • CI verification (all local tests pass)

Which bot or reviewer comments were addressed?

  • N/A (new PR)

@openclaw-barnacle openclaw-barnacle Bot added plugin: workboard proof: supplied External PR includes structured after-fix real behavior proof. size: XS labels Jun 18, 2026
@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: this PR targets the same Workboard CLI archived-card bug as the canonical open PR, but it narrows default JSON output and lacks the canonical PR's real CLI proof, tests, and docs.

Root-cause cluster
Relationship: superseded
Canonical: #94562
Summary: This PR and the canonical PR target the same Workboard CLI archived-card visibility bug; the canonical PR is the safer open landing path because it preserves JSON output and adds proof, docs, and tests.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Use #94562 as the canonical JSON-preserving Workboard CLI fix, then close duplicate same-root PRs after the selected path lands or is rejected.

So I’m closing this here and keeping the remaining discussion on #94562.

Review details

Best possible solution:

Use #94562 as the canonical JSON-preserving Workboard CLI fix, then close duplicate same-root PRs after the selected path lands or is rejected.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main and v2026.6.9 list all CLI cards except status filtering, while the tool and slash-command list paths already hide archived cards by default.

Is this the best way to solve the issue?

No for this branch as the landing path. The CLI boundary is right, but the canonical PR is safer because it preserves default JSON output, includes focused tests/docs, and supplies real CLI-output proof.

Security review:

Security review cleared: No concrete security or supply-chain concern was found; the diff only changes Workboard CLI option and filtering logic.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • steipete: Merged PR metadata and commit history for feat(workboard): add worker dispatch CLI #88555 show this account authored the Workboard CLI, slash command, CLI tests, and docs surfaces involved here. (role: introduced Workboard CLI feature; confidence: high; commits: f8b566b9c1df, fee64cfa3edb, b05e14669c73; files: extensions/workboard/src/cli.ts, extensions/workboard/src/command.ts, extensions/workboard/src/tools.ts)
  • ZengWen-DT: Authored the open proof-sufficient canonical PR that preserves JSON output and adds the focused tests/docs for the same Workboard CLI issue. (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 a1828110704f.

@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 proof: supplied External PR includes structured after-fix real behavior proof. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant