Repository navigation
Let links name a saved server by its address (experimental) - #103
Merged
Merged
Conversation
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.
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.