fix: AI chat loading indicator and auto-refresh tasks
continuous-integration/drone/push Build is passing

- Add animated typing indicator (bouncing dots) when AI is processing
- Show "Thinking..." status in chat header while processing
- Add translations for AI chat (en/de): title, welcome, placeholder, thinking, error
- Auto-refresh tasks, labels, and user data after AI response
- Disable input field while AI is processing
- Fix translation keys to use ai.chat.* namespace
This commit is contained in:
Paul Nothaft
2026-01-16 16:15:02 +01:00
parent f165ae52e6
commit 5ac64b437b
4 changed files with 48 additions and 16 deletions
+4 -8
View File
@@ -260,14 +260,10 @@ export default function AiChatPage() {
onSuccess: (userMessage, vars, context) => { // Returns USER message now
queryClient.invalidateQueries({ queryKey: ["/api/ai/conversations", vars.conversationId, "messages"] });
queryClient.invalidateQueries({ queryKey: ["/api/ai/conversations"] });
// Note: We don't get the bot message here anymore immediately.
// The polling (refetchInterval) will pick it up when ready.
// Auto-title if this was the first exchange?
// We can still do it, but we won't have the bot response content yet for the title gen.
// Maybe title gen should happen on backend in the background too?
// For now, let's skip auto-title on first msg OR move it to backend trigger.
// Refresh tasks and labels in case AI created/modified them
queryClient.invalidateQueries({ queryKey: ['/api/tasks'] });
queryClient.invalidateQueries({ queryKey: ['/api/labels'] });
queryClient.invalidateQueries({ queryKey: ['/api/user'] });
},
});