Conversation
Implemented: • Registry class with thread-safe CRUD operations for apps and handlers • File-based locking using fcntl for concurrent access protection • JSON-based storage with version field • Comprehensive error handling (AppNotFoundError, AppExistsError, RegistryError) • Full test coverage (24 tests, 96% coverage) Tests verify: • Adding, updating, removing, and listing apps • Adding, removing, and listing URL scheme handlers • Duplicate detection for apps and handlers • Registry persistence across instances • Corrupted JSON handling • Concurrent access locking Closes registry management checklist items in Phase 2.
Implemented: • URL validation with format checking and optional connectivity verification • Localhost URL detection with warnings • App ID generation from names (lowercase, alphanumeric, hyphens) • App ID format validation • WMClass generation for window manager integration (CamelCase) • Name extraction from URLs (subdomain/domain extraction) • Full test coverage (50 tests, 85% coverage) Tests verify: • URL validation for various formats (http/https, localhost, invalid) • ID generation from names with special characters and spaces • ID validation against format rules • WMClass generation in CamelCase format • Name extraction from URLs with various structures Closes URL validation checklist items in Phase 2.
Implemented complete PWA management commands: Add command: • Full URL validation with localhost detection • Automatic name and ID generation from URL • WMClass generation for window manager integration • Profile directory creation with proper permissions • Wrapper script generation from Jinja2 templates • Desktop file generation with proper categories • Icon handling (copy from source path) • YAML manifest creation with full metadata • Registry integration and desktop database updates • Dry-run mode support for safe testing • Browser executable detection from config and known paths • Comprehensive error handling with AddCommandError List command: • Table format with aligned columns (ID, Name, URL, Status) • JSON and YAML output format support • Verbose mode showing all app details • Empty registry handling Remove command: • Safe file deletion with validation • Optional profile directory removal • Optional icon removal • Keep-userdata flag to preserve browser profile • Manifest file cleanup • Registry update and desktop database refresh • Dry-run mode support • Error handling with RemoveCommandError Infrastructure updates: • Added Config properties for easy path access (desktop_dir, icons_dir, etc.) • Added render_template() convenience function to templates module • Updated CLI to wire up all commands with proper error handling • Color output support with --no-color flag • Comprehensive exit codes (0=success, 1=error) Tests: • Updated CLI tests to match implemented behavior • All tests passing (127 tests, 73% coverage) Closes all checklist items in Phase 2.
Added comprehensive integration tests for Phase 2: Test coverage: • End-to-end PWA lifecycle (add → list → remove workflows) • File artifact creation (profiles, wrappers, desktop files, manifests) • Registry persistence across operations • Icon handling and copying • YAML manifest format validation • JSON registry format validation • Dry-run mode behavior • Error cases (duplicate IDs, non-existent apps) • Profile deletion options • Template rendering to actual files Infrastructure: • Created IsolatedConfig class for test isolation • Each test uses unique temporary directories • Registry file properly isolated per test • No test interference or shared state Bug fixes discovered by integration tests: • Fixed remove command not preserving profile when remove_profile=False (manifest parent directory was being deleted prematurely) • Added proper directory cleanup logic that checks if manifest dir is profile dir Results: • 12 new integration tests, all passing • Total test count: 179 tests (127 unit + 12 integration + 40 other) • Code coverage increased: 73% → 87% • All tests isolated with no shared state • Real file system operations verified
bigr
added a commit
that referenced
this pull request
Oct 23, 2025
- Add PATH search using shutil.which() for browser executables - Supports non-standard install locations (Snap, Flatpak, custom paths) - Falls back to PATH search after configured and known paths - Add comprehensive unit tests for browser detection logic - Update E2E test to mock shutil.which() for failure scenarios - Resolves user testing issue #4 (hard-coded browser paths)
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.