Only open the dialog when the integration answers with a modal

A `block` output would render loose next to the button, and a `complete` means
the integration handled the click without any UI.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brett Jephson
2026-09-09 14:47:14 +01:00
parent 30e9be6d15
commit 9f8cee669f
@@ -46,7 +46,9 @@ export function IntegrationActionButton(props: {
};
const result = await renderIntegrationUi({ renderContext, request: input });
if (result.output?.type === 'element') {
// Anything but a modal has no place to go here: a `block` would render loose next to
// the button, and a `complete` means the integration handled the click on its own.
if (result.output?.type === 'element' && result.output.element.type === 'modal') {
setModal({ input, output: result.output, children: result.children });
}
} finally {