Skip to content

fix: translate xp path if using SSHStateProvider#216

Merged
bpiwowar merged 2 commits into
experimaestro:masterfrom
VictorMorand:master
Apr 21, 2026
Merged

fix: translate xp path if using SSHStateProvider#216
bpiwowar merged 2 commits into
experimaestro:masterfrom
VictorMorand:master

Conversation

@VictorMorand
Copy link
Copy Markdown
Contributor

This ends fixing #213 by providing xp path translation when using SSHStateProvider.

Summary of Changes

  1. Core API: Added translate_path(path: Path) -> str to the StateProvider base class. This provides a standard way to
    convert internal filesystem paths into user-facing display paths.
  2. Remote Support: Implemented translate_path in SSHStateProviderClient. It now automatically detects if a path resides within the local SSH cache and translates it back to the corresponding path in the remote_workspace.
  3. TUI Fix: Updated the ExperimentsList widget's action_copy_path to use this translation service. This fixes the bug
    where pressing 'f' would copy a temporary local cache path instead of the actual remote path.
  4. Consistency: Refactored get_display_path (used by Tasks) to use this new centralized translation logic, ensuring
    consistent behavior across all TUI components.
  5. Validation: Added unit tests in test_path_translation.py covering both local and remote path translation scenarios.

These changes ensure that "Copy Path" always returns a meaningful path to the user, regardless of whether the experiment is running locally or on a remote cluster.

@bpiwowar bpiwowar merged commit 02d60e8 into experimaestro:master Apr 21, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants