Skip to content

Address remaining TODOs in the repo - #1173

Open
sw-joelmut wants to merge 5 commits into
mainfrom
southworks/update/address-todos-repo
Open

Address remaining TODOs in the repo#1173
sw-joelmut wants to merge 5 commits into
mainfrom
southworks/update/address-todos-repo

Conversation

@sw-joelmut

Copy link
Copy Markdown
Collaborator

Fixes #1158

Summary

This PR cleans up remaining non-Teams TODOs and improves telemetry tracing behavior.

  • Removes the unfinished OAuth card path from card samples and renumbers the remaining card options so they are contiguous.
  • Adds managed child span support to telemetry tracing and uses it in AgentApplication.runTurn.
  • Updates trace record merging to recursively merge plain objects while replacing arrays.
  • Moves record merge helpers into a dedicated telemetry utils module.
  • Cleans up stale dialog choice recognizer TODOs and makes nullish choice handling explicit.
  • Updates docs/JSDoc for the new trace API and record merge semantics.

Testing

The following image shows the OTel sample continues working.
imagen

Copilot AI review requested due to automatic review settings July 1, 2026 15:39
@sw-joelmut
sw-joelmut requested a review from a team as a code owner July 1, 2026 15:39

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 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-telemetry traces, and switches AgentApplication.runTurn to 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.

Comment thread packages/agents-hosting/src/app/agentApplication.ts
Comment thread packages/agents-hosting/src/app/agentApplication.ts Outdated
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.

Review and resolve TODOs in agents-hosting

2 participants