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();