fix!: Frecency conflicts (sorry, this will delete all your history)#104
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the frecency tracking system by removing the FileKey abstraction and simplifying file access tracking to work directly with file paths. The change improves the API design by using native path types and adds better error handling for invalid paths.
- Removes the
FileKeywrapper struct and usesPath/PathBufdirectly - Renames
access_filetotrack_accessfor better clarity - Adds path canonicalization and validation with proper error handling
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/fff/rust/lib.rs | Updates function signature and removes FileKey usage in track_access |
| lua/fff/rust/frecency.rs | Refactors to use Path directly and adds path validation |
| lua/fff/rust/file_picker.rs | Removes FileKey conversion methods and updates to use paths directly |
| lua/fff/rust/file_key.rs | Completely removes the FileKey struct |
| lua/fff/picker_ui.lua | Removes old access_file call (logic moved elsewhere) |
| lua/fff/main.lua | Updates to use async file operations and new track_access function |
| lua/fff/fuzzy.lua | Updates exported function name from access_file to track_access |
| lua/fff/file_picker/init.lua | Renames function and adds debug print statement |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
45c921e to
1b1ba31
Compare
1b1ba31 to
d61acd6
Compare
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.
No description provided.