fix(claude-do): merge Hide the "Submit for review" button on list-handler panes in
ClaudeDo-Task: ea129b1c8c2f47cbaa4db19a2bb5b441
This commit is contained in:
@@ -40,10 +40,14 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
|
||||
}
|
||||
|
||||
/// <summary>Set by the host for a list-handler run ("Let Claude handle it" / "Let Claude merge
|
||||
/// the reviews") pane -- shows the "Abandon run" action. Plain mutable property, not
|
||||
/// <see cref="ObservableProperty"/>: the host sets it once right after construction, before the
|
||||
/// pane is added to the visible collection, so no change notification is needed.</summary>
|
||||
public bool IsListHandler { get; set; }
|
||||
/// the reviews") pane -- shows the "Abandon run" action and hides the manual submit button.</summary>
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowSubmitForReview))]
|
||||
private bool _isListHandler;
|
||||
|
||||
/// <summary>Whether the header shows "Submit for review": task-based, and not a list handler
|
||||
/// (the handler submits its own task at the end of its merge phase).</summary>
|
||||
public bool ShowSubmitForReview => IsTaskBased && !IsListHandler;
|
||||
|
||||
[ObservableProperty] private string _displayTitle;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
Foreground="{DynamicResource TextDimBrush}"
|
||||
VerticalAlignment="Center" Margin="4,0,0,0" />
|
||||
<Button Grid.Column="1" Classes="btn" Margin="0,0,6,0"
|
||||
IsVisible="{Binding IsTaskBased}"
|
||||
IsVisible="{Binding ShowSubmitForReview}"
|
||||
Content="{loc:Tr missionControl.submitForReview}"
|
||||
ToolTip.Tip="{loc:Tr missionControl.submitForReviewTip}"
|
||||
Command="{Binding SubmitForReviewCommand}" />
|
||||
|
||||
@@ -1143,6 +1143,19 @@ public class MissionControlViewModelTests : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
// The handler submits its own task, so only a non-handler task-based pane shows the button.
|
||||
[Fact]
|
||||
public async Task ShowSubmitForReview_FalseForListHandler_TrueForNormalTaskPane()
|
||||
{
|
||||
var worker = new RecordingAbandonWorker();
|
||||
using var vm = BuildVm(worker);
|
||||
await vm.OpenConPtySessionAsync("t1");
|
||||
await vm.OpenMergeHelperConPtySessionAsync("L1", new[] { "t2" });
|
||||
|
||||
Assert.True(vm.ConPtySessions[0].ShowSubmitForReview);
|
||||
Assert.False(vm.ConPtySessions[1].ShowSubmitForReview);
|
||||
}
|
||||
|
||||
// A plain OpenConPtySessionAsync pane (not a list handler) never shows/allows the action --
|
||||
// acceptance criterion 5 ("only at handler panes").
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user