Skip to content

Let links name a saved server by its address (experimental) - #103

Merged
Tarquinen merged 1 commit into
devfrom
server-address-links
Nov 16, 2026
Merged

Tarquinen merged 1 commit into
devfrom
server-address-links

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Outside tools can't deep-link to a session on a specific server, because server= only takes the app's private server key. Requested in anomalyco/opencode#64052 and anomalyco/opencode-ios#179.

Behind a new Experimental switch, Open Links by Server Address (off by default):

  • opencode://session/<id>?server=<address> matches the address against saved servers (scheme, host and port).
  • opencode://server/<base64url address>[/session/<id>], the web app's session route, also works.
  • Links only switch between servers already saved on the phone. An unknown address shows the existing "no longer saved" error. The app's own links keep the private key.

Verified: scripts/check.sh :feature:system :app :core :feature:settings; both new tests fail without the fix. Emulator against session-lab: switch off → error; switch on → both link forms open the session; an unsaved address → error.

Outside tools (a notification from Home Assistant or ntfy, a server
plugin) can't link to a session on a specific server: `server=` only
takes the app's internal server key, a hash nobody outside the app can
compute (anomalyco/opencode#64052, opencode-ios#179).

Behind the new Experimental switch Open Links by Server Address (Drawer
group, off by default), `server=` may also be one of a saved server's
addresses, matched with `matchesOrigin` (scheme, host, port; a trailing
slash or default port doesn't matter). `opencode://server/<base64url
address>[/session/<id>]`, the web app's session route, parses too.
Links still only switch between servers already saved on the phone; an
unknown address shows the existing "no longer saved" error. Links the
app writes keep using the private key.

Verified: scripts/check.sh :feature:system :app :core :feature:settings
on the VM; both new tests fail with the fix taken out. On the emulator
against session-lab: with the switch off an address link shows the
error; with it on, `opencode://session/<id>?server=http://10.0.2.2:4152/`
and `opencode://server/<b64>/session/<id>` open the session from a new
session; an unsaved address shows the error.
@Tarquinen
Tarquinen merged commit 6331558 into dev Nov 16, 2026
1 check passed
@Tarquinen Tarquinen mentioned this pull request Nov 16, 2026

This branch was previously deployed

1 inactive deployment
release — 55fae672 Deployed Nov 16, 2026 by Tarquinen via check #353
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