Bug fixes2 - #15
Merged
Merged
Conversation
Add pre-flight check to detect when browsers (especially snap-confined) cannot write to profile directories, preventing cryptic SingletonLock errors at runtime. The check: - Creates a temporary test directory in the profile path - Attempts to write a test file to verify write access - Provides helpful error message with solutions if write fails - Automatically cleans up test files This catches snap confinement issues early and guides users to install system-packaged browsers instead. Changes: - Add _check_browser_profile_access() function to detect write failures - Call check after profile directory creation in add_app() - Add integration test for profile write failure detection - Fix doctor command to use python3 instead of python - Update browser check test to accept INFO status for Firefox Execution Report: - [x] Linting: ruff check src tests (all passed) - [x] Type checking: mypy src (success) - [x] Tests: pytest tests/unit tests/integration tests/e2e (384 passed) - [x] Coverage: 78.39% (required: 60%) - [x] Pre-commit: all hooks passed
Replace cryptic Click parameter validation errors with helpful, actionable error messages that guide users to solutions. **Changes:** - Create BrowserChoice custom Click type with specific error messages - Firefox: Explains why not supported (lacks app/SSB mode) + installation guide - Invalid browsers: Shows supported options + snap confinement warning - Update main() to catch Click exceptions gracefully without tracebacks - Display formatted error messages to stderr with exit code 2 **Error Messages:** - Firefox attempt now shows why it's unsupported and how to install alternatives - Invalid browser shows supported options and snap confinement guidance - All errors are user-friendly with no Python tracebacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.