Skip to content

Add channel thread listing with pagination and filtering #39

@gnapse

Description

@gnapse

Problem

Today tw can list inbox threads and filter that list by channel (tw inbox --channel ...), but there is no direct way to list threads for a specific channel as a first-class command. That makes it hard to:

  • browse all threads in a channel (not only inbox-centric views)
  • paginate through channel history
  • apply channel-scoped filters in a predictable way for humans and agents

Proposal

Add channel-thread listing support with pagination and filtering.

Possible UX options (choose one and document in skill content):

  1. tw channel threads <channel-ref> [workspace-ref]
  2. tw thread list --channel <channel-ref> [workspace-ref]

Minimum Requirements

  • Channel reference resolution should support existing ref patterns (numeric ID, id:, Twist URL where applicable, and fuzzy name when unambiguous).
  • Pagination support:
    • --limit <n>
    • --cursor <cursor> (or equivalent continuation token)
    • machine-readable next cursor in --json and --ndjson output
  • Filtering support (initial set):
    • unread only (--unread)
    • date window (--since, --until)
    • archived/include-archived behavior (if API supports it)
  • Output parity with existing conventions:
    • human-readable text output
    • --json, --ndjson, and --full

Acceptance Criteria

  • User can list threads for a single channel without going through inbox.
  • Results can be paginated reliably across multiple pages.
  • Filters are applied server-side where supported; otherwise clearly documented fallback behavior.
  • Tests cover ref resolution, pagination metadata, and filter behavior.
  • src/lib/skills/content.ts is updated to include the new command + examples.

Notes

This aligns with recent CLI ergonomics in related Doist CLIs (URL/ref-friendly navigation plus explicit view/list routes) and would close a current discoverability gap in tw.

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