Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: prepend file:// for local paths in notification bell links

Louis Beaumont9797f9039726
diff --git a/apps/screenpipe-app-tauri/components/notification-bell.tsx b/apps/screenpipe-app-tauri/components/notification-bell.tsx
index f6c84345f..9ead23363 100644
--- a/apps/screenpipe-app-tauri/components/notification-bell.tsx
+++ b/apps/screenpipe-app-tauri/components/notification-bell.tsx
@@ -172,8 +172,15 @@ export function NotificationBell() {
e.preventDefault();
if (!href) return;
try {
+ let url = href;
+ if (url.startsWith("~/")) {
+ const home = await import("@tauri-apps/api/path").then(m => m.homeDir());
+ url = "file://" + home + url.slice(2);
+ } else if (url.startsWith("/") && !url.startsWith("//")) {
+ url = "file://" + url;
+ }
const { open } = await import("@tauri-apps/plugin-shell");
- await open(href);
+ await open(url);
} catch {
console.error("failed to open url:", href);
}