fix(frontend): route product planning EA replies to the CEO terminal#400
Open
zhengxuyu wants to merge 1 commit into
Open
fix(frontend): route product planning EA replies to the CEO terminal#400zhengxuyu wants to merge 1 commit into
zhengxuyu wants to merge 1 commit into
Conversation
The conversation_message handler in app.js routed agent replies to the
CEO terminal only when _currentConvType was 'oneonone' or 'ea_chat'.
Product planning conversations (opened via
_openProductPlanningConversation) set _currentConvType = 'product', so
EA replies arrived via the WebSocket event but were silently dropped:
they didn't match the terminal branch, and they didn't match the
chatPanel branch either (planning uses the terminal, not chatPanel).
The text still showed up in server debug logs because the LLM output
was logged at the trace layer — but the CEO never saw it in the UI,
making the planning conversation look completely broken.
Add 'product' to the type filter and reuse the EA label ('玲珑阁 (EA)')
since planning is always a CEO ↔ EA conversation.
Tests: tests/frontend/test_conversation_routing.js exercises a
behavioral mirror of the routing predicate plus a source-level
invariant. Wrapped in pytest via tests/integration/.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EA replies in product planning conversations were never rendered in the CEO terminal — they only appeared in server debug logs. The CEO would click Start Planning, see the EA's question in the trace stream, and assume the UI was broken.
Root cause
frontend/app.js:292— the WebSocketconversation_messagehandler routes to the CEO terminal only when:But
_openProductPlanningConversationsets_currentConvType = 'product'(app.js:7137). So the EA reply arrived via WebSocket, didn't match the terminal branch, didn't match the chatPanel branch (planning uses the terminal), and got dropped.The text appeared in logs because the LLM trace layer captures all model output regardless of UI.
Fix
Add
'product'to the type filter; reuse the EA label (玲珑阁 (EA)) since planning is always a CEO ↔ EA conversation.Test plan
node tests/frontend/test_conversation_routing.js— 6 assertions (source-level invariant + 5 behavioral routing cases)pytest tests/integration/test_frontend_conversation_routing.py— pytest wrapper passes🤖 Generated with Claude Code