Skip to content

fix: report the real trash count in manage_trash - #122

Merged
patrickfreyer merged 3 commits into
mainfrom
carry/108-real-trash-count
Oct 15, 2026
Merged

patrickfreyer merged 3 commits into
mainfrom
carry/108-real-trash-count

Conversation

@patrickfreyer

Copy link
Copy Markdown
Owner

Opened by Claude (AI assistant) on Patrick's behalf.

Carries over #108 by @herbeckrobin (original commits preserved), rebased onto current main. Split out of #98. Supersedes #108.

Follow-up edits

  • empty_trash now loops forward over the captured trashMessages list (deleting does not shift its indices), so max_deletes takes the first N instead of the last N; loop comments corrected in both actions.
  • empty_trash confirmation error now says it "attempts to delete" instead of "permanently deletes", matching the docstring (new test).
  • Docstring em dash replaced with a semicolon.

CHANGELOG.md is taken from main unchanged; the entry is consolidated at release.

Proposed CHANGELOG entry

From the original PR (### Fixed), with the last sentence about backwards loops dropped since the loop rationale changed:

  • manage_trash reported deletions that never happened. empty_trash and
    delete_permanent counted delete calls, but Mail's AppleScript delete
    means "move to Trash" and is a no-op on a message that already sits in
    Trash. Both actions now report the real before/after Trash count and say
    plainly when nothing was removed.

🤖 Generated with Claude Code

herbeckrobin and others added 3 commits October 14, 2026 22:21
CHANGELOG.md taken from main; the entry is consolidated at release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trashMessages is captured up front, so deleting does not shift its
indices. Loop forward so max_deletes takes the first N messages, and
correct the loop comments. The empty_trash confirmation error now says
it attempts to delete, matching the docstring. Swap a docstring em dash
for a semicolon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patrickfreyer
patrickfreyer merged commit d94eab4 into main Oct 15, 2026
5 checks passed
@patrickfreyer
patrickfreyer deleted the carry/108-real-trash-count branch October 15, 2026 02:10
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.

3 participants