Repository navigation
Conversation
…nd style confirmation dialog
…ing, and clarify supported formats
…and ensure valid file attributes
KnifeLemon
left a comment
There was a problem hiding this comment.
Thanks for the work and the screenshots, @gtxPrime. Before going further, a few things need to change, and one question about the feature itself.
Whether Filee should do this at all. There's no issue for this feature, and it's a big behavior change: Filee would watch the user's home folders in the background and replace files in place when they're renamed. Please open an issue (or a discussion) first so the scope can be agreed before more code goes in. Watch folders already cover "convert what lands here" on folders the user picks explicitly.
Must fix regardless of that decision:
global.jsonpins10.0.100-rc.2.25502.107withallowPrerelease: true. Please revert it. The repo builds on the released 10.0.100 SDK, and a prerelease pin would affect every contributor and CI.GetWatchRootswatches the whole user profile recursively on Windows. That includesAppData, browser caches, IDE folders,node_modulesand so on, where programs rename files constantly (e.g.file.tmptofile.json). Every such rename gets a signature check and possibly a conversion prompt. If the feature goes ahead, it should only watch folders the user picks, the same way watch folders do.- The original file is replaced. A rename is something people also do to fix a wrong extension (a JPEG saved as
.png, a ZIP that's really an.epub). Converting there silently changes their file. The "already matches the target signature" check helps for some formats but not all. At minimum the original must be kept (or moved to the trash), not overwritten. Start()subscribes toSettingsChangedeach time it's called and never unsubscribes; and turning the setting off then on again keeps the old root list even if folders changed.- Tests:
ExtensionChangeWatcherTestsdriveHandleRenameAsyncdirectly, so nothing covers the realFileSystemWatcherpath, the settle/lock retry, or the replace step with the original kept on failure.
Happy to look again once there's an agreed issue and these are addressed.
Generated by Claude Code
…trash preservation, and tests
…or extension-change watching
… fix xUnit1051 and dotnet format check
KnifeLemon
left a comment
There was a problem hiding this comment.
Thanks for the follow-up, @gtxPrime. Some of the earlier points are in: global.json is back to the repo's SDK, the original is now moved to the trash or kept as name.original.ext instead of being overwritten, and Start() subscribes once and recomputes the roots when settings change.
The main question from the last review is still open, though, and the new commit goes the other way on it:
- No agreed issue yet. Please open an issue (or a discussion) describing the feature before more code goes in. Watching folders in the background and converting files on rename is a big behavior change, and whether Filee does it at all, and where, needs to be settled first. Until then this can't be merged.
- "Entire computer" watches every fixed drive recursively (
ExtensionChangeService.GetWatchRoots,ExtensionChangeScope.EntireSystem). That isC:\withProgram Files,AppDataand every cache under it, which is wider than the user-profile watch point 2 asked to drop. If the feature goes ahead, it should only watch folders the user picks, so please remove theEntireSystemscope and the setting rather than keep it as an option. - Broken strings in all 17 language files. The four
general.extension_change_scope*strings are double-encoded (UTF-8 read as Windows-1252 and saved again), e.g.fürinde.jsonandì´ë¦„ì´inko.json. They would show up like that in the app. - Unrelated change in
ar.json.crop.skipandpresets.conflict.Skiphad their two Arabic diacritics (U+0651 shadda, U+064D kasratan) swapped. Please revert those two lines; the PR shouldn't touch existing strings. - Point 5 from the last review (tests only drive
HandleRenameAsync, nothing covers the realFileSystemWatcherpath or the replace/restore step) is still open.
If there's agreement in the issue, the smallest version to aim for would be: off by default, only the user's watch folders, always ask, and keep the original. Happy to look again then.
What does this change?
Adds an automatic conversion feature when renaming a file's extension to a supported target format (such as
.png→.pdf, image-to-image, video-to-video, or document-to-document). It introduces:ConvertOnExtensionChangeandConfirmExtensionChange) with full localization across all 17 supported languages.ExtensionChangeConfirmWindow) and non-blocking progress dialog (ExtensionChangeProgressWindow) for conversion feedback.ReadOnlyattribute clearing, retry backoff against momentary shell/antivirus file locks, cross-filesystem (EXDEV) copy fallback, and original file preservation on failure.Type of change
How was it tested?
dotnet format --verify-no-changesdotnet test(All 644 tests inFilee.Core.Tests, plus targeted test runs inFilee.App.Tests)Filee.exe).pngto.pdf: prompt dialog appeared, converted safely, replaced file with valid PDF signature..pngto.random): safely ignored.ReadOnlyattribute cleared and converted withoutUnauthorizedAccessException.Screenshots (UI changes)
{Source}to{Target}with "Always convert directly without asking" option.Checklist
src/Filee.App/Assets/i18n/*.jsonfiles (verified across all 17 catalogs withLocalizationTests)THIRD-PARTY-NOTICES.md(N/A — uses existing native APIs)