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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user