From 193f7467b3f6513644a8bf1f516f1e87fd9775de Mon Sep 17 00:00:00 2001 From: Dion Low Date: Fri, 1 May 2026 15:09:42 -0700 Subject: [PATCH] fix(InstallWizard): reassure users when read is disabled but subscribe is active When an integration uses both read and subscribe for the same object and an end user clicks "Stop reading from [Object]", the UI previously showed only the red "Reading is currently disabled. This object is not being synced." callout. For subscribe-only customers (e.g. Outreach) this read as the integration being broken, even though events were still flowing. Render a follow-up success panel beneath the existing callout that lists the subscribed events (created/updated/deleted/other) for the selected object. The panel only appears when read for that object is disabled AND installation.config.content.subscribe.objects[name] is defined, so non- subscribe integrations are unchanged. The panel reflects amp.yaml config, not delivery telemetry, and discloses that limitation in a footnote. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../content/fields/ReEnableReadObject.tsx | 12 ++++ .../fields/SubscribeStillActiveBox.tsx | 70 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/components/Configure/content/fields/SubscribeStillActiveBox.tsx diff --git a/src/components/Configure/content/fields/ReEnableReadObject.tsx b/src/components/Configure/content/fields/ReEnableReadObject.tsx index bafaa174..ee2f155a 100644 --- a/src/components/Configure/content/fields/ReEnableReadObject.tsx +++ b/src/components/Configure/content/fields/ReEnableReadObject.tsx @@ -7,6 +7,7 @@ import { useInstallation } from "src/headless/installation/useInstallation"; import { useSelectedConfigureState } from "../useSelectedConfigureState"; import { useSelectedObject } from "../useSelectedObject"; +import { SubscribeStillActiveBox } from "./SubscribeStillActiveBox"; import { useToggleReadingObject } from "./useToggleReadingObject"; export function ReEnableReadObject() { @@ -19,6 +20,9 @@ export function ReEnableReadObject() { const readObject = selectedObjectName ? installation?.config?.content?.read?.objects?.[selectedObjectName] : undefined; + const subscribeObject = selectedObjectName + ? installation?.config?.content?.subscribe?.objects?.[selectedObjectName] + : undefined; if (!readObject) return null; // If reading is already enabled, show a success box @@ -86,6 +90,14 @@ export function ReEnableReadObject() { : `Re-enable reading from ${selectedObjectDisplayName}`} + {subscribeObject && ( + + )} ); } diff --git a/src/components/Configure/content/fields/SubscribeStillActiveBox.tsx b/src/components/Configure/content/fields/SubscribeStillActiveBox.tsx new file mode 100644 index 00000000..5922e7a6 --- /dev/null +++ b/src/components/Configure/content/fields/SubscribeStillActiveBox.tsx @@ -0,0 +1,70 @@ +import { SubscribeConfigObject } from "@generated/api/src"; +import { CheckCircledIcon } from "@radix-ui/react-icons"; +import { FormSuccessBox } from "src/components/FormSuccessBox"; + +interface SubscribeStillActiveBoxProps { + subscribeObject: SubscribeConfigObject; + objectDisplayName: string; +} + +function getSubscribedEventLabels( + subscribeObject: SubscribeConfigObject, +): string[] { + const labels: string[] = []; + if (subscribeObject.createEvent) labels.push("Created"); + if (subscribeObject.updateEvent) labels.push("Updated"); + if (subscribeObject.deleteEvent) labels.push("Deleted"); + if (subscribeObject.otherEvents?.length) + labels.push(...subscribeObject.otherEvents); + return labels; +} + +export function SubscribeStillActiveBox({ + subscribeObject, + objectDisplayName, +}: SubscribeStillActiveBoxProps) { + const events = getSubscribedEventLabels(subscribeObject); + + return ( + +
+ + + Event subscriptions are still active + +
+

+ You'll continue to receive {objectDisplayName} events even + though reading is disabled. +

+ {events.length > 0 && ( +

+ Subscribed events: + {events.join(", ")} +

+ )} +

+ This reflects configured subscriptions and does not confirm event + delivery. +

+
+ ); +}