Skip to content

Move scanning into a guarded subprocess worker#1

Merged
rsgalloway merged 4 commits intomasterfrom
feature/subprocess-scanner
Apr 5, 2026
Merged

Move scanning into a guarded subprocess worker#1
rsgalloway merged 4 commits intomasterfrom
feature/subprocess-scanner

Conversation

@rsgalloway
Copy link
Copy Markdown
Owner

@rsgalloway rsgalloway commented Apr 5, 2026

This pull request implements several improvements for the sview application, focusing on safer and more configurable directory scanning, improved error reporting, persistent UI state, and a refreshed dark theme. It also introduces a --debug mode for enhanced troubleshooting and updates the configuration system to support new worker safety settings.

Scanner worker improvements:

  • Directory scanning now runs in a subprocess worker, enabling safer cancellation and better isolation.
  • Added configurable scan worker guardrails: process priority (nice_increment), memory limit (memory_limit_mb), and timeout (timeout_seconds), all exposed in the user config file. The default memory cap is now opt-in to avoid false positives. [1] [2] [3] [4]

Configuration and state management:

  • The config file (config.json) schema is extended to include scanner worker settings, and a new persistent UI state file (ui_state.json) is introduced with load/save helpers. [1] [2] [3]
  • The application version is bumped to 0.1.2 across all relevant files. [1] [2]

Debugging and error reporting:

  • Added a --debug command-line flag to enable detailed scanner debug output in the terminal, documented in the README.md. [1] [2] [3] [4]

UI and model enhancements:

  • The dark theme is refreshed with improved color palette and widget styling for better visual clarity.
  • BrowserItem now supports serialization/deserialization via to_dict and from_dict methods, and sequence metadata can be updated in-place. [1] [2]

Documentation:

  • The README.md and CHANGELOG.md are updated to reflect these changes, including new configuration options and usage instructions. [1] [2] [3]

Let me know if you have questions about any of these updates!

@rsgalloway rsgalloway marked this pull request as ready for review April 5, 2026 20:18
@rsgalloway rsgalloway requested a review from Copilot April 5, 2026 20:19
@rsgalloway rsgalloway self-assigned this Apr 5, 2026
@rsgalloway rsgalloway added bug Something isn't working enhancement New feature or request labels Apr 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors sview directory scanning to run in an isolated subprocess worker (with configurable guardrails), expands config/state persistence, and refreshes parts of the UI (including a new icon view and updated dark theme), while bumping the app version to 0.1.2.

Changes:

  • Run directory scans via a QProcess-launched python -m sview.worker and deserialize results back into the UI.
  • Extend config/state: add scan-worker safety settings in config.json and persist lightweight UI state in ui_state.json.
  • UI updates: add icon-based center pane, new inspector actions for sequence metadata, and dark-theme tweaks.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_scanner.py Updates sequence expectations and adds ScanResult serialization round-trip coverage.
sview/worker.py New subprocess entrypoint to run scans and emit JSON (stdout) + progress/errors (stderr).
sview/scanner.py Adds ScanResult (de)serialization and adjusts sequence grouping/metadata behavior.
sview/qt/table.py Makes columns interactive with fixed defaults; adds item update helper; formats mtime for 0/unknown.
sview/qt/main_window.py Moves scanning to QProcess, adds debug/error dialogs, introduces icon view + UI state persistence.
sview/qt/inspector.py Adds “Find Missing” and “Get Size” actions and handles unknown timestamps.
sview/qt/icon_view.py Adds new icon/card-based contents view with secondary metadata text.
sview/qt/app.py Adds --debug flag wiring and updates argument parsing for initial path.
sview/model.py Adds BrowserItem (de)serialization support.
sview/controller.py Adds in-place sequence metadata update helper.
sview/config.py Adds scan-worker config + UI state load/save helpers; adjusts config save behavior.
sview/init.py Bumps version to 0.1.2.
sview.png Updates screenshot asset.
README.md Documents --debug, ui_state.json, and scan-worker settings.
pyproject.toml Bumps project version to 0.1.2.
CHANGELOG.md Adds 0.1.2 release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rsgalloway rsgalloway removed the bug Something isn't working label Apr 5, 2026
@rsgalloway rsgalloway merged commit 9672cc1 into master Apr 5, 2026
36 checks passed
@rsgalloway rsgalloway deleted the feature/subprocess-scanner branch April 5, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants