Add non-destructive scan setting for unrecognized files#91
Merged
Conversation
Co-authored-by: luandev <6452989+luandev@users.noreply.github.com>
Co-authored-by: luandev <6452989+luandev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue with unrecognised files being moved automatically
Add non-destructive scan setting for unrecognized files
Jan 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a non-destructive scan behavior by default, addressing issue #87 where unrecognized files were automatically moved to "Not Found" folders without user consent. The solution adds an autoOrganizeUnrecognized setting (default: false) that allows users to opt into the legacy behavior while keeping scans safe by default.
Key Changes:
- Added
autoOrganizeUnrecognized?: booleansetting with non-destructive default (false) - Modified scanner logic to skip moving unrecognized files when setting is disabled
- Comprehensive test coverage with 4 new tests and 33 updated tests to explicitly pass the new parameter
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/src/types.ts | Added autoOrganizeUnrecognized?: boolean field to Settings type with clear JSDoc documentation |
| packages/shared/src/constants.ts | Set default value to false for non-destructive behavior |
| packages/shared/src/tests/constants.spec.ts | Added test assertion for the new default setting |
| apps/server/src/services/scanner.ts | Implemented skip logic for unrecognized files when setting is false; preserved legacy behavior when true |
| apps/server/src/services/scanner.test.ts | Added 4 comprehensive tests for new behavior; updated 33 existing tests with explicit parameter |
| apps/server/src/services/jobs.ts | Integrated setting into scan job workflow with proper null coalescing |
…tion Co-authored-by: luandev <6452989+luandev@users.noreply.github.com>
Contributor
Author
Fixed linting issues in modified files:
Commit: a0912b5 |
luandev
approved these changes
Jan 8, 2026
Owner
|
@copilot after merge, unit tests are failing now |
…Unrecognized param Co-authored-by: luandev <6452989+luandev@users.noreply.github.com>
Contributor
Author
Fixed the failing tests after merge with PR #92 (fuzzy matching):
All 131 tests now pass. Commit: 368b56f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autoOrganizeUnrecognizedsetting (default:false) to Settings typeTesting
Checklist
/semver: patch,/semver: minor, or/semver: major. (See template for examples)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.