Skip to content

Conversation

@kylerohnmsft
Copy link
Contributor

@kylerohnmsft kylerohnmsft commented Jul 21, 2025

Fixes #5514

Changelog Entry

  • Added livestreaming support for livestreaming data in entities in PR #5517 by @kylerohn

note: actual changes made by kylerohnmsft, but linking personal account to show contribution after internship ends

Description

Microsoft platforms such as the Agents SDKs are now putting streaming information in the entities field rather than the channelData field. This means that BotFramework-WebChat must be able to handle reading streaming data from either location, prioritizing reading from entities.

Design

Nothing fundamental about the code flow was changed. getActivityLivestreamingMetadata() was edited such that entities is checked for streaming data before channelData. If the streaming data is found in entities, it uses that data to encode the livestreaming metadata. Otherwise, it moves on to channelData and the code executes as it did before. Changes were made to abstract some of the Schema structure such that overall code maintenance should be easier moving forward.

Specific Changes

  • Check entities field of activity for streaming data
  • Abstraction of schemas used to validate streaming data schemas
  • Added unit tests to validate functionality of metadata collection from entities

-

  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)
@kylerohnmsft kylerohnmsft marked this pull request as ready for review July 21, 2025 20:00
@MattB-msft
Copy link
Member

@compulim PR validation checks are failing intermittently, can you rerun?

image I think it legitimately fail. Unit tests rarely flaky.

Tests are fully passing now.

@OEvgeny OEvgeny requested a review from Copilot August 22, 2025 16:54
Copy link
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 support for reading livestreaming metadata from the entities field in addition to the existing channelData field support. Microsoft platforms are migrating to use the entities field for streaming information, requiring WebChat to support both locations with entities taking priority.

Key changes:

  • Enhanced schema validation to check both entities and channelData for streaming metadata
  • Added abstraction layer for streaming data schemas to improve maintainability
  • Comprehensive test coverage for entities-based streaming scenarios

Reviewed Changes

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

File Description
packages/core/src/utils/getActivityLivestreamingMetadata.ts Core logic updated to parse streaming data from entities field with fallback to channelData
packages/core/src/utils/getActivityLivestreamingMetadata.spec.ts Added comprehensive test cases for entities-based streaming scenarios
docs/LIVESTREAMING.md Added documentation example showing entities field usage
CHANGELOG.md Added changelog entry for the new feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@OEvgeny
Copy link
Collaborator

OEvgeny commented Aug 22, 2025

Seems validation is too strict / not right @compulim

@compulim compulim merged commit 75bc691 into microsoft:main Aug 22, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants