feat(copilot): add user feedback options#867
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR implements a comprehensive user feedback system for the copilot feature, allowing users to provide thumbs up/down ratings on agent responses. The changes introduce a new copilot_feedback database table that captures user queries, agent responses, feedback sentiment, optional text comments, and workflow YAML context when workflow editing tools are involved.
The feedback system integrates deeply with the existing copilot infrastructure:
- Database Layer: A new
copilot_feedbacktable with proper indexing for analytics queries on feedback sentiment and creation date - API Layer: New
/api/copilot/feedbackendpoint supporting both POST (submit feedback) and GET (retrieve feedback) operations with proper authentication - Frontend Integration: Feedback UI components integrated into copilot messages with async submission and visual confirmation states
- Tool Context Capture: Complex logic to extract workflow YAML from multiple potential sources (tool calls, copilot store, preview store) when users provide feedback on workflow-related responses
The PR also includes an important bug fix for tool call dependency handling. Previously, dependency-rejected tool calls were being incorrectly surfaced back to the copilot as errors. The fix introduces a failedDependency parameter throughout the tool execution pipeline, allowing the system to properly distinguish between actual execution errors (errored state) and dependency failures (rejected state). This prevents the copilot from receiving confusing error messages when dependencies fail and improves the overall user experience.
The changes span multiple layers of the application - from database schema and migrations to frontend UI components - creating a complete feedback collection system that will enable the team to analyze user satisfaction and improve copilot performance based on real user interactions.
Confidence score: 2/5
- This PR has significant implementation issues that could cause problems in production
- Score lowered due to missing user association in feedback records and potential data integrity concerns
- Pay close attention to the API route implementation and database schema design
10 files reviewed, 8 comments
...rkflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx
Show resolved
Hide resolved
...rkflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx
Show resolved
Hide resolved
* Feedback v1 * Add yaml previews * Remove logs * Lint * Add user id and chat id to feedback * Lint
* Feedback v1 * Add yaml previews * Remove logs * Lint * Add user id and chat id to feedback * Lint
* Feedback v1 * Add yaml previews * Remove logs * Lint * Add user id and chat id to feedback * Lint
Summary
Type of Change
Testing
Manual testing
Checklist