Skip to content

Desktop: let OpenBot's own page open mailto, tel and new-tab links - #2922

Merged
davidmckayv merged 1 commit into
mainfrom
desktop-links-open-from-app
Dec 4, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
desktop-links-open-from-app

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

In OpenBot Desktop, some links in OpenBot's own page did nothing when clicked: mailto: and tel: links, a link meant for a new tab that points to another address on this computer, and any link pressed with Control or Shift.

Tauri puts the opener plugin's link script in every page the window shows. That script takes those clicks, stops the default, and asks for plugin:opener|open_url. OpenBot's own page, whether on this computer or on the relay for OpenBot Cloud, was never granted an opener permission. Tauri refused the call, so the link opened nowhere.

PostHog error tracking (project 26816) has shown this from the Desktop window's page since at least Nov 20:

  • Command plugin:shell|open not allowed by ACL: about 350 events from about 330 people, on OpenBot 1.1.0 to 1.2.9. These come from Desktop releases before 1.2.9, which still loaded the shell plugin. The shell plugin's link script was always injected and always refused. It also fired on outside links that the shim had already opened, so most of these events are noise. Say where a downloaded file went in OpenBot Desktop, and show it in Finder #2825 removed the shell plugin in 1.2.9.
  • Command plugin:opener|open_url not allowed by ACL: the same click once the shell plugin is gone, so the opener plugin's script takes it over. This one will grow as people update Desktop.

The fix adds opener:allow-open-url to the capability for the owned app page (allow_app_page), with the plugin's own opener:allow-default-urls scope. That scope allows http:, https:, mailto: and tel: URLs only, never a path or a file. A page on any other loopback port still gets nothing. Outside links meant for a new tab still go through the outside-links shim and the window's guard, as before. No shell permission is granted.

Where it runs

  • New state that outlives a request? None. This is one more permission on the Desktop window's runtime capability.
  • What happens on the second replica? Nothing changes. Desktop shell only, no server code.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? No.

Boundary and audit

  • Every acting call still goes through the gateway: resolve, decide, audit, then act.
  • New refusals and new failures each write a row. (None added.)
  • Nothing new is trusted from the client that the server can resolve itself.

API and database

  • This changes nothing under api/, no app's requests, no database change and no release-policy.json.

Changelog

OpenBot Desktop.

  • Fixed: mail, phone and new-tab links in OpenBot's page open again. In the Desktop window, a mailto: or tel: link, a link to another address on this computer meant for a new tab, or a link pressed with Control or Shift did nothing. It now opens in the default browser or mail app.

Proof

openbots_own_page_can_open_a_link_and_another_page_cannot runs Tauri's real ACL with the real opener: permissions through a stand-in open_url. The stand-in reads the command's and the plugin's scopes the way the real command does, and never opens a browser. The test checks three things:

  • a page on another loopback port is refused;
  • OpenBot on this computer and OpenBot Cloud through the relay are allowed;
  • each allowed page gets exactly the http/https/mailto/tel scope.

Without the grant, the test fails with the refusal people hit: opener.open_url not allowed on window "main" ... URL: http://127.0.0.1:3010/channel/c1. With the grant it passes. The full main.rs suite passes locally (545 passed, 1 ignored).

Tauri puts the opener plugin's link script in every page the window
shows. It takes a click on a mailto: or tel: link, a link meant for a
new tab that the outside-links shim leaves alone (another address on
this computer), or a link pressed with Control or Shift, and asks
plugin:opener|open_url. OpenBot's own page, on this computer or the
relay's for OpenBot Cloud, was granted no opener permission, so the
click was swallowed and the link opened nothing. PostHog shows it as
"Command plugin:opener|open_url not allowed by ACL", and from Desktop
releases before 1.2.9, which still carried the shell plugin and its own
link script, as "Command plugin:shell|open not allowed by ACL".

The owned app page's capability now carries opener:allow-open-url with
the plugin's allow-default-urls scope: http, https, mailto and tel URLs
only, never a path. A page on any other loopback port still gets
nothing.

The regression test drives Tauri's real ACL with the real opener
permissions through a stand-in open_url, and fails without the grant
with the same refusal people hit.
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 175f4a6 Dec 4, 2026
68 of 72 checks passed
@davidmckayv
davidmckayv deleted the desktop-links-open-from-app branch December 4, 2026 06:45
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