Add repo validation and conflict-fix tooling; migrate config and improve UI in src/app.py#11
Add repo validation and conflict-fix tooling; migrate config and improve UI in src/app.py#11VHugoDevIA wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7253970f61
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if config: | ||
| return config | ||
| return _read_json_file(LEGACY_CONFIG_FILE) |
There was a problem hiding this comment.
Treat empty user config as authoritative
When ~/.duplicate-file-cleaner/config.json exists but contains {} (a valid “reset” state), this branch falls back to config.json in the working directory and can silently resurrect stale legacy settings. That means users who clear their new profile config can still get old scan paths/modes loaded from the repo-local file, which defeats the migration behavior. The loader should distinguish “file missing/invalid” from “empty but valid JSON” instead of using truthiness here.
Useful? React with 👍 / 👎.
Remove redundant try block in _read_json_file function.
Motivation
config.jsonto a per-user config directory and make the app UI more robust and user-friendly.Description
scripts/validate_repo.pyto detect merge conflict tokens, codex/branch artifacts and Python syntax errors and to compilemain.pyandsrcfor final validation.scripts/fix_conflict_artifacts.pyto sanitize files (defaultsrc/app.py) by removing conflict markers and branch artifacts and create a.bakbackup when writing.pre-commithook.githooks/pre-committhat runspython scripts/validate_repo.pyand a GitHub Actions workflow.github/workflows/validate.ymlto run the same validation on PRs and pushes tomain..gitignoreto exclude localconfig.jsonand remove example/placeholder files; setconfig.jsonto an empty object.README.mdwith quick conflict-resolution instructions and recommended Git settings and hook activation.src/app.py: migrate config storage to~/.duplicate-file-cleaner/config.jsonwith a migration path from the legacy repoconfig.json, add robust JSON read/write helpers, addSortableTreeWidgetItemfor numeric sorting, reorganize UI (splitters, filter panel, expand/collapse controls, improved column sizing), defer loading selection untilshowEvent, and various small UI/UX tweaks.Testing
python scripts/validate_repo.py, which returned success and compiledmain.pyandsrcwithout syntax or merge-artifact errors..github/workflows/validate.ymlto execute the same validation on PRs and pushes tomain(CI not shown here but configured).Codex Task