Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@

</Aside>

<Aside type="caution">
The interaction service isn't available while the app host runs before-start logic: `BeforeStartEvent` subscribers, `IDistributedApplicationLifecycleHook.BeforeStartAsync` implementations, and the `before-start` pipeline step. Nothing can respond to a prompt at that point because the dashboard and CLI backchannel start later. `IInteractionService.IsAvailable` returns `false` during this phase (including between `Build()` and `Run()`), and it returns `true` again once before-start completes. Calling a prompt method without checking `IsAvailable` throws an `InvalidOperationException` instead of hanging app host startup. To prompt the user, move the logic to a later event, such as a resource event or a resource command.

Check failure on line 160 in src/frontend/src/content/docs/extensibility/interaction-service.mdx

View workflow job for this annotation

GitHub Actions / Check forbidden words

Forbidden phrase (/\bapp host\b/): Use "AppHost" instead of "app host".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "AppHost" instead of "app host".

Suggested change
The interaction service isn't available while the app host runs before-start logic: `BeforeStartEvent` subscribers, `IDistributedApplicationLifecycleHook.BeforeStartAsync` implementations, and the `before-start` pipeline step. Nothing can respond to a prompt at that point because the dashboard and CLI backchannel start later. `IInteractionService.IsAvailable` returns `false` during this phase (including between `Build()` and `Run()`), and it returns `true` again once before-start completes. Calling a prompt method without checking `IsAvailable` throws an `InvalidOperationException` instead of hanging app host startup. To prompt the user, move the logic to a later event, such as a resource event or a resource command.
The interaction service isn't available while the AppHost runs before-start logic: `BeforeStartEvent` subscribers, `IDistributedApplicationLifecycleHook.BeforeStartAsync` implementations, and the `before-start` pipeline step. Nothing can respond to a prompt at that point because the dashboard and CLI backchannel start later. `IInteractionService.IsAvailable` returns `false` during this phase (including between `Build()` and `Run()`), and it returns `true` again once before-start completes. Calling a prompt method without checking `IsAvailable` throws an `InvalidOperationException` instead of hanging AppHost startup. To prompt the user, move the logic to a later event, such as a resource event or a resource command.

</Aside>

## Display messages

There are several ways to display messages to the user:
Expand Down
Loading