Skip to content

(fix) format item counts with thousands separators across CLI#23

Open
Aydeing wants to merge 2 commits into
Vortrix5:mainfrom
Aydeing:fix/format-thousands-separators
Open

(fix) format item counts with thousands separators across CLI#23
Aydeing wants to merge 2 commits into
Vortrix5:mainfrom
Aydeing:fix/format-thousands-separators

Conversation

@Aydeing

@Aydeing Aydeing commented Jun 13, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes #1 — Adds thousands separators (:, format spec) to every user-facing integer count across the CLI, so large counts no longer render as bare digits (e.g. 2780327,803). Matches the formatting junk clean and the profile command already use.

Covered: undo, apps (leftovers + list/startup/orphans titles), junk clean, cleanup (duplicates/stale/worktrees), purge, organize, optimize, profile, updates, startup, disk duplicates, and the checkup summary.

Safety checklist

Sifty deletes files, so every PR keeps these promises:

  • pytest is green, including tests/test_safety.py (182/182 passed)
  • No new direct deletions (os.remove, shutil.rmtree, Path.unlink); everything goes through safety.trash()
  • New destructive paths default to dry-run and ask before applying
  • New core functions have a matching test (n/a — display-only, no new functions)

Notes for the reviewer

Display-only change: adds :, to integer count interpolations across 10 files. No logic, deletion, or core changes. JSON output (output.emit), byte sizes (human_size), percentages, version strings, and day/threshold values are intentionally left unformatted. ruff check . passes clean.

Add :, format spec to all bare item(s) counts in undo_cmd, apps
leftovers, and junk clean output for consistency with junk.py's
existing formatted counts.

Fixes #1
@github-actions

Copy link
Copy Markdown

Thanks for your first pull request to Sifty! A couple of things that help it land quickly: Sifty deletes files, so all deletion must go through safety.trash() and destructive paths default to dry-run. Please make sure pytest is green (especially tests/test_safety.py) and that the PR title starts with a type tag like (feat) or (fix). See CONTRIBUTING.md for the full checklist. A maintainer will review shortly.

@github-actions github-actions Bot added the area: cli Typer CLI frontend label Jun 13, 2026
@Aydeing Aydeing changed the title fix: format item counts with thousands separators across CLI (fix) format item counts with thousands separators across CLI Jun 13, 2026

@Vortrix5 Vortrix5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, happy to merge. The :, change is safe (these are all integer counts) and it matches how junk clean and the profile command already format their numbers.

One nit, not a blocker: the title says "across CLI" but this really only covers undo, apps leftovers, and junk clean. There are still bare counts in cleanup, purge and organize that'll drift for large numbers. Either tighten the title or sweep the rest in a follow-up, whatever you prefer.

Thanks for the fix!

Sweep the :, format spec across every remaining user-facing integer
count in the CLI so the change is genuinely across-CLI: cleanup,
purge, organize, optimize, apps, profile, updates, startup, disk, and
the checkup summary in app.py.

Display-only: JSON output, size/percent/threshold values are left
untouched. Matches the existing formatted counts in junk clean, undo,
and apps leftovers.

Fixes #1
@Aydeing

Aydeing commented Jun 14, 2026

Copy link
Copy Markdown
Author

Thanks for the review! Swept the rest so the "across CLI" title holds. Pushed a commit covering every remaining bare integer count:

  • cleanup — duplicate groups/copies, stale items, worktrees
  • purge — artifact directories, skipped count
  • organize — files moved/restored/failed, "…and N more"
  • apps — installed/startup/orphan table titles + broken-uninstaller summary
  • optimize — operation counts
  • profile — category count
  • updates / startup — table titles
  • disk — duplicate "Copies" column
  • app.py — checkup summary count

JSON output, sizes (human_size), percentages, and day/threshold values are intentionally left unformatted. python -m pytest -q is green (182 passed, incl. tests/test_safety.py) and ruff check . passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Typer CLI frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format item counts with thousands separators in sifty undo

2 participants