From 60358100be59ef1c1b00722a114168d850305d91 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Wed, 30 Sep 2026 10:14:55 +0200 Subject: [PATCH] fix(ui): Recent-Sessions Resume/Brief-Buttons fuehren ihren Command wieder aus Der Click-Handler schloss das Flyout synchron; Button liest Command erst nach dem ClickEvent, das Hide hatte die Bindung da schon geloest. --- .../Views/MissionControl/MissionControlView.axaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ClaudeDo.Ui/Views/MissionControl/MissionControlView.axaml.cs b/src/ClaudeDo.Ui/Views/MissionControl/MissionControlView.axaml.cs index bfa3b359..5ddca48f 100644 --- a/src/ClaudeDo.Ui/Views/MissionControl/MissionControlView.axaml.cs +++ b/src/ClaudeDo.Ui/Views/MissionControl/MissionControlView.axaml.cs @@ -29,8 +29,10 @@ public partial class MissionControlView : UserControl InitializeComponent(); DataContextChanged += OnDataContextChanged; QueueSplitter.DragCompleted += (_, _) => _queueWidth = BodyGrid.ColumnDefinitions[2].Width; - // Resume/Brief buttons don't close a plain Flyout on their own. - RecentSessionsList.AddHandler(Button.ClickEvent, (_, _) => RecentSessionsButton.Flyout?.Hide()); + // Resume/Brief buttons don't close a plain Flyout on their own. Deferred: Click fires before + // Button runs its Command, and a synchronous Hide unbinds that Command first. + RecentSessionsList.AddHandler(Button.ClickEvent, + (_, _) => Avalonia.Threading.Dispatcher.UIThread.Post(() => RecentSessionsButton.Flyout?.Hide())); } private void OnSessionFlyoutOpening(object? sender, EventArgs e) => _ = _vm?.RefreshSessionTargetsAsync();