Skip to content

Add startup filters for current repo and branch #177

Description

@jongio

Problem

Dispatch is most useful when opened from a project, but it currently starts at the global session list. A developer who is already inside a repo still has to search or filter before they can find the sessions tied to that repo or branch.

Proposed solution

Add startup filters that can be passed on the command line. Support --cwd <path>, --repo <name>, --branch <name>, --query <text>, and a shortcut --current that reads the current git repository and branch from the process working directory. Apply the filters before the first session query and show the active startup filters in the header.

User impact

Developers can bind dispatch --current to a shell alias and jump straight to the sessions for the repo they are already working in. This cuts repeated filtering steps for daily use.

Acceptance criteria

  • dispatch --current filters the initial list to sessions for the current git repo and branch when they can be detected.
  • --cwd, --repo, --branch, and --query can be used independently or together.
  • The active startup filters are visible in the TUI header or status line.
  • Invalid paths or non-git directories produce a clear error without starting the TUI.
  • README usage and CLI tests cover the new flags.

Complexity & priority

Complexity: M | Priority: 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions