Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 4, 2025

Description

Fix issue when canceling input dialog.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copilot AI review requested due to automatic review settings July 4, 2025 06:05
@JamesNK JamesNK requested a review from mitchdenny as a code owner July 4, 2025 06:05
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 prevents InteractionService from throwing when an inputs dialog is dismissed and adds a test to cover the cancel scenario.

  • Removed the exception throw in CompleteInteractionAsync when result.State is null for inputs interactions.
  • Added a new xUnit test (WatchInteractions_PromptInputAsync_CompleteOnCancelResponse) to verify that cancelling an input dialog completes without data.
  • Cleaned up a duplicate using Aspire.DashboardService.Proto.V1; in the test file.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Aspire.Hosting/ApplicationModel/InteractionService.cs Removed the InvalidOperationException for null input state
tests/Aspire.Hosting.Tests/Dashboard/DashboardServiceTests.cs Added a test for canceling an inputs dialog and cleaned up imports

@JamesNK JamesNK requested review from adamint and captainsafia July 4, 2025 06:11
@JamesNK JamesNK added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication and removed area-dashboard labels Jul 4, 2025
@JamesNK JamesNK enabled auto-merge (squash) July 4, 2025 06:27
@JamesNK JamesNK merged commit fa97246 into main Jul 4, 2025
252 checks passed
@JamesNK JamesNK deleted the jamesnk/interaction-remove-throw branch July 4, 2025 07:49
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants