Chat redesign: conversational replies, streaming, completion report#74
Chat redesign: conversational replies, streaming, completion report#74konard wants to merge 3 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: Payel-git-ol#70
…ayel-git-ol#70) Make the chat behave like a normal assistant while still launching workflows, and never leave the user in silence (issue Payel-git-ol#70): - Backend (apigateway): rewrite buildBossChatReply to answer casual messages (greetings, thanks, how-are-you, identity/help, farewell, fallbacks) in the user's language. A plain «привет» / "hello" now gets a real reply instead of an English-only canned line. Language is detected via a new isRussian() Cyrillic check. - Backend: when a workflow finishes successfully the boss reports back in the chat via buildCompletionReport/sendCompletionReport — headline in the request's language, task title, the boss's own answer (chatSummary), and a result link (PR / repo / zip) when available. - Frontend: new TypewriterText component reveals boss replies character-by-character so answers appear to be typed out in real time. Chat renders boss messages through it; live replies animate, while restored history, the user's own messages, and the frequently-updating progress message are shown instantly (animate flag on ChatMessage). - Frontend: stop synthesising a completion message from chatSummary in useWebSocket — the backend now sends the completion report, avoiding a double post. - Tests: Go table tests for conversational replies and completion-report content; frontend check-chat-typewriter.mjs wired into npm test.
Working session summaryAll three CI checks pass. The work for issue #70 is complete. SummaryI redesigned the Octra chat to address all four requirements from issue #70, and updated PR #74 (now marked ready for review): #74 1. Normal conversation while still launching tasks — Rewrote 2. Streaming typewriter effect — New 3. Completion report ("отчитаться") — When a workflow finishes successfully, the boss posts a completion message to the chat via Tests — Go table tests ( Verification — This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $6.010721📊 Context and tokens usage:Claude Opus 4.8: (2 sub-sessions)
Total: (17.1K new + 250.0K cache writes + 6.2M cache reads) input tokens, 50.6K output tokens, $6.010721 cost 🤖 Models used:
📎 Log file uploaded as Gist (2877KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit 569174a.
|
Исправь конфликты |
Chat redesign (closes #70)
The chat was purely a task-submission box: a casual message like
приветgot no real answer because it was treated as a task, so the chat felt dead. This PR makes the chat behave like a normal assistant while still launching workflows, and makes sure a finished task is always reported back.What changed
1. Conversational replies in the user's language (
apigateway/internal/fetcher/http.go)buildBossChatReplyso messages that are not workflow/search requests get a real conversational answer: greetings, how-are-you, thanks, farewell, identity/help, and friendly fallbacks.привет/hellonow gets a proper reply instead of an English-only canned line. Replies are returned in Russian when the message contains Cyrillic, English otherwise (newisRussianhelper).shouldLaunchWorkflowFromChat/shouldLaunchSearchWorkflowFromChat) is unchanged, soсоздай php серверand research queries still launch the pipeline — research mode keeps working.2. Streaming typewriter effect (
frontend/web/src/app/components/TypewriterText.tsx,Chat.tsx,App.tsx)TypewriterTextcomponent reveals boss replies character-by-character with a blinking cursor, so answers appear to be typed out in real time instead of popping in all at once.animateflag onChatMessage).3. Completion report — the boss "отчитывается" (
apigateway/internal/fetcher/http.go,frontend/web/src/hooks/useWebSocket.ts)buildCompletionReport/sendCompletionReport): a headline in the request's language, the task title, the boss's own answer (chatSummary), and a link to the result (PR / repo / zip) when available.processTaskStreamWS.chatSummary→ chat posting so the report is not double-posted.How to reproduce the original issue
привет. Before: silence / dead chat. After: a friendly Russian reply.Tests
apigateway/internal/fetcher/http_test.go):TestBuildBossChatReplyConversational— conversational replies, correct language forпривет/hello/спасибо/thanks/capability/fallback.TestSendCompletionReportContent— completion report includes headline, title, summary, result link, and matches the request language.scripts/check-chat-typewriter.mjs, wired intonpm test):TypewriterTextreveals text incrementally and shows full text immediately whenanimateis false.Chatrenders boss messages viaTypewriterText;Appmarks only fresh boss replies as animated.useWebSocketno longer synthesises a completion message fromchatSummary.All Go tests (
go test ./...) and the full frontend test suite +vite buildpass.