Skip to content

Open Memory through the platform seam, not macOS open(1) #195

Closed

Description

@omesser

Why

#190 adds Open Memory from the Menu and from settings. Both paths spawn open with the Memory Manifest path:

  • src-tauri/src/main.rs open_in_editor (Menu → Open Memory)
  • src-tauri/src/settings.rs open_in_editor (settings window → Open)

open is macOS. Linux needs xdg-open; Windows needs cmd /c start (or start via cmd). Today a Linux user who can open settings at all still cannot open Memory from either entry point.

platform.rs already exists so that adding a platform is one edit in one file. Opening a user-owned file is the same kind of question as show_settings: the Shell asks, the OS answers. Two copies of the macOS answer in main and settings are how the next platform misses one.

Related: #18, #190.

What to do

  1. Delete both open_in_editor functions. One platform::open_path(&Path) -> Result<(), String> remains.
  2. macOS: open. Linux: xdg-open. Windows: cmd /C start "" (empty title so a path with spaces is not eaten as the window title).
  3. Keep the ensure-parent-and-empty-file behaviour. That is not platform-specific; it can sit next to the call or inside it.
  4. SettingsSession::open_memory and the Menu OpenMemory arm both call the seam.

tauri-plugin-opener is an alternative if it is already a cheap dependency. Do not add it only to wrap three Command::new lines. The platform module is the existing seam.

Acceptance

  • open appears once, behind cfg(target_os = "macos").
  • Linux cfg uses xdg-open. Windows cfg uses start via cmd.
  • Menu Open Memory and settings Open share that function. A platform that forgets one of them cannot compile a second copy.
  • A missing Memory file is still created empty before the opener runs.

Out of scope

The settings window on Linux/Windows. Changing where Memory lives. Wipe. Launch at login.

Activity

  1. omesser commented on Sep 3, 2026

    @omesser
    OwnerAuthor

    #249 did not close this.

    SettingsSession::open_memory now picks xdg-open on Linux (settings.rs), which is what #196 allowed while this issue was still open. The platform seam is not done: main.rs still has a second open_in_editor that always runs open, so Menu → Open Memory on Linux is still the macOS binary. No platform::open_path.

    Leave this open.

  2. omesser commented on Sep 3, 2026

    @omesser
    OwnerAuthor

    Landed in #253 (2a8299a).

    Both open_in_editor copies are gone. One platform::open_path remains: ensure_file then open / xdg-open / cmd /C start "". Menu Open Memory and SettingsSession::open_memory (GTK included) share it. Missing Memory is created empty first. Ubuntu + macOS CI were green.

    Acceptance is met. Leftovers already tracked, not this ticket:

  3. added this to the V1 milestone on Sep 6, 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

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions