feat(ui): default to the Git tab for manual and interactive tasks

A hand-driven task produces no streamed agent output, so the Output tab
opened empty. Bind now selects git for manual/interactive rows and resets
to output for autonomous ones.
This commit is contained in:
mika kuns
2026-08-07 14:01:26 +02:00
parent af0f318bf0
commit 549aee097b
2 changed files with 37 additions and 0 deletions
@@ -601,6 +601,10 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable
return;
}
// A hand-driven task (manual reminder or a live ConPTY session) produces no streamed
// agent output, so the Output tab would open empty -- its work shows up as git changes.
SelectedTab = row.IsManual || row.HasInteractiveSession ? "git" : "output";
_ = BindAsync(row, ct);
}
@@ -80,4 +80,37 @@ public class DetailsIslandTabsTests : IDisposable
Assert.True(vm.IsOutputTab);
Assert.False(vm.IsGitTab);
}
[Fact]
public void Bind_manual_task_defaults_to_git_tab()
{
var vm = NewVm();
vm.Bind(new TaskRowViewModel { Id = Guid.NewGuid().ToString("N"), IsManual = true });
Assert.True(vm.IsGitTab);
Assert.False(vm.IsOutputTab);
}
[Fact]
public void Bind_interactive_task_defaults_to_git_tab()
{
var vm = NewVm();
vm.Bind(new TaskRowViewModel { Id = Guid.NewGuid().ToString("N"), HasInteractiveSession = true });
Assert.True(vm.IsGitTab);
}
[Fact]
public void Bind_autonomous_task_defaults_to_output_tab()
{
var vm = NewVm();
vm.SelectTabCommand.Execute("git");
vm.Bind(new TaskRowViewModel { Id = Guid.NewGuid().ToString("N") });
Assert.True(vm.IsOutputTab);
Assert.False(vm.IsGitTab);
}
}