fix: live typing works for all managers - no Ctrl+R needed#8
Conversation
Move flatpak and npm from slow to fast manager list in defaultDynamicReloadManagers(). Now live typing (change: reload) includes ALL managers - no Ctrl+R needed. This makes live typing results consistent with CLI argument results. Updated tests to reflect new behavior.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughRemoved Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/smoke.sh`:
- Around line 1405-1406: The test contains a duplicate assertion calling
assert_fzf_line_contains with the same argument
"FPF_IPC_MANAGER_LIST=apt,flatpak,bun" twice; remove the redundant line (the
second call) so only a single assert_fzf_line_contains
"FPF_IPC_MANAGER_LIST=apt,flatpak,bun" remains to avoid duplicate checks and
keep the test concise.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ce9134d0-b142-4146-8c4b-287ae7d5d70b
📒 Files selected for processing (3)
cmd/fpf/cli_runtime.gocmd/fpf/cli_runtime_test.gotests/smoke.sh
📜 Review details
🧰 Additional context used
🪛 GitHub Actions: test
tests/smoke.sh
[error] 883-883: Smoke test failed: '/home/runner/work/fpf-cli/fpf-cli/fpf: Permission denied' when executing fpf binary. Process exited with code 126.
🔇 Additional comments (4)
tests/smoke.sh (2)
1408-1408: LGTM!The assertion correctly reflects that flatpak search is now executed during live typing since flatpak is no longer in the slow manager list.
883-883: The fpf binary already has execute permissions—no build step changes needed.The fpf binary in the repository is already committed with execute permissions (
-rwxr-xr-x). If the test failure at line 883 reports "Permission denied," the issue is not related to missing binary permissions. Investigate the actual error message and CI logs to identify the real cause.> Likely an incorrect or invalid review comment.cmd/fpf/cli_runtime.go (1)
803-816: LGTM - Core change correctly implements the PR objective.The empty
slowmap ensures all managers are now included in the fast dynamic reload list, enabling live typing for flatpak and npm without requiring Ctrl+R.Note that users with genuinely slow flatpak/npm installations may experience increased latency during live typing. If user feedback indicates this is problematic, consider adding an environment variable (e.g.,
FPF_SLOW_MANAGERS) to let users opt specific managers back into the slow list.cmd/fpf/cli_runtime_test.go (1)
100-124: LGTM!Test expectations are correctly updated to reflect the new behavior where all managers are treated as fast. The assertion messages now match the expected output, and the test covers both the default case and the invalid override fallback case.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Summary
Make live typing work for ALL package managers - no Ctrl+R required.
This matches the macOS behavior where everything works seamlessly with live typing.
Problem
On Linux, users had to press Ctrl+R to get results from slower managers (flatpak, npm). This was inconsistent with:
fpf [package]from CLISolution
Remove all managers from the slow list in
defaultDynamicReloadManagers():slow = {"flatpak": {}, "npm": {}}slow = {}(empty)Now live typing includes ALL managers and produces the same results as CLI arguments.
Testing