Move scanning into a guarded subprocess worker#1
Merged
rsgalloway merged 4 commits intomasterfrom Apr 5, 2026
Merged
Conversation
There was a problem hiding this comment.
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-launchedpython -m sview.workerand deserialize results back into the UI. - Extend config/state: add scan-worker safety settings in
config.jsonand persist lightweight UI state inui_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.
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.
This pull request implements several improvements for the
sviewapplication, focusing on safer and more configurable directory scanning, improved error reporting, persistent UI state, and a refreshed dark theme. It also introduces a--debugmode for enhanced troubleshooting and updates the configuration system to support new worker safety settings.Scanner worker improvements:
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:
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]0.1.2across all relevant files. [1] [2]Debugging and error reporting:
--debugcommand-line flag to enable detailed scanner debug output in the terminal, documented in theREADME.md. [1] [2] [3] [4]UI and model enhancements:
BrowserItemnow supports serialization/deserialization viato_dictandfrom_dictmethods, and sequence metadata can be updated in-place. [1] [2]Documentation:
README.mdandCHANGELOG.mdare 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!