Skip to content

fix(storage): allow excluding 0-session projects#45

Merged
tznthou merged 2 commits into
mainfrom
fix/empty-project-exclude
May 28, 2026
Merged

fix(storage): allow excluding 0-session projects#45
tznthou merged 2 commits into
mainfrom
fix/empty-project-exclude

Conversation

@tznthou
Copy link
Copy Markdown
Owner

@tznthou tznthou commented May 26, 2026

Summary

  • Fix: "Exclude this project" button on 0 B / 0-session projects silently did nothing
  • Root cause: UI guard if (preview.sessionCount === 0) { return } bailed unconditionally
  • Guard now distinguishes pure project exclusions (proceed) from date-range-only rules (bail on 0 match)
  • Confirmation dialog shows prevention-focused messaging for empty projects ("no sessions now, future sessions won't be indexed")
  • i18n: 4 new keys (zh-TW + en) for empty-project UX flow

Test plan

  • Open Storage Management, find a 0 B / 0-session project, click "Exclude" — dialog should appear with prevention messaging
  • Confirm exclude → exclusion rule is created, project future sessions blocked
  • Non-empty project exclude still shows deletion stats as before
  • Date-range exclusion with 0 matches still silently bails (no regression)
  • Project+date-range combo with 0 matches correctly bails (not treated as empty project)
  • typecheck + lint + 469 tests pass

🤖 Generated with Claude Code

tznthou and others added 2 commits May 26, 2026 23:41
The "Exclude this project" button on 0 B / 0-session projects silently
did nothing because the UI guard bailed on sessionCount === 0. Relax
the guard to only bail for date-range-only rules, and show a
prevention-focused confirmation dialog for empty project exclusions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tznthou tznthou merged commit d71cd1a into main May 28, 2026
4 checks passed
@tznthou tznthou deleted the fix/empty-project-exclude branch May 28, 2026 02:59
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