Skip to content

feat(copilot): add user feedback options#867

Merged
Sg312 merged 6 commits intostagingfrom
feat/copilot-feedback
Aug 5, 2025
Merged

feat(copilot): add user feedback options#867
Sg312 merged 6 commits intostagingfrom
feat/copilot-feedback

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Aug 4, 2025

Summary

  • Lets users provide thumbs up/down feedback for agent responses
  • Also fixes bug to not surface dependency rejected tool calls back to copilot

Type of Change

  • New feature
  • Bug fix

Testing

Manual testing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 0:13am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Aug 5, 2025 0:13am

@vercel vercel bot temporarily deployed to Preview – docs August 4, 2025 23:54 Inactive
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_feedback table with proper indexing for analytics queries on feedback sentiment and creation date
  • API Layer: New /api/copilot/feedback endpoint 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

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 5, 2025 00:02 Inactive
@vercel vercel bot temporarily deployed to Preview – docs August 5, 2025 00:04 Inactive
@Sg312 Sg312 merged commit 1035aca into staging Aug 5, 2025
5 checks passed
waleedlatif1 pushed a commit that referenced this pull request Aug 5, 2025
* Feedback v1

* Add yaml previews

* Remove logs

* Lint

* Add user id and chat id to feedback

* Lint
@waleedlatif1 waleedlatif1 deleted the feat/copilot-feedback branch August 6, 2025 00:22
waleedlatif1 pushed a commit that referenced this pull request Aug 6, 2025
* Feedback v1

* Add yaml previews

* Remove logs

* Lint

* Add user id and chat id to feedback

* Lint
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
* Feedback v1

* Add yaml previews

* Remove logs

* Lint

* Add user id and chat id to feedback

* Lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant