[Phase L5-4] 앱 세션 스냅 (session) 구현

AppSettings.Models.cs (수정):
- AppSession 클래스 신규: Name/Description/Apps/CreatedAt
- SessionApp 클래스 신규: Path/Arguments/Label/SnapPosition/DelayMs
- 스냅 위치 14종: full/left/right/tl~br/center/third-l/c/r/two3-l/r/none

AppSettings.cs (수정):
- [JsonPropertyName("appSessions")] AppSessions 리스트 추가

SessionHandler.cs (신규, ~160줄):
- prefix="session", GetItemsAsync: 목록+필터, new/edit/del 서브커맨드
- ExecuteAsync: 편집기 열기 또는 LaunchSessionAsync 실행
- LaunchSessionAsync: Process.Start → 창 핸들 대기(최대 6초 폴링) → ApplySnapToWindow
- ApplySnapToWindow: P/Invoke(SetWindowPos, ShowWindow, MonitorFromWindow, GetMonitorInfo) + 14종 스냅 좌표 계산

SessionEditorWindow.xaml (신규, ~200줄):
- 타이틀바 + 세션명·설명 TextBox + 앱 목록 영역 + 하단 버튼 바
- SnapPickerPopup: PlacementTarget 코드에서 동적 지정, ContentControl에 StackPanel 14개 옵션

SessionEditorWindow.xaml.cs (신규, ~240줄):
- AppRowUi 내부 모델: Path/Label/SnapPosition/Args/DelayMs + SnapLabelRef 갱신
- BuildRowGrid(): 경로TextBox + 라벨TextBox + 스냅Border(팝업) + 삭제Border
- BtnAddApp: OpenFileDialog → 자동 라벨(파일명)
- BtnSave: 유효 행 필터 → AppSession 구성 → 기존 교체 또는 신규 추가 → Save()

App.xaml.cs (수정):
- Phase L5-4 섹션에 SessionHandler 등록

docs/LAUNCHER_ROADMAP.md (수정):
- L5-4 항목  완료 표시 + 구현 상세 기록

빌드: 경고 0, 오류 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 12:54:24 +09:00
parent 375ea0566d
commit 2d3e5f6a72
7 changed files with 995 additions and 1 deletions

View File

@@ -112,6 +112,12 @@ public class AppSettings
[JsonPropertyName("customHotkeys")]
public List<HotkeyAssignment> CustomHotkeys { get; set; } = new();
/// <summary>
/// 앱 세션 목록. session 핸들러로 여러 앱을 지정 레이아웃에 한번에 실행합니다.
/// </summary>
[JsonPropertyName("appSessions")]
public List<AppSession> AppSessions { get; set; } = new();
[JsonPropertyName("llm")]
public LlmSettings Llm { get; set; } = new();
}