Skip to content

fix: live typing works for all managers - no Ctrl+R needed#8

Merged
Timmy6942025 merged 2 commits into
masterfrom
fix/live-typing-all-managers
Mar 27, 2026
Merged

fix: live typing works for all managers - no Ctrl+R needed#8
Timmy6942025 merged 2 commits into
masterfrom
fix/live-typing-all-managers

Conversation

@Timmy6942025
Copy link
Copy Markdown
Owner

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:

  • Running fpf [package] from CLI
  • The macOS experience (which works perfectly)

Solution

Remove all managers from the slow list in defaultDynamicReloadManagers():

  • Before: slow = {"flatpak": {}, "npm": {}}
  • After: slow = {} (empty)

Now live typing includes ALL managers and produces the same results as CLI arguments.

Testing

  • All Go unit tests pass
  • Build succeeds without errors

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: da716393-9b59-429b-9597-d1db21edf62f

📥 Commits

Reviewing files that changed from the base of the PR and between 965dbc6 and 80e4622.

📒 Files selected for processing (1)
  • tests/smoke.sh

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • flatpak and npm are now included in the dynamic reload manager list and treated as fast reload managers, broadening supported package managers for reload operations.
  • Tests

    • Updated test suite and smoke tests to assert that flatpak and npm are correctly included in dynamic reload flows.

Walkthrough

Removed flatpak and npm from the slow managers lookup in dynamic reload configuration so those managers are treated as fast; test expectations and a smoke test were updated to reflect the new fast-manager list.

Changes

Cohort / File(s) Summary
Dynamic Reload Manager Configuration
cmd/fpf/cli_runtime.go
Removed pre-populated slow lookup entries for flatpak and npm, causing dynamicReloadManagers() to include them in the fast manager list.
Tests & Smoke Script
cmd/fpf/cli_runtime_test.go, tests/smoke.sh
Updated unit test expectations and smoke test assertions to expect apt,flatpak,bun,npm in the fast manager list and to assert flatpak search ... rip is present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A hop, a tweak, the list grows bright,
Flatpak and npm join the light,
Tests adjusted, scripts agree,
Reloads faster — hop with me! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: enabling live typing for all package managers by removing the Ctrl+R requirement, which aligns with the changeset that removes slow managers from the dynamic reload list.
Description check ✅ Passed The description clearly explains the problem, solution, and testing status, all directly related to the changeset that removes flatpak and npm from the slow manager list to enable live typing for all managers.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/live-typing-all-managers

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 26b17cd and 965dbc6.

📒 Files selected for processing (3)
  • cmd/fpf/cli_runtime.go
  • cmd/fpf/cli_runtime_test.go
  • tests/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 slow map 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.

Comment thread tests/smoke.sh Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 27, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • tests/smoke.sh

Commit: 80e4622eccc10c9fdf136051844e062bd7628f6f

The changes have been pushed to the fix/live-typing-all-managers branch.

Time taken: 2m 41s

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@Timmy6942025 Timmy6942025 merged commit f497c8b into master Mar 27, 2026
0 of 2 checks passed
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.

1 participant