Skip to content

feat: add custom feedback loop#522

Open
lilyydu wants to merge 8 commits intomainfrom
lilyydu/custom-feedback
Open

feat: add custom feedback loop#522
lilyydu wants to merge 8 commits intomainfrom
lilyydu/custom-feedback

Conversation

@lilyydu
Copy link
Copy Markdown
Contributor

@lilyydu lilyydu commented Apr 13, 2026

Custom Feedback Context:
Learn Doc

Copilot AI review requested due to automatic review settings April 13, 2026 21:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds first-class support for Teams “feedback loop” configuration, including a new feedbackLoop channelData shape (default vs custom) and the associated message/fetchTask invoke path needed for custom feedback task modules.

Changes:

  • Introduces ChannelData.feedbackLoop (and FeedbackLoop model) while keeping feedbackLoopEnabled as a legacy alias.
  • Adds normalization logic in Activity.withChannelData() and extends Activity.addFeedback() to support 'default' | 'custom' modes, with updated tests.
  • Adds routing/type support for the message/fetchTask invoke (aliases + response typing) and updates devtools’ feedback detection.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/devtools/src/stores/ChatStore.ts Treats channelData.feedbackLoop as enabling feedback in the devtools UI state.
packages/apps/src/routes/invoke/index.ts Adds invoke alias mapping for message/fetchTaskmessage.fetch-task.
packages/apps/src/router/router.spec.ts Adds coverage ensuring message/fetchTask selects both invoke and message.fetch-task routes.
packages/api/src/models/invoke-response.ts Types message/fetchTask invoke responses as TaskModuleResponse.
packages/api/src/models/channel-data/index.ts Adds feedbackLoop to ChannelData and documents legacy feedbackLoopEnabled.
packages/api/src/models/channel-data/feedback-loop.ts Introduces FeedbackLoop model type (default/custom).
packages/api/src/activities/invoke/message/index.ts Extends message invoke activity union to include fetch-task.
packages/api/src/activities/invoke/message/fetch-task.ts Adds typed representation of the message/fetchTask invoke payload.
packages/api/src/activities/activity.ts Normalizes legacy feedback flag into feedbackLoop; adds addFeedback(mode) support.
packages/api/src/activities/activity.spec.ts Adds test coverage for normalization and custom/default feedback modes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/api/src/activities/activity.ts
Copy link
Copy Markdown
Collaborator

@heyitsaamir heyitsaamir left a comment

Choose a reason for hiding this comment

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

Any examples you wanna show? The PR description has one

/**
* The feedback button the user clicked.
*/
reaction: 'like' | 'dislike';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hm this didn't exist before? i thought we had some examples showing this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you're probably thinking of this one -

but different invoke activity (this is for default)

Comment thread packages/api/src/activities/activity.ts
Comment thread packages/api/src/activities/activity.ts
Comment thread packages/api/src/models/channel-data/index.ts
Comment thread packages/api/src/models/channel-data/index.ts
corinagum
corinagum previously approved these changes Apr 14, 2026
Copy link
Copy Markdown
Collaborator

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

lgtm! just a couple question/nit comments

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.

4 participants