AX Agent 대화 목록 선택 카드와 idle 심볼을 정리한다
좌측 대화 목록 선택 상태가 제목 굵기만 바뀌어 체감이 약하던 문제를 수정했다. ConversationItemTemplate가 ItemSelectedBackground 기반의 둥근 카드 배경을 사용하도록 바꾸고 패딩과 아이콘 영역도 함께 다듬어 선택 항목이 테마에 맞게 한눈에 구분되도록 맞췄다. 실행 중이거나 미확인 완료 상태가 아닌 대화에는 점선 링 형태의 idle 심볼이 보이도록 ShowIdleIndicator 계산 속성과 목록 트리거를 추가했다. 관련 회귀를 ConversationItemViewModelTests로 고정하고 README와 DEVELOPMENT 문서에도 2026-04-15 21:00 KST 기준 변경 이력을 남겼다. 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify_conversation_list_selected_card\ -p:IntermediateOutputPath=obj\verify_conversation_list_selected_card\ / 경고 0 오류 0 검증: dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "ConversationItemViewModelTests" -p:OutputPath=bin\verify_conversation_list_selected_card_tests\ -p:IntermediateOutputPath=obj\verify_conversation_list_selected_card_tests\ / 통과 3
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using AxCopilot.ViewModels;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
|
||||
namespace AxCopilot.Tests.ViewModels;
|
||||
|
||||
public class ConversationItemViewModelTests
|
||||
{
|
||||
[Fact]
|
||||
public void ShowIdleIndicator_IsTrue_WhenConversationIsIdle()
|
||||
{
|
||||
var viewModel = new ConversationItemViewModel
|
||||
{
|
||||
HasUnreadCompletion = false,
|
||||
};
|
||||
|
||||
viewModel.ShowIdleIndicator.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShowIdleIndicator_IsFalse_WhenConversationIsRunning()
|
||||
{
|
||||
var viewModel = new ConversationItemViewModel
|
||||
{
|
||||
HasUnreadCompletion = false,
|
||||
};
|
||||
|
||||
viewModel.IsRunning = true;
|
||||
|
||||
viewModel.ShowIdleIndicator.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShowIdleIndicator_IsFalse_WhenUnreadCompletionMarkerIsVisible()
|
||||
{
|
||||
var viewModel = new ConversationItemViewModel
|
||||
{
|
||||
HasUnreadCompletion = true,
|
||||
};
|
||||
|
||||
viewModel.ShowIdleIndicator.Should().BeFalse();
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,11 @@ public class ConversationItemViewModel : ViewModelBase
|
||||
public bool IsRunning
|
||||
{
|
||||
get => _isRunning;
|
||||
set => SetProperty(ref _isRunning, value);
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _isRunning, value))
|
||||
OnPropertyChanged(nameof(ShowIdleIndicator));
|
||||
}
|
||||
}
|
||||
|
||||
public string Category { get; init; } = "general";
|
||||
@@ -274,4 +278,5 @@ public class ConversationItemViewModel : ViewModelBase
|
||||
: AgentRunCount > 0 ? $"실행 {AgentRunCount}" : "";
|
||||
public bool HasRunStatus => AgentRunCount > 0 || FailedAgentRunCount > 0;
|
||||
public bool HasFailed => FailedAgentRunCount > 0;
|
||||
public bool ShowIdleIndicator => !IsRunning && !HasUnreadCompletion;
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@
|
||||
<!-- ── 대화 목록 항목 DataTemplate ── -->
|
||||
<DataTemplate x:Key="ConversationItemTemplate" DataType="{x:Type vm:ConversationItemViewModel}">
|
||||
<Border x:Name="ConvItemBorder"
|
||||
CornerRadius="10"
|
||||
Padding="10,7"
|
||||
CornerRadius="11"
|
||||
Padding="12,8"
|
||||
Cursor="Hand"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
@@ -177,8 +177,8 @@
|
||||
<Setter Property="Margin" Value="10,1,0,1"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource HintBackground}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AccentColor}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource ItemSelectedBackground}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ItemSelectedBackground}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</DataTrigger>
|
||||
<MultiDataTrigger>
|
||||
@@ -193,20 +193,28 @@
|
||||
</Border.Style>
|
||||
<Grid VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20"/>
|
||||
<ColumnDefinition Width="22"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0"
|
||||
Width="12"
|
||||
Height="12"
|
||||
Margin="0,0,8,0"
|
||||
Width="14"
|
||||
Height="14"
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Center">
|
||||
<Ellipse x:Name="ConvIdleRing"
|
||||
Visibility="Collapsed"
|
||||
Stroke="{DynamicResource SecondaryText}"
|
||||
StrokeThickness="1.3"
|
||||
StrokeDashArray="1.35,1.55"
|
||||
StrokeDashCap="Round"
|
||||
Fill="Transparent"
|
||||
Opacity="0.55"/>
|
||||
<Ellipse x:Name="ConvRunningRing"
|
||||
Visibility="Collapsed"
|
||||
Stroke="{DynamicResource SecondaryText}"
|
||||
StrokeThickness="1.4"
|
||||
StrokeThickness="1.6"
|
||||
Fill="Transparent"/>
|
||||
<Grid x:Name="ConvUnreadBadge"
|
||||
Visibility="Collapsed">
|
||||
@@ -242,6 +250,9 @@
|
||||
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
||||
<Setter TargetName="ConvTitleBlock" Property="FontWeight" Value="SemiBold"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ShowIdleIndicator}" Value="True">
|
||||
<Setter TargetName="ConvIdleRing" Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsRunning}" Value="True">
|
||||
<Setter TargetName="ConvRunningRing" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="ConvRunningRing" Property="Stroke" Value="{DynamicResource AccentColor}"/>
|
||||
|
||||
Reference in New Issue
Block a user