Conversation
SkipMountPointFind, PreservePaths, and UseCompression were defined but never referenced anywhere in the codebase. Remove them to reduce the config surface area.
Replace *config.Config parameter in Render() and NewModel() with RenderOptions struct containing only the fields the UI actually uses (config.UI and DeleteEnabled bool). The CLI restore handler now constructs RenderOptions at the boundary.
Contributor
Code Metrics Report
Details | | main (7d45896) | #120 (ba42cbb) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 44.5% | 44.2% | -0.4% |
| Files | 24 | 24 | 0 |
| Lines | 1809 | 1822 | +13 |
| Covered | 806 | 806 | 0 |
+ | Code to Test Ratio | 1:1.5 | 1:1.5 | +0.0 |
| Code | 2775 | 2772 | -3 |
| Test | 4248 | 4248 | 0 |
| Test Execution Time | 3s | 3s | 0s |Code coverage of files in pull request scope (36.4% → 35.7%)
Reported by octocov |
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.
WHAT
Remove unused
trash.Configfields and replace the full*config.Configparameter in the UI layer with a minimalRenderOptionsstruct containing only the fields the UI actually uses.This PR includes all Phase 1-3 refactoring commits (concurrency safety, structural improvements, and config decoupling).
WHY
A code review identified that
trash.Confighad 3 fields defined but never referenced (SkipMountPointFind,PreservePaths,UseCompression), and the UI layer received the entire application config when it only neededconfig.UIand a single bool (DeleteEnabled). Passing the full config creates unnecessary coupling between the UI and unrelated config sections (trash strategy, logging, history), making it harder to reason about what the UI actually depends on.