Skip to content

Commit c5b685d

Browse files
amikofalvyclaude
andcommitted
fix: rollback optimistic update on failure and document remove option
- Capture previous defaultAgent before optimistic update and restore it in the catch block so the UI stays consistent on API failure - Add "Remove the default agent" step to Slack configuration docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a513185 commit c5b685d

File tree

2 files changed

+7
-0
lines changed
  • agents-docs/content/talk-to-your-agents/slack
  • agents-manage-ui/src/features/work-apps/slack/components/agent-configuration-card

2 files changed

+7
-0
lines changed

agents-docs/content/talk-to-your-agents/slack/configuration.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ The workspace default agent responds to all `@Inkeep` mentions and `/inkeep` com
2929

3030
This agent handles all requests in channels without a channel-specific default.
3131
</Step>
32+
<Step>
33+
### Remove the default agent (optional)
34+
35+
To clear the workspace default, open the dropdown and select **Remove default agent**. Channels without a channel-specific agent will no longer have a fallback.
36+
</Step>
3237
</Steps>
3338

3439
## Channel defaults

agents-manage-ui/src/features/work-apps/slack/components/agent-configuration-card/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export function AgentConfigurationCard() {
144144
const handleRemoveDefaultAgent = async () => {
145145
if (!teamId) return;
146146

147+
const previousAgent = defaultAgent;
147148
setDefaultAgent(null);
148149
setDefaultOpen(false);
149150
setSavingDefault(true);
@@ -154,6 +155,7 @@ export function AgentConfigurationCard() {
154155
toast.success('Default agent removed');
155156
} catch (error) {
156157
console.error('Failed to remove default agent:', error);
158+
setDefaultAgent(previousAgent);
157159
toast.error('Failed to remove default agent');
158160
} finally {
159161
setSavingDefault(false);

0 commit comments

Comments
 (0)