Ask for confirmation when opening obsidian://new URIs

Use case or problem

Obsidian URIs let you create a fully-written note in your vault just by clicking a link; for example, see the Obsidian October checklist and its “Add this checklist” link.

This is a really powerful feature, but some users might regard it as a destructive action (destructive as in, it changes your vault’s contents and possibly triggers a Sync update) that shouldn’t be performed without confirmation, especially since URIs can be freely shared online by third parties.

Proposed solution

A confirmation notice, similar to the ones displayed by a web browser when clicking an unknown URI, would alleviate trust issues like these. The notice could take the form of:

  • A pop-up modal explaining that the user is about to create a new note, with buttons to Cancel or Create note (possibly with a short preview of the note’s content)
  • A banner at the top of the workspace — directly above an “unsaved” view of the note’s content — with a brief explanation and a button to Save if the user wants to keep the note permanently

For power users who frequently use new URIs, a setting to hide these warnings (and a checkbox on the warning notice) would prevent any slowdown to those users’ workflows.

10 Likes

:heart: as this would also fall in line with our emphasis on security.

1 Like

related issue: using such a link, when you have multiple vaults, it automatically adds to the last vault, which might not be the vault you want.

3 Likes

As a developer, I would like to add a similar URI to my plugin, to allow a user to add a pre-defined object (toolbar) to their vault.

It would be great, then – if the above solution is implemented – to have an API available that I could use to route users through (in particular: prompt for confirmation, select a vault). Otherwise I’ll be implementing this UX myself.

1 Like