fix(manager): parse file labels across platforms - #516
Merged
Conversation
ImageTool Manager now shows only the source file stem when a workspace records a Windows or UNC path and opens on another operating system. The saved source path remains unchanged for replay and relinking.
kmnhan
marked this pull request as ready for review
July 29, 2026 06:31
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #516 +/- ##
=======================================
Coverage 91.65% 91.65%
=======================================
Files 247 247
Lines 94768 94770 +2
Branches 15881 15881
=======================================
+ Hits 86858 86862 +4
+ Misses 4593 4591 -2
Partials 3317 3317 ☔ View full report in Codecov by Harness. |
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.
Summary
pathlib.PureWindowsPathso manager labels accept Windows, UNC, and POSIX path syntax on all operating systems.Root cause
pathlib.Path.stemuses the current operating system's path rules. On macOS, it treats backslashes in a recorded Windows path as ordinary filename characters. The manager therefore displayed most of the Windows path instead of only the file stem.User impact
ImageTool workspaces moved from Windows to macOS now show compact source filenames in the manager tree.
Validation
QT_QPA_PLATFORM=offscreen uv run --group pyqt6 pytest -q tests/interactive/imagetool/manager/provenance/test_dependencies.py::test_manager_compact_file_suffix tests/interactive/imagetool/manager/provenance/test_dependencies.py::test_manager_compact_file_suffix_accepts_cross_platform_paths tests/interactive/imagetool/manager/workspace/test_format.py(23 passed)uv run --group pyqt6 ruff format --checkon all changed filesuv run --group pyqt6 ruff checkon all changed filesuv run --group pyqt6 mypyon all changed source filesgit diff --check