Skip to content

Filter draft list to current project by default - #105

Merged
vm-mishchenko merged 1 commit into
mainfrom
260521-spec-list-current-project
May 22, 2026
Merged

vm-mishchenko merged 1 commit into
mainfrom
260521-spec-list-current-project

Conversation

@vm-mishchenko

Copy link
Copy Markdown
Owner

Summary

  • draft list now defaults to showing runs for the current git project only, using git rev-parse and git worktree list --porcelain to detect the project name
  • draft list --all and outside-git usage retain the previous global behavior showing runs from all projects
  • Linked worktrees resolve to the main worktree basename so project detection is consistent across worktrees

Test plan

  • Added tests covering: project filtering, --all flag skipping git, outside-git fallback, missing project directory, linked worktree resolution, git error handling, 15-run limit within a project, and JSON output with project selection
  • Updated existing rendering tests to pass _make_list_args(all=True) so they remain focused on row formatting without triggering git detection

When inside a git repository, draft list now shows runs for only that
project. When outside git or with the --all flag, all runs are listed.
The current project is determined via git rev-parse and worktree list,
with special handling for linked worktrees.
@vm-mishchenko
vm-mishchenko marked this pull request as ready for review May 22, 2026 05:24
@vm-mishchenko
vm-mishchenko merged commit 61a2f77 into main May 22, 2026
1 check passed
@vm-mishchenko
vm-mishchenko deleted the 260521-spec-list-current-project branch May 22, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant