feat(chat): add send-to-board action for save_analysis tool results#34
Conversation
- Add _resolve_tool_call_id to event_mapper for consistent tool_call_id propagation - Change tool_stack from list[str] to list[dict] to carry tool_call_id through start→end - Fix get_conversation_events to return latest window via CTE instead of earliest rows - Allow ToolGroupRenderer to show send-to-board for individually completed children - Remove unused AssetEmbedTestButtons component - Add tests for tool_call_id stability and latest-window event query - Add project assets (screenshot, UI svg) and update README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a94126125
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if self._tool_stack: | ||
| tool_context = self._tool_stack.pop() | ||
| tool_name = tool_context["name"] | ||
| tool_call_id = tool_context["tool_call_id"] |
There was a problem hiding this comment.
Correlate tool end events by tool_call_id
on_tool_end always pops the most recent stack entry and ignores the current callback's tool_call_id while the stack is non-empty, so overlapping tool executions can be mismatched (e.g., start A, start B, end A will be emitted with B's id). In that case the frontend tool correlator (which keys by tool_call_id) will merge outputs into the wrong tool row, causing incorrect status/output pairing and actions like send-to-board to attach to the wrong call.
Useful? React with 👍 / 👎.
Summary
save_analysistool 실행 결과를 보드에 바로 보낼 수 있는 "Send to Board" 액션 버튼을 추가하고, tool 이벤트의 start/end 매칭 안정성을 개선한 PR입니다.Changes
save_analysistool 완료 시 embeddable asset을 감지하여 "Send to Board" 버튼을 노출 (toolAssetDetector.ts,ToolRenderer.tsx,ToolGroupRenderer.tsx)page.tsx)event_mapper.py에서_resolve_tool_call_id메서드를 추가하여 tool start/end 이벤트 간 동일한tool_call_id가 전파되도록 수정._tool_stack을list[dict]로 변경하여 tool_call_id를 start→end로 전달ChatRepository.get_conversation_events가 CTE를 사용하여 최신 N개 이벤트를 반환하도록 쿼리 개선AssetEmbedTestButtons컴포넌트 삭제, 프로젝트 에셋(screenshot, UI svg) 추가Test plan
save_analysistool 완료 후 "Send to Board" 버튼이 표시되는지 확인pytest backend/tests/agent/test_orchestrator_display_order.py통과pytest backend/tests/services/test_chat_repository_event_contract.py통과node --test frontend/pluto_duck_frontend/components/chat/renderers/__tests__/toolAssetDetector.test.ts통과Closes PLU-389
🤖 Generated with Claude Code