From 48ab3d7a41a5e619cff6f4ed2f2bfac98ec5b776 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 11 Nov 2025 16:39:47 +0800 Subject: [PATCH] Workaround bug in interaction provider when displaying dialogs on load --- .../Components/Interactions/InteractionsProvider.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs b/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs index 497d7ef82b7..fd7656b8839 100644 --- a/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs +++ b/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs @@ -118,6 +118,12 @@ protected override void OnInitialized() _watchInteractionsTask = Task.Run(async () => { + // There is a bug in FluentDialogProvider that causes it to error if used immediately because it's still loading its own JavaScript. + // Wait a small amount of time for it to get ready. + // + // TODO: Remove when https://github.com/microsoft/fluentui-blazor/issues/4311 is fixed. + await Task.Delay(TimeSpan.FromSeconds(2)); + try { await WatchInteractionsAsync().ConfigureAwait(false);