From f231f08a27570c59e72e0bfe8fc9380179d7c8e8 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Mon, 7 Sep 2026 08:17:01 +0200 Subject: [PATCH] feat(ui): Home-Ordner als Sitzungsziel in Mission Control Erster Eintrag im Sitzungsmenue, fuer schnelle allgemeine Fragen, die zu keinem Projekt gehoeren. --- src/ClaudeDo.Ui/ViewModels/MissionControlViewModel.cs | 9 ++++++++- .../ViewModels/MissionControlViewModelTests.cs | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ClaudeDo.Ui/ViewModels/MissionControlViewModel.cs b/src/ClaudeDo.Ui/ViewModels/MissionControlViewModel.cs index 02d6f7ce..5f769455 100644 --- a/src/ClaudeDo.Ui/ViewModels/MissionControlViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/MissionControlViewModel.cs @@ -179,7 +179,14 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable internal async System.Threading.Tasks.Task RefreshSessionTargetsAsync() { SessionTargets.Clear(); - // Browse goes in first so the menu stays usable even if the list query below fails. + // Home + browse go in first so the menu stays usable even if the list query below fails. + // Home is the target for quick general questions that belong to no project. + var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + SessionTargets.Add(new SessionTargetViewModel + { + Label = Loc.T("missionControl.homeFolder"), + StartCommand = new RelayCommand(() => _ = OpenAdHocConPtySessionAsync(home)), + }); SessionTargets.Add(new SessionTargetViewModel { Label = Loc.T("missionControl.browseForFolder"), diff --git a/tests/ClaudeDo.Ui.Tests/ViewModels/MissionControlViewModelTests.cs b/tests/ClaudeDo.Ui.Tests/ViewModels/MissionControlViewModelTests.cs index c75e2caa..d5c44bdd 100644 --- a/tests/ClaudeDo.Ui.Tests/ViewModels/MissionControlViewModelTests.cs +++ b/tests/ClaudeDo.Ui.Tests/ViewModels/MissionControlViewModelTests.cs @@ -254,11 +254,11 @@ public class MissionControlViewModelTests : IDisposable await vm.RefreshSessionTargetsAsync(); - // Browse first (survives a failing list query), then the lists in sort order. - Assert.Equal(3, vm.SessionTargets.Count); - Assert.Equal(new[] { "Beta", "Alpha" }, vm.SessionTargets.Skip(1).Select(t => t.Label).ToArray()); + // Home + browse first (they survive a failing list query), then the lists in sort order. + Assert.Equal(4, vm.SessionTargets.Count); + Assert.Equal(new[] { "Beta", "Alpha" }, vm.SessionTargets.Skip(2).Select(t => t.Label).ToArray()); - vm.SessionTargets[0].StartCommand.Execute(null); + vm.SessionTargets[1].StartCommand.Execute(null); Assert.True(browsed); }