Skip to content

feat: persistent organized ledger, grouping cache, TUI multi-select & preview - #12

Merged
zackkitzmiller merged 2 commits into
mainfrom
feat/organized-ledger
Jun 16, 2026
Merged

feat: persistent organized ledger, grouping cache, TUI multi-select & preview#12
zackkitzmiller merged 2 commits into
mainfrom
feat/organized-ledger

Conversation

@zackkitzmiller

@zackkitzmiller zackkitzmiller commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Organized ledger: persistent tracking of previously organized files (path + content hash). Re-runs skip known files; new files identical to organized content are flagged as duplicates. --no-ledger / --ledger <path> CLI flags control behavior.
  • Grouping cache: Claude grouping calls are cached by content hash set + existing folder labels. Unchanged re-runs replay the cached grouping and send zero tokens.
  • Nested folder labels: group labels like Work/Acme Corp/Website Redesign become real directory trees. Sanitization handles traversal, backslash, and empty segments safely.
  • Existing group awareness: Claude is prompted with folder names from the ledger, routing new files into matching groups instead of creating near-duplicates.
  • TUI multi-select: Enter marks files in Organize mode; d/m/n operate on the marked set (or cursor file when nothing is marked). Marks shown as filled/empty circles with selection count in title.
  • TUI file preview modal: Spacebar in the Files pane opens a modal preview (images via ratatui-image, text files scrollable, binary shows "no preview"). Reuses the DiffState modal pattern from Dupes mode.
  • .spindel-ignore: sentinel file excludes a directory and all its children from scanning.
  • Progress improvements: analysis progress shows cached vs sent file counts.

Test plan

  • cargo test — 318 tests pass
  • cargo clippy — no warnings
  • Manual: run spindle on a directory, verify ledger is written after organize
  • Manual: re-run on the same directory, verify skipped files and zero-token grouping
  • Manual: add a new file with same content as an organized one, verify duplicate flagged
  • Manual: verify nested labels create real directory trees
  • Manual: test TUI multi-select (Enter to mark, d to batch remove, m to batch move)
  • Manual: test spacebar preview for image and text files
  • Manual: create .spindel-ignore in a subfolder, verify it's skipped

🤖 Generated with Claude Code

… multi-select & preview

Track previously organized files in a persistent ledger so re-runs skip them
automatically. New files that are byte-identical to organized content are
flagged as duplicates. Claude results are cached by content hash: per-file
descriptions by file hash, grouping by the full set of file hashes plus
existing folder labels — re-running over an unchanged set sends zero tokens.

Group labels can now be nested paths ("Work/Acme Corp/Website Redesign")
that become real directory trees. Claude is prompted with existing folder
names from the ledger so new files route into matching groups instead of
near-duplicate ones.

TUI gains multi-select (Enter to mark, batch d/m/n) and a spacebar preview
modal for images and text files, reusing the DiffState modal pattern.

Folders containing `.spindel-ignore` are excluded from all scanning.

CLI additions: --no-ledger, --ledger <path>.
@ecc-tools

ecc-tools Bot commented Jun 13, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

Add decode_image() helper that tries the image crate first, then falls
back to ImageMagick `magick convert` for formats the crate can't handle
(e.g. HEIC/HEIF). Replaces four inline decode blocks. Also clears
preview state when no image path is available, and updates test model
references from claude-sonnet-4-20250514 to claude-sonnet-4-6.
@ecc-tools

ecc-tools Bot commented Jun 16, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

@zackkitzmiller
zackkitzmiller merged commit 5b8bb0c into main Jun 16, 2026
1 check failed
@zackkitzmiller
zackkitzmiller deleted the feat/organized-ledger branch June 16, 2026 04:45
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