feat: custom browser command config option#28
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds an optional ChangesConfigurable Browser Command
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 73.67% 79.30% +5.63%
==========================================
Files 18 18
Lines 1056 1068 +12
==========================================
+ Hits 778 847 +69
+ Misses 278 221 -57 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 `@devskim/app.py`:
- Around line 189-193: The open_url method currently trusts self.config.browser
and calls shlex.split and subprocess.Popen directly, which can raise ValueError
or OSError and also treats whitespace-only strings as valid; update open_url to
strip() self.config.browser, check for a non-empty value, then attempt to build
and run the command inside a try/except that catches ValueError and OSError
(from shlex.split and subprocess.Popen), log or print an error including the
exception, and on failure call super().open_url(url, new_tab=new_tab) as the
fallback.
🪄 Autofix (Beta)
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: 2e31dd54-b74f-4eb4-be92-0fc14325ed50
📒 Files selected for processing (5)
README.mddevskim/app.pydevskim/config.pytests/test_app_theme.pytests/test_config.py
Summary
browserconfig key to~/.config/devskim/config.toml"open -a Safari","firefox --private-window")Usage
Test plan
browser = "firefox"→firefox <url>spawned onokeypressbrowser = "open -a Safari"→ args split correctlybrowser = ""→ system default browser used (existing behavior unchanged)Summary by CodeRabbit
New Features
Documentation
Tests