From f103f3e9a37ced30b7e4ada6e8cedb97261a1465 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 9 Oct 2026 10:44:55 +0200 Subject: [PATCH] fix: warn when Slack can't be reached instead of showing a placeholder bot name Co-Authored-By: Claude Opus 5.5 --- .../flows/content/AgentUsePanel.svelte | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/frontend/src/lib/components/flows/content/AgentUsePanel.svelte b/frontend/src/lib/components/flows/content/AgentUsePanel.svelte index ae01b183a9..49f33974b5 100644 --- a/frontend/src/lib/components/flows/content/AgentUsePanel.svelte +++ b/frontend/src/lib/components/flows/content/AgentUsePanel.svelte @@ -39,6 +39,7 @@ chat: boolean /** Unset when Slack is not connected to the workspace. */ slackTeamName: string | undefined + /** Unset when Slack can't be reached with the workspace's bot token. */ botName: string | undefined /** Agents answer in Slack only when the instance verifies Slack's request signatures. */ signingSecretSet: boolean @@ -57,7 +58,7 @@ // Read again whenever the agent's channels change, so a channel just added or removed moves // between the list and the picker. const available = resource( - () => ({ ws: isAdmin && chat && slackTeamName ? workspace : undefined, channels }), + () => ({ ws: isAdmin && chat && slackTeamName && botName ? workspace : undefined, channels }), async ({ ws }) => (ws ? await listChoices(ws) : []) ) @@ -221,16 +222,26 @@ async function waitForAnswer(UUID) { Windmill can tell who sent a message. {/if} + {#if !botName} + + Slack refused the workspace's bot token or couldn't be reached, so agents can't answer there. + {#if isAdmin} + Reconnect Slack to fix it. + {:else} + A workspace admin can reconnect Slack to fix it. + {/if} + + {/if}
Ask it anywhere - In {slackTeamName}, mention the bot and start your message with the agent's name, in a - channel or in a direct message. Follow-ups in the same thread that mention the bot go - to the same agent. + In {slackTeamName}, mention the bot and start your message with the agent's name, in + a channel or in a direct message. Follow-ups in the same thread that mention the bot + go to the same agent.
@{botName ?? 'Windmill'} {handle} your question{botName ? `@${botName} ` : ''}{handle} your question @@ -300,8 +311,9 @@ async function waitForAnswer(UUID) { - Each call runs the agent as the token's owner and returns the id of the run.{#if chat}{' '}Calls that share a memory_id are one conversation: reuse it for - follow-ups and pick a new one to start over.{/if} + Each call runs the agent as the token's owner and returns the id of the run.{#if chat}{' '}Calls + that share a memory_id are one conversation: reuse it for follow-ups and pick + a new one to start over.{/if}