Skip to content

Separate Studio instance per --oneware-appdata-dir - #423

Merged
hendrikmennen merged 1 commit into
mainfrom
feature/instance-per-appdata-dir
Nov 6, 2026
Merged

hendrikmennen merged 1 commit into
mainfrom
feature/instance-per-appdata-dir

Conversation

@hendrikmennen

Copy link
Copy Markdown
Contributor

What

StudioInstanceChannel.Default now depends on ONEWARE_APPDATA_DIR. When Studio is started with --oneware-appdata-dir, the lock file, named pipe and Unix socket get a short SHA-256 suffix of the normalized directory path. Without the option, the names are unchanged.

  • New StudioInstanceChannel.ForAppDataDirectory(string?).
  • Program creates the channel lazily, after the startup arguments were applied (it was a static field initialized before parsing).
  • CLI users (OneWareCloudCliModule, StudioProcessController) pick up the same channel through Default.

Why

Portable copies of Studio (for example ONE AI's "Export as portable app") start with their own data and appdata directories. Until now they forwarded their launch to an already running normal Studio, which opened the request with the wrong settings and packages.

Validation

  • dotnet test tests/OneWare.Essentials.UnitTests --filter StudioInstanceChannel: 15 passed (3 new tests).
  • dotnet build studio/OneWare.Studio.Desktop: 0 errors.
  • Runtime check of a portable copy running beside a normal Studio: done by the reviewer.

A Studio started with its own application data directory (e.g. a portable
copy) now uses its own single-instance lock and IPC channel, so it neither
forwards its launch to nor receives requests from the default instance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hendrikmennen
hendrikmennen merged commit 5bb0e0e into main Nov 6, 2026
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.

1 participant