From 0f774caa93ec7fe7a30e86ad95ff471d1438cefb Mon Sep 17 00:00:00 2001 From: Shewatipa Tseisi Date: Sat, 3 Oct 2026 17:08:15 +0200 Subject: [PATCH 1/7] fix: stop SidebarProvider logging JSDisconnectedException on page reload DisposeAsync only caught JSException. After a reload or tab close the circuit is gone, so ShellUI.disposeSidebar throws JSDisconnectedException and Blazor logged it twice per page load. --- .../BlazorInteractiveServer/Components/UI/SidebarProvider.razor | 1 + src/ShellUI.Templates/Templates/SidebarProviderTemplate.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/NET10/BlazorInteractiveServer/Components/UI/SidebarProvider.razor b/NET10/BlazorInteractiveServer/Components/UI/SidebarProvider.razor index c833970..8b2184c 100644 --- a/NET10/BlazorInteractiveServer/Components/UI/SidebarProvider.razor +++ b/NET10/BlazorInteractiveServer/Components/UI/SidebarProvider.razor @@ -111,6 +111,7 @@ { try { await JSRuntime.InvokeVoidAsync("ShellUI.disposeSidebar", _handle); } catch (JSException) { } + catch (JSDisconnectedException) { } } _dotnetRef?.Dispose(); diff --git a/src/ShellUI.Templates/Templates/SidebarProviderTemplate.cs b/src/ShellUI.Templates/Templates/SidebarProviderTemplate.cs index 15a19da..59d78a0 100644 --- a/src/ShellUI.Templates/Templates/SidebarProviderTemplate.cs +++ b/src/ShellUI.Templates/Templates/SidebarProviderTemplate.cs @@ -128,6 +128,7 @@ public async ValueTask DisposeAsync() { try { await JSRuntime.InvokeVoidAsync(""ShellUI.disposeSidebar"", _handle); } catch (JSException) { } + catch (JSDisconnectedException) { } } _dotnetRef?.Dispose(); From 7c911c8800e8a0a8ed7613fa8895ea9be813ec47 Mon Sep 17 00:00:00 2001 From: Shewatipa Tseisi Date: Sat, 3 Oct 2026 17:08:16 +0200 Subject: [PATCH 2/7] fix: run CommandItem.Action when a Command item is selected Command only raised CommandSelected, so items with an Action did nothing on click or Enter. It now runs Action, then raises CommandSelected. CommandPalette is built on Command and gets the same behavior. --- src/ShellUI.Components/Components/Command.razor | 1 + src/ShellUI.Templates/Templates/CommandTemplate.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ShellUI.Components/Components/Command.razor b/src/ShellUI.Components/Components/Command.razor index 847ade6..f94d672 100644 --- a/src/ShellUI.Components/Components/Command.razor +++ b/src/ShellUI.Components/Components/Command.razor @@ -233,6 +233,7 @@ else if (IsOpen) private async Task SelectAsync(CommandItem command) { await CloseAsync(); + if (command.Action is not null) await command.Action(); await CommandSelected.InvokeAsync(command); } diff --git a/src/ShellUI.Templates/Templates/CommandTemplate.cs b/src/ShellUI.Templates/Templates/CommandTemplate.cs index 6f3449f..4ab038f 100644 --- a/src/ShellUI.Templates/Templates/CommandTemplate.cs +++ b/src/ShellUI.Templates/Templates/CommandTemplate.cs @@ -249,6 +249,7 @@ private async Task OnKeyDownAsync(KeyboardEventArgs e) private async Task SelectAsync(CommandItem command) { await CloseAsync(); + if (command.Action is not null) await command.Action(); await CommandSelected.InvokeAsync(command); } From f96d41752ecdca6db1b0c5bcb22c17b003f46047 Mon Sep 17 00:00:00 2001 From: Shewatipa Tseisi Date: Sat, 3 Oct 2026 17:09:01 +0200 Subject: [PATCH 3/7] fix: make init --tailwind explicit and validate it before changing the project An explicit --tailwind now skips the prompt (it was ignored in interactive mode), an unknown value fails before init touches the project, and with --yes init says that standalone is the default and how to choose npm. --- docs/CLI_SYNTAX.md | 2 +- src/ShellUI.CLI/Program.cs | 8 +++----- src/ShellUI.CLI/Services/InitService.cs | 16 ++++++++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/CLI_SYNTAX.md b/docs/CLI_SYNTAX.md index ab60258..246622f 100644 --- a/docs/CLI_SYNTAX.md +++ b/docs/CLI_SYNTAX.md @@ -44,7 +44,7 @@ Options: - `--force` reinitializes a project that already has `shellui.json`. - `--style