Skip to content

feat: add custom feedback loop#522

Merged
lilyydu merged 10 commits into
mainfrom
lilyydu/custom-feedback
Apr 21, 2026
Merged

feat: add custom feedback loop#522
lilyydu merged 10 commits into
mainfrom
lilyydu/custom-feedback

Conversation

@lilyydu

@lilyydu lilyydu commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Custom Feedback Context:
Learn Doc

Copilot AI review requested due to automatic review settings April 13, 2026 21:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

@heyitsaamir heyitsaamir left a comment

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.

Any examples you wanna show? The PR description has one

Comment thread packages/api/src/activities/invoke/message/fetch-task.ts
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

@corinagum corinagum left a comment

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.

lgtm! just a couple question/nit comments

@lilyydu
lilyydu merged commit a2dd14b into main Apr 21, 2026
7 of 8 checks passed
@lilyydu
lilyydu deleted the lilyydu/custom-feedback branch April 21, 2026 17:36
lilyydu added a commit to microsoft/teams.net that referenced this pull request Apr 22, 2026
Custom Feedback Context:
[Learn
Doc](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-messages-ai-generated-content?tabs=desktop%2Cjs%2Cbotmessage#feedback-buttons)

- previously we had a flag called feedbackLoopEnabled which only enables
the default feedback form
- now, we have a param called feedbackLoop that can either be default or
custom.
- updated AI sample to feature the custom feedback loop
- also included the normalization to feedbackLoop when using
withChannelData..
- py equivalent: microsoft/teams.py#349
- ts equivalent: microsoft/teams.ts#522

---------

Co-authored-by: lilydu <[email protected]>
Co-authored-by: Copilot <[email protected]>
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