Skip to content

Add cross-space tag/status/assignee filtering to suth cards list #70

@steveclarke

Description

@steveclarke

Context

The views/preview API endpoint (POST /{team_id}/views/preview) already supports rich filtering that isn't exposed through the CLI. We're designing a workflow simplification for the Unio project that relies on tag-based cross-space queries to replace dedicated pipeline boards with Saved Filters and agent-powered triage.

What the API supports (but CLI doesn't expose)

The build_card_filters method in resources/cards.rb currently only passes through board, list, space, and sprint filters. The API supports much more:

High-priority additions:

  • tags — tag ID array filtering (card_filters.include.tags)
  • statuses — status filtering
  • members — assignee filtering
  • Cross-space querying — the API doesn't require boards in the include filter; omitting it returns workspace-wide results

Medium-priority additions:

  • priority — priority filtering
  • epics — epic/project filtering
  • parent_cards — parent card filtering
  • sort_by / order_ascending — server-side sorting
  • Date range filters (time_created, time_updated, due_date, etc.) with relative expressions like now-7d
  • Boolean existence filters (has_members, has_tags, has_priority)
  • exclude counterpart to include filters

Proposed CLI changes

Quick win: --tag filter

TagResolvable concern already exists. Just needs:

  1. Add includes[:tags] = [tag_id] if filters[:tag_id] to build_card_filters
  2. Add option :tag to CLI commands
  3. Works on both suth cards list and suth cards assigned

Quick win: workspace-wide listing without --board

Allow suth cards list to work without --board when other filters are provided (tag, status, assignee). The views/preview endpoint doesn't require board_id.

Quick win: --status and --assignee filters

Same pattern as tags — plumb through build_card_filters and CLI options.

Quick win: server-side sorting

Add --sort (time_created, time_updated, status, priority, due_date, estimate) and --order (asc/desc).

Quick win: server-side date filtering

Move from client-side filter_by_date to API-native date range support. The API accepts relative expressions like now-1d, now-7d.

Use cases these enable

# "What am I working on?" — cross-space, my cards, not done
suth cards list --assignee me --status "To Do,Doing,In Review"

# "What feature trackers are active?" — workspace-wide by tag
suth cards list --tag feature-tracker --status "To Do,Doing,In Review"

# "What shipped this sprint?" — by tag + date
suth cards list --tag task-tracker --status Done --updated-since "2 weeks ago"

# "What needs breakdown?" — by tag
suth cards list --tag needs-breakdown

Note on undocumented API capabilities

Even if some filtering capabilities aren't in the official API docs, the Superthread web app is a frontend making calls to the same backend. The network panel in the browser can be used to reverse-engineer request shapes for any functionality visible in the UI (e.g., Saved Filters/Views CRUD). Worth investigating if official endpoints are insufficient.

Related

This supports a workflow simplification effort in the Unio project to reduce pipeline board ceremony and enable agent-powered daily triage via the suth CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions