Skip to content

Update file-tidy extension - #30294

Merged
raycastbot merged 3 commits into
raycast:mainfrom
fanhefeng:ext/file-tidy-new-icon
Aug 18, 2026
Merged

Update file-tidy extension#30294
raycastbot merged 3 commits into
raycast:mainfrom
fanhefeng:ext/file-tidy-new-icon

Conversation

@fanhefeng

Copy link
Copy Markdown
Contributor

Description

Two changes for File Tidy:

  • New extension icon, with all three Store screenshots re-shot to match (same three compositions as before; ray lint metadata checks pass).
  • Fix — previews no longer touch the destination. The perceptual-hash cache used by similar-image detection was saved during analysis, before the user confirms anything, which could create the destination folder (and a .tidy folder inside it) just for previewing a plan — and silently skipped the "create destination?" consent prompt. The cache is now written only after a run completes, keyed by each image's final archived path so later runs still get cache hits. Covered by two new regression tests in the shared core (60/60 passing).

Screencast

Updated screenshots are included in metadata/ (form, plan top, plan bottom).

Checklist

- New extension icon, with all three Store screenshots re-shot to match
- Fix: previewing a plan no longer writes the perceptual-hash cache (or
  creates the destination folder) before the user confirms; the cache is
  written after a successful run, keyed by each image's final archived path
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: file-tidy Issues related to the file-tidy extension platform: macOS platform: Windows labels Aug 17, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@raycastbot raycastbot added the OP is author The OP of the PR is the author of the extension label Aug 17, 2026
@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR refreshes File Tidy's icon and Store screenshots and moves perceptual-hash persistence from preview analysis to completed execution.

  • Returns analysis-time hash state for deferred persistence.
  • Rekeys hashes to archived paths and merges persisted cache data.
  • Preserves timestamps on cross-volume copies where supported.
  • Adds regression coverage for previews, cache persistence, merging, and cross-volume moves.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
extensions/file-tidy/src/core/analyze.js Makes perceptual-hash analysis read-only and returns cache state for execution.
extensions/file-tidy/src/core/execute.js Persists remapped perceptual hashes after file moves complete.
extensions/file-tidy/src/core/move.js Attempts to preserve source timestamps during copy-based cross-volume moves.
extensions/file-tidy/src/core/phash.js Merges surviving on-disk hash entries when persisting the current cache.
extensions/file-tidy/src/tidy-folder.tsx Carries analysis-time hash state through PlanView into confirmed execution.
extensions/file-tidy/tests/smart.test.js Adds regression tests for side-effect-free previews and deferred cache persistence.
extensions/file-tidy/CHANGELOG.md Documents the visual refresh and perceptual-hash cache changes.

Reviews (3): Last reviewed commit: "Update CHANGELOG.md and optimise images" | Re-trigger Greptile

Comment thread extensions/file-tidy/src/core/execute.js
Comment thread extensions/file-tidy/src/core/execute.js
Addresses review feedback on the deferred hash-cache write: cross-volume
moves now preserve the source mtime so re-keyed cache entries stay valid,
and saving the cache merges with the on-disk state instead of overwriting
entries a concurrent run wrote.
@fanhefeng

Copy link
Copy Markdown
Contributor Author

Both cache-related review comments verified and addressed in be8ac13:

  1. Cross-volume mtime: confirmed — the EXDEV path's copyFileSync gave the copy a fresh mtime, so the re-keyed cache entry failed its size+mtime check on the next analysis and every image moved across volumes was decoded again. moveFile now restores the source's timestamps with utimes after copy verification (best-effort — a verified move doesn't fail over metadata), so both move paths have the same semantics and the entry stays valid.

  2. Snapshot overwrite: confirmed — saveHashCache replaced the file with this run's analysis-time snapshot, dropping entries written by a run that completed in between. Worth noting this window predates this PR (the analysis-time save had the same read-modify-write race); deferring the write stretched it across the confirmation step. Saving now merges over the on-disk state: this run's entries win on shared keys, disk-only entries survive while their file still exists, and vanished paths are still pruned.

Both are covered by new tests (cross-volume move keeps mtime and the entry still hits; merge keeps another run's entries while dead paths drop).

@0xdhrv 0xdhrv self-assigned this Aug 17, 2026

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, approved ✅

@raycastbot
raycastbot merged commit d57a545 into raycast:main Aug 18, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/fhf1121/file-tidy

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

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

Labels

extension: file-tidy Issues related to the file-tidy extension extension fix / improvement Label for PRs with extension's fix improvements OP is author The OP of the PR is the author of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants