AX Agent 스트리밍 중 탭 전환과 새 대화가 멈추는 저장 루프 회귀 수정

원인: 같은 LastActiveTab·LastConversationIds 상태에서도 ChatSessionStateService.Save가 매번 settings.Save를 호출해 SettingsChanged -> UpdateTabUI -> SwitchToTabConversation -> SaveLastConversations 순환이 계속 발생했습니다. 이 때문에 시간 표시가 0초에 머무르고 탭 전환/새 대화가 즉시 덮어써졌습니다.

수정: ChatSessionStateService는 세션 스냅샷이 실제로 바뀐 경우에만 저장하도록 변경했고, 동일 상태 반복 저장 시 Save와 SettingsChanged가 재발화하지 않도록 테스트를 추가했습니다.

검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify_streaming_tab_loop_fix\ -p:IntermediateOutputPath=obj\verify_streaming_tab_loop_fix\ (경고 0 / 오류 0), dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter ChatSessionStateServiceTests|ChatStreamingUiPolicyTests|AxAgentExecutionEngineTests -p:OutputPath=bin\verify_streaming_tab_loop_fix_tests\ -p:IntermediateOutputPath=obj\verify_streaming_tab_loop_fix_tests\ (통과 51)
This commit is contained in:
2026-04-15 20:00:54 +09:00
parent f3717cda21
commit 22261579d0
4 changed files with 124 additions and 3 deletions

View File

@@ -1523,3 +1523,9 @@ UI ?遺우쁽????域뱀뮆???귐뗫솯?醫딆춦 ???袁る퓮 ?臾믩씜 ??疫
- `src/AxCopilot.Tests/Services/SkillServiceRuntimePolicyTests.cs``BuildProactiveSkillSystemPromptAsync_ReturnsNull_WhenNothingMeaningfullyMatches`, `BuildProactiveSkillSystemPromptAsync_DoesNotInjectHardRuntimePolicy`를 추가했습니다.
- 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_auto_skill_runtime_fix\\ -p:IntermediateOutputPath=obj\\verify_auto_skill_runtime_fix\\` 경고 0 / 오류 0
- 검증: `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "SkillServiceRuntimePolicyTests|FullyQualifiedName~RunAsync_EmptyWorkspace_BlocksExternalFallbackAndRecoversToFileWrite|FullyQualifiedName~RunAsync_EmptyWorkspace_DisallowsSkillManagerAndRecoversToFileWrite" -p:OutputPath=bin\\verify_auto_skill_runtime_fix_tests\\ -p:IntermediateOutputPath=obj\\verify_auto_skill_runtime_fix_tests\\` 통과 15
업데이트: 2026-04-15 19:59 (KST)
- AX Agent 스트리밍 중 탭 전환, 새 대화, 경과 시간 갱신이 멈춘 것처럼 보이던 회귀를 수정했습니다. 원인은 `src/AxCopilot/Services/ChatSessionStateService.cs`가 같은 `LastActiveTab`, `LastConversationIds` 상태에서도 매번 `settings.Save()`를 호출해 `SettingsChanged -> RefreshFromSavedSettings -> UpdateTabUI -> SwitchToTabConversation -> SaveLastConversations` 순환이 계속 발생하던 흐름이었습니다.
- `ChatSessionStateService.Save(...)`는 이제 세션 스냅샷이 실제로 바뀐 경우에만 저장을 수행합니다. 스트리밍 렌더 중 같은 대화를 다시 보여줘도 설정 저장과 UI 재진입이 재발화하지 않도록 막았습니다.
- `src/AxCopilot.Tests/Services/ChatSessionStateServiceTests.cs``Save_DoesNotPersistOrRaiseEvents_WhenSessionStateIsUnchanged`, `Save_PersistsAndRaisesEvents_WhenSessionStateChanges`를 추가해 반복 저장 루프 회귀를 고정했습니다.
- 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_streaming_tab_loop_fix\\ -p:IntermediateOutputPath=obj\\verify_streaming_tab_loop_fix\\` 경고 0 / 오류 0
- 검증: `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "ChatSessionStateServiceTests|ChatStreamingUiPolicyTests|AxAgentExecutionEngineTests" -p:OutputPath=bin\\verify_streaming_tab_loop_fix_tests\\ -p:IntermediateOutputPath=obj\\verify_streaming_tab_loop_fix_tests\\` 통과 51