Address remaining TODOs in the repo - #1173
Open
sw-joelmut wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses remaining non-Teams TODOs (per #1158) and enhances the telemetry tracing layer by adding managed child spans and improving trace record merge semantics. It also removes an unfinished OAuth card path from card samples and tightens choice normalization behavior.
Changes:
- Removes the unimplemented OAuth card sample path and renumbers card menu options to keep them contiguous.
- Adds
managed.child(...)support to@microsoft/agents-telemetrytraces, and switchesAgentApplication.runTurnto managed tracing with nested child spans. - Implements recursive record merging for plain objects (while replacing arrays) and adds tests + documentation updates for the new behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test-agents/web-chat/src/cardMessages.ts | Removes unfinished OAuth card option and handler; renumbers remaining menu options. |
| test-agents/web-chat/src/cardFactoryHandler.ts | Updates menu switch cases to match renumbered card options. |
| samples/compat/cardFactoryHandler.ts | Mirrors the sample cleanup/removal of OAuth card path and renumbering. |
| packages/agents-telemetry/test/utils/noop.test.ts | Adds coverage for the new child() method on noop managed contexts. |
| packages/agents-telemetry/test/observability/trace.test.ts | Adds tests for managed child spans and new record merge semantics (recursive object merge, array replace, instance preservation). |
| packages/agents-telemetry/src/utils/record.ts | Introduces shared record clone/merge helpers (recursive merge for plain objects, replace arrays). |
| packages/agents-telemetry/src/utils/noop.ts | Adds child() to noop managed contexts to match the updated trace API. |
| packages/agents-telemetry/src/types.ts | Extends public trace types with TraceChildFunction and TraceManagedContext.child, and documents new record semantics. |
| packages/agents-telemetry/src/observability/trace.ts | Implements managed child span support and switches record updates to the new merge/clone utilities. |
| packages/agents-telemetry/README.md | Updates documentation/examples for child() and record merge semantics. |
| packages/agents-hosting/src/app/agentApplication.ts | Uses managed tracing in runTurn and nests child spans for sub-operations. |
| packages/agents-hosting-dialogs/test/choiceRecognizer.test.ts | Adds coverage ensuring nullish choices are ignored. |
| packages/agents-hosting-dialogs/src/choices/recognizeChoices.ts | Makes nullish choice filtering explicit with a type guard. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1158
Summary
This PR cleans up remaining non-Teams TODOs and improves telemetry tracing behavior.
AgentApplication.runTurn.Testing
The following image shows the OTel sample continues working.
