ovis icon indicating copy to clipboard operation
ovis copied to clipboard

Desktop app: open a pane from another program (ovis://open link)

Open fivetaku opened this issue 3 weeks ago • 2 comments

Problem

A program on the same PC (a session board, a launcher, a script) cannot make Ovis for the desktop show a given pane. Today it can only bring the window forward or open the pane in a browser tab:

  • a second start only shows the window and ignores its arguments (app.on("second-instance", showWindow) in app/electron/src/main.ts),
  • a Mac has no open-url handler and the app declares no URL scheme (no CFBundleURLTypes in the 0.5.3 bundle),
  • herdr-core refuses pane.focus (server/herdr-core/adapter.ts), and moving herdr's focus would move every other client too.

So a tool that lists sessions has to send the user to a browser tab on the server's address even when they use the desktop app.

Proposal

Let the deep link the web UI already reads (?machine=&ws=&pane=&view=, src/lib/deepLink.ts) reach the desktop window:

  • ovis://open?ws=<id>-<slug>&pane=<pane>&view=terminal|chat[&machine=<pc>] brings the window forward and selects that pane without reloading the page, the way a tapped notification does (a closed pane falls back to its workspace).
  • Delivered by open-url on macOS and by the first / second start's arguments on Windows and Linux; the scheme is declared through electron-builder protocols.
  • Only ovis://open with a pane is accepted, and only machine, ws, pane, view are passed on, so a link can only select a pane — never load another address, a file, a dialog or Settings.
  • herdr's own focus is left alone; no new setting.

Where

Sidebar and navigation, Install and updates

Where it exists today

herdr's TUI can be moved to a pane from outside (pane.focus on its socket), and Ovis on the herdr runtime follows that; the desktop app's herdr-core runtime has no equivalent. Other coding-agent desktop apps declare a URL scheme for this, e.g. the Claude desktop app (claude://) and Paseo (paseo://). The browser UI already supports the same links.

Workarounds and alternatives

  • Open the pane in a browser tab (works, but not in the desktop window).
  • Bring the window forward and ask the user to pick the pane.
  • Relaunch the app with a debug port and drive it over CDP — opens an unauthenticated port and is lost on every relaunch; not something another tool should do.

An implementation is in a PR linked below; happy to change the approach.

fivetaku avatar Nov 15 '26 03:11 fivetaku

Implementation for discussion: #3868

fivetaku avatar Nov 15 '26 03:11 fivetaku

Delivered by #3868 (merged as f4700302). Follow-ups are in #3971.

devswha avatar Nov 16 '26 11:11 devswha