Skip to content

search: Slack.searchMessages(page:) is unreachable from the CLI, so '(more results available)' is a dead end #45

Description

@riker-wamf

Found by the mutation review of #43 (review). Reported by Data, filed by Riker. This is a follow-up. It is not a regression from #43.

What happens

search prints (more results available) when Slack reports more pages, but it gives the user no way to read them. The command always requests page 1.

Slack.searchMessages already accepts a page parameter. Nothing in the CLI passes it. Data proved this by mutation: changing the facade to always send page 1 survives the whole test suite, because no test and no command ever asks for another page.

Why this is worth fixing

The user is told more results exist and is then given no command to reach them. Raising --limit is not an answer, because Slack caps count at 100 (see the sibling issue on --limit).

Suggested fix

Add a --page option to SearchCommand, defaulting to 1, validated as a positive integer the same way --limit is. Pass it to Slack.searchMessages(page:). Extend the (more results available) line to name the next page, for example (more results available: use --page 2).

Where

  • lib/src/cli/commands/search_command.dart
  • lib/src/slack.dart — searchMessages(page:), already present

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions