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: handle instance connection keys (e.g. notion:crm) in pipe setup

Louis Beaumontce58e8a1d35f
diff --git a/apps/screenpipe-app-tauri/components/post-install-connections-modal.tsx b/apps/screenpipe-app-tauri/components/post-install-connections-modal.tsx
index 59f83f512..84f731bf4 100644
--- a/apps/screenpipe-app-tauri/components/post-install-connections-modal.tsx
+++ b/apps/screenpipe-app-tauri/components/post-install-connections-modal.tsx
@@ -58,8 +58,31 @@ export function PostInstallConnectionsModal({
const newStatuses: Record<string, ConnectionStatus> = {};
for (const connId of connections) {
- const integration = integrations.find((i) => i.id === connId) || null;
- const configured = integration?.connected ?? false;
+ // support instance keys like "notion:crm" — match on base id
+ const baseId = connId.includes(":") ? connId.split(":")[0] : connId;
+ const instanceName = connId.includes(":") ? connId.split(":").slice(1).join(":") : null;
+ const integration = integrations.find((i) => i.id === baseId) || null;
+
+ let configured = integration?.connected ?? false;
+
+ // for instance connections, check the specific instance status
+ if (integration && instanceName) {
+ try {
+ const instRes = await fetch(
+ `http://localhost:3030/connections/${baseId}/instances`
+ );
+ if (instRes.ok) {
+ const instData = await instRes.json();
+ const instances: { instance: string; enabled: boolean }[] =
+ instData.instances || [];
+ const inst = instances.find((i) => i.instance === instanceName);
+ configured = inst?.enabled ?? false;
+ }
+ } catch {
+ // fall back to base integration status
+ }
+ }
+
newStatuses[connId] = {
integration,
configured,
@@ -148,6 +171,11 @@ export function PostInstallConnectionsModal({
</div>
<span className="text-xs font-medium flex-1">
{integration?.name || connId}
+ {connId.includes(":") && (
+ <span className="text-muted-foreground font-normal ml-1">
+ ({connId.split(":").slice(1).join(":")})
+ </span>
+ )}
</span>
{status?.configured ? (
<span className="text-[10px] text-green-600">
diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
index bcadcb43e..d44942b21 100644
--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
@@ -1509,7 +1509,9 @@ export function PipesSection() {
const runningExec = recentExecs.find((e) => e.status === "running");
const lastExec = recentExecs[0];
const hasMissingConnections = (pipe.config.connections ?? []).some((id) => {
- const conn = availableConnections.find((c) => c.id === id);
+ // support instance keys like "notion:crm" — match on base id
+ const baseId = id.includes(":") ? id.split(":")[0] : id;
+ const conn = availableConnections.find((c) => c.id === baseId);
return !conn || !conn.connected;
});
const lastStatus = isRunning