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:
- Add
includes[:tags] = [tag_id] if filters[:tag_id] to build_card_filters
- Add
option :tag to CLI commands
- 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.
Context
The
views/previewAPI 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_filtersmethod inresources/cards.rbcurrently only passes throughboard,list,space, andsprintfilters. The API supports much more:High-priority additions:
tags— tag ID array filtering (card_filters.include.tags)statuses— status filteringmembers— assignee filteringboardsin the include filter; omitting it returns workspace-wide resultsMedium-priority additions:
priority— priority filteringepics— epic/project filteringparent_cards— parent card filteringsort_by/order_ascending— server-side sortingtime_created,time_updated,due_date, etc.) with relative expressions likenow-7dhas_members,has_tags,has_priority)excludecounterpart toincludefiltersProposed CLI changes
Quick win:
--tagfilterTagResolvableconcern already exists. Just needs:includes[:tags] = [tag_id] if filters[:tag_id]tobuild_card_filtersoption :tagto CLI commandssuth cards listandsuth cards assignedQuick win: workspace-wide listing without
--boardAllow
suth cards listto work without--boardwhen other filters are provided (tag, status, assignee). Theviews/previewendpoint doesn't require board_id.Quick win:
--statusand--assigneefiltersSame pattern as tags — plumb through
build_card_filtersand 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_dateto API-native date range support. The API accepts relative expressions likenow-1d,now-7d.Use cases these enable
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
suthCLI.