Skip to content

Open images by pasted Windows path when the Linux desktop app runs under WSL #172

Open

Description

@vycdev

Summary

#156 adds a field where you paste a Windows drive path (C:\...). The Linux build turns it into /mnt/c/... and a new native command, read_image_path, reads the file.

Before building this, we need to know what problem it solves. Kromacut has no separate WSL build: under WSL this is the regular Linux build, and its file dialog can already browse /mnt/c. If the dialog fails or is awkward under WSLg, describe how, because that decides whether a path field is the right fix.

As written in #156

  • The field appears on every desktop platform (it only checks isTauri()). On Windows and macOS it becomes a general "open by absolute path" box.
  • The command opens any absolute path with std::fs, outside the tauri-plugin-fs scope in src-tauri/capabilities/default.json. It only checks the file extension and a 64 MB limit.
  • The file comes back as a Vec<u8>, so it crosses the IPC bridge as a JSON number array, about 4× the file size.
  • The UI strings use threshold.* i18n keys, and errors are English strings from Rust.

If we keep it

  • Show it only when running under WSL (for example, by checking WSL_DISTRO_NAME or /proc/version in the native layer).
  • Keep file access inside the app's existing scope, or go through the dialog plugin.
  • Return binary data instead of a number array.
  • Give it its own i18n keys and translated error messages.
  • Keep respecting the quantize/dedither locks, as it already does.

Status

Low priority. Needs a decision on whether this belongs in the app before any PR.

Split from #156.

Activity

  1. added
    enhancement
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions