Skip to content

fix(filters): include repos with a dirty worktree in the Dirty filter - #71

Merged
rocketraman merged 1 commit into
masterfrom
claude/dirty-filter-worktree-315b66
Oct 23, 2026
Merged

rocketraman merged 1 commit into
masterfrom
claude/dirty-filter-worktree-315b66

Conversation

@rocketraman

Copy link
Copy Markdown
Owner

What changed

The Dirty status filter, and the number on its chip, now include a repo when any of its linked worktrees has uncommitted changes, even if the main checkout is clean.

  • RepoView.dirtyAnywhere (Derive.kt): true when the checkout itself or any linked worktree has uncommitted changes.
  • AppState.counts() and statusPredicate use it for "dirty".
  • The Dirty chip's tooltip now mentions worktrees.
  • New DirtyFilterTest covers: a clean checkout with a dirty worktree, a dirty checkout, everything clean, and a snoozed dirty worktree.

Why

Before this change, a repo was hidden from Dirty whenever its main checkout was clean, even if a worktree held uncommitted work.

For reviewers

  • isDirty hasn't changed. It still drives the row's "modified" badges and the Commit button, and both only act on the main checkout. So a repo that's only dirty in a worktree appears under Dirty but has no Commit button.
  • Snoozes are ignored here, as with isDirty: a snoozed worktree with changes still counts.
  • Under Dirty, worktree sub-rows don't open on their own the way they do under the Worktrees filter. A row can match without showing why unless its worktree's unlanded-work badge rolls up.
  • Not checked in the running app. Unit tests and detekt pass.

@rocketraman
rocketraman force-pushed the claude/dirty-filter-worktree-315b66 branch from 9650d70 to 53c67d3 Compare October 23, 2026 02:10
The Dirty filter only looked at a repo's own checkout, so a repo whose main
checkout was clean but whose linked worktree held uncommitted changes never
showed up. The filter and its chip count now use RepoView.dirtyAnywhere,
which also checks the linked worktrees. isDirty is unchanged: it still drives
the row's badges and Commit button, which act on the main checkout only.

Signed-off-by: Raman Gupta <rocketraman@gmail.com>
@rocketraman
rocketraman force-pushed the claude/dirty-filter-worktree-315b66 branch from 53c67d3 to dbda036 Compare October 23, 2026 02:11
@rocketraman
rocketraman merged commit 9b16199 into master Oct 23, 2026
1 check passed
@rocketraman
rocketraman deleted the claude/dirty-filter-worktree-315b66 branch October 23, 2026 02:11
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