워크스페이스 브라우저 상태 복원 경로를 추가하고 설정 및 검증을 정리한다

변경 목적: ~ 워크스페이스 복원 시 창 배치뿐 아니라 브라우저 탭/URL 상태까지 가능한 범위에서 함께 재현하도록 저장/복원 경로를 확장한다.

핵심 수정사항: BrowserWorkspaceStateHelper를 추가해 Chromium/Firefox 계열 창의 프로필 인자, 탭 URL, 활성 탭 인덱스를 수집하고, ContextManager가 브라우저 상태가 저장된 창은 부분 제목 매칭으로 기존 창을 재사용하지 않고 새 브라우저 창을 띄워 동일한 URL 세트를 복원한 뒤 위치와 활성 탭을 맞추도록 변경했다. Launcher 설정에 브라우저 상태 복원 토글을 추가하고 SettingsViewModel 및 설정 UI와 연결했으며, ContextManagerTests와 SettingsServiceTests를 확장했다. README와 DEVELOPMENT 문서에도 2026-04-15 17:26 (KST) 기준 작업 이력과 검증 명령을 반영했다.

검증 결과: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify_browser_restore\ -p:IntermediateOutputPath=obj\verify_browser_restore\ 에서 경고 0/오류 0을 확인했고, dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter WorkspaceHandlerTests|ContextManagerTests|SettingsServiceTests -p:OutputPath=bin\verify_browser_restore_workspace_tests\ -p:IntermediateOutputPath=obj\verify_browser_restore_workspace_tests\ 에서 44개 테스트 통과를 확인했다.
This commit is contained in:
2026-04-15 17:28:22 +09:00
parent 9344cf83d6
commit e823ff83e3
10 changed files with 941 additions and 10 deletions

View File

@@ -231,6 +231,10 @@ public class LauncherSettings
[JsonPropertyName("showLauncherBottomQuickActions")]
public bool ShowLauncherBottomQuickActions { get; set; } = false;
/// <summary>워크스페이스 저장 시 브라우저 탭과 URL 상태를 함께 캡처/복원합니다. 기본 true.</summary>
[JsonPropertyName("enableBrowserSessionRestore")]
public bool EnableBrowserSessionRestore { get; set; } = true;
/// <summary>단축키 헬프 창에서 아이콘 색상을 테마 AccentColor 기준으로 표시. 기본 true(테마색).</summary>
[JsonPropertyName("shortcutHelpUseThemeColor")]
public bool ShortcutHelpUseThemeColor { get; set; } = true;
@@ -395,6 +399,30 @@ public class WindowSnapshot
[JsonPropertyName("monitor")]
public int Monitor { get; set; } = 0;
[JsonPropertyName("browser")]
public BrowserWindowState? Browser { get; set; }
}
public class BrowserWindowState
{
[JsonPropertyName("kind")]
public string Kind { get; set; } = "";
[JsonPropertyName("userDataDir")]
public string? UserDataDir { get; set; }
[JsonPropertyName("profileDirectory")]
public string? ProfileDirectory { get; set; }
[JsonPropertyName("activeUrl")]
public string? ActiveUrl { get; set; }
[JsonPropertyName("activeTabIndex")]
public int ActiveTabIndex { get; set; }
[JsonPropertyName("tabUrls")]
public List<string> TabUrls { get; set; } = new();
}
public class WindowRect