[Phase L2-6] 검색 결과 그룹핑 (앱/폴더/파일/단축키)

AxCopilot.SDK/IActionHandler.cs:
- LauncherItem 레코드에 Group? 선택 매개변수 추가 (기존 호출 코드 무변경)

Core/CommandResolver.cs:
- Fuzzy 검색 결과에 Group 태깅: 앱/폴더/단축키/파일

ViewModels/LauncherViewModel.cs:
- ICollectionView GroupedResults 프로퍼티 추가
- CollectionViewSource + PropertyGroupDescription(nameof(LauncherItem.Group)) 초기화

Views/LauncherWindow.xaml:
- ItemsSource: Results → GroupedResults 변경
- ListView.GroupStyle 추가: 그룹 이름 헤더(10px, SemiBold, 흐린 보조 텍스트)
- GroupItem ContainerStyle로 헤더+아이템 수직 배치
- Group=null 항목은 NullToCollapsedConverter로 헤더 숨김

빌드: 경고 0, 오류 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 10:36:26 +09:00
parent d6d5f518d0
commit 679de30f68
4 changed files with 57 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using AxCopilot.Core;
using AxCopilot.Models;
@@ -41,6 +42,12 @@ public partial class LauncherViewModel : INotifyPropertyChanged
/// </summary>
public BulkObservableCollection<LauncherItem> Results { get; } = new();
/// <summary>
/// 그룹핑이 적용된 결과 뷰. prefix 없는 일반 검색에서 앱/폴더/파일/단축키 섹션 구분 표시.
/// Group == null 항목은 별도 그룹 헤더 없이 표시됩니다.
/// </summary>
public ICollectionView GroupedResults { get; }
// ─── 기본 프로퍼티 ────────────────────────────────────────────────────────
public string InputText
@@ -243,6 +250,11 @@ public partial class LauncherViewModel : INotifyPropertyChanged
{
_resolver = resolver;
_settings = settings;
// 그룹핑 뷰 초기화 (UI 스레드에서 생성 보장)
GroupedResults = CollectionViewSource.GetDefaultView(Results);
GroupedResults.GroupDescriptions.Add(
new PropertyGroupDescription(nameof(LauncherItem.Group)));
}
// ─── 런처 표시 시 초기화 ──────────────────────────────────────────────────