Skip to content

feat: Git recency ranking#273

Open
dmtrKovalenko wants to merge 2 commits into
mainfrom
feat/something
Open

feat: Git recency ranking#273
dmtrKovalenko wants to merge 2 commits into
mainfrom
feat/something

Conversation

@dmtrKovalenko

Copy link
Copy Markdown
Owner

No description provided.

@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Build Artifacts for your PR

Neovim Plugin

Test with lazy.nvim:

{
  "dmtrKovalenko/fff.nvim",
  tag = "a4fcd3f",
}

Bun/TypeScript Package

The fff npm package will download binaries from this release automatically.


Built from a4fcd3f

@dmtrKovalenko

Copy link
Copy Markdown
Owner Author

@gustav-fff rebase this PR

@gustav-fff

Copy link
Copy Markdown
Collaborator

[triage-bot] DIRECTED: rebase onto origin/main produces 16 conflicts across load-bearing files (crates/fff-core/{git,score,file_picker,types,lib,background_watcher}.rs, crates/fff-c/src/lib.rs, crates/fff-nvim/src/{lib,lua_types}.rs plus 5 bins, lua/fff/core.lua, README.md). The branch's single wip: git recency commit overlaps too heavily with what landed on main since it forked — not a mechanical rebase. Won't guess at conflict resolution on perf-critical code. @dmtrKovalenko please rebase manually or tell me which side to prefer per file.

Honk-Honk 🪿

@dmtrKovalenko

Copy link
Copy Markdown
Owner Author

@gustav-fff go for iti I need to rebase and get the funciontlity back

@gustav-fff

Copy link
Copy Markdown
Collaborator

[triage-bot] DIRECTED: tried rebase, aborted. Not mechanical — needs a manual port.

The branch has one commit (5c3b748 wip: git recency) against a FileItem/Score/FilePicker shape that main has since refactored extensively. Conflicts in 16 files; most are not whitespace.

Concrete blockers:

  • FileItem on main uses ChunkedString + arena (crate::simd_path::ArenaPtr) and AtomicU8 flags. The wip commit still expects path: PathBuf, relative_path: String, file_name: String, total_frecency_score: i64, plain is_binary: bool field. Adding git_recency_score: i32 is trivial but the surrounding struct re-write blocks a 3-way merge.
  • Score field set diverged: wip adds git_recency_boost, main added git_status_boost + path_alignment_bonus. Both need to coexist in every construction site (score.rs, tests).
  • FilePicker::new_with_shared_state(base_path, warmup_mmap_cache, shared_picker, shared_frecency, git_recency_config) from wip no longer exists; main uses FilePicker::new(FilePickerOptions) with options builder + SharedFilePicker type rename.
  • crates/fff-core/src/score.rs::score_filtered_by_frecency now takes arena: ArenaPtr; wip's calculate_current_file_penalty(file, total_frecency_score, context) 3-arg signature is gone (now 4-arg with arena).
  • background_watcher.rs handle_debounced_events flow restructured around git_workdir cloning + BackgroundWatcher constructor signature changed.
  • C FFI (crates/fff-c/src/lib.rs) and Lua bindings (crates/fff-nvim/src/{lib,lua_types}.rs, lua/fff/core.lua) both moved off the wip-era signatures.

This is a port of the feature on top of the new arena-based FileItem, not a rebase. Touches perf-critical paths (scoring hot loop, FileItem layout). Per my rules I won't guess at this — won't open a speculative PR that silently breaks scoring or FileItem size invariants.

Options:

  1. You port the wip commit manually — fastest, since you wrote both sides.
  2. Tell me to drop path_alignment_bonus / git_status_boost and prefer wip's Score shape (or vice versa). With one clear "prefer wip / prefer main" rule per overlapping field I can finish it.
  3. Squash-port: I open a fresh branch that re-adds only git_recency_score: i32 on FileItem, the Score.git_recency_boost field, GitRecencyConfig, get_recent_commit_files, and the refresh_git_recency hook in background_watcher — wired into the current FilePicker::new/FilePickerOptions API. No struct field renames, no removal of path_alignment_bonus. Say the word.

Honk-Honk 🪿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants