feat(config): add open_file_with_default_app option - #1613
feat(config): add open_file_with_default_app option#1613Longchuanzheng wants to merge 2 commits into
Conversation
Add a new boolean config `open_file_with_default_app` (default: true) that controls whether pressing confirm (Enter/right/l) on a file launches the system default application (open/xdg-open/rundll32). Set to false to disable launching external programs — the file is just selected and its preview shown. Directories are still entered, and the chooser mode is unaffected. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds ChangesDefault application file opening
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/internal/handle_panel_movement.go`:
- Around line 67-71: Ensure executeOpenCommand enforces
common.Config.OpenFileWithDefaultApp before invoking the system opener,
returning without launching an external program when disabled. Keep the existing
enterPanel behavior intact and apply the guard at the command execution boundary
for all callers.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 20c61bfe-47e4-4057-9603-fef4d1a7e214
📒 Files selected for processing (3)
src/internal/common/config_type.gosrc/internal/handle_panel_movement.gosrc/superfile_config/config.toml
Move the OpenFileWithDefaultApp check from enterPanel into executeOpenCommand so the guard applies at the system-opener execution boundary for all callers, not just confirm-on-file. enterPanel behavior is unchanged. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai review |
|
Add a new boolean config
open_file_with_default_app(default: true) that controls whether pressing confirm (Enter/right/l) on a file launches the system default application (open/xdg-open/rundll32).Set to false to disable launching external programs — the file is just selected and its preview shown. Directories are still entered, and the chooser mode is unaffected.
Summary by CodeRabbit