Skip to content

[#556] LoginVIew에서 signIn이 다 되기 전 LoadingView가 사라지는 현상을 해결한다#563

Merged
opficdev merged 6 commits into
developfrom
fix/#556-LoginView
Jun 9, 2026
Merged

[#556] LoginVIew에서 signIn이 다 되기 전 LoadingView가 사라지는 현상을 해결한다#563
opficdev merged 6 commits into
developfrom
fix/#556-LoginView

Conversation

@opficdev

@opficdev opficdev commented Jun 9, 2026

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

OAuth 인증 얼럿 / 시트가 표시되는 동안 LoginViewStore가 재생성되며 isLoading이 초기값으로 돌아가 LoadingView가 사라지는 문제 해결

📝 작업 내용

📌 요약

  • LoginViewLoginFeature store를 @State로 소유하도록 변경
  • alert 표시 상태를 TCA binding action으로 처리하도록 BindableAction / BindingReducer 적용
  • 로그인 성공 시 LoginFeature에서 로딩 상태를 끄지 않도록 성공 액션 제거
  • RootViewloginStore 보관과 DevLogAppsignInUseCase 전달 제거

🔍 상세

  • LoginView 생성 시 SignInUseCase를 받아 내부 Store를 구성해 OAuth sheet 표시 후 body 재평가에도 store lifetime 유지
  • showAlert 닫힘 처리는 $store.showAlert 바인딩과 case .binding(\.showAlert)에서 alert 상태 초기화
  • 로그인 실패와 취소에서만 isLoading = false 처리
  • RootView는 로그인 화면 표시 시 container.resolve(SignInUseCase.self)LoginView 생성 책임만 수행

📸 영상 / 이미지 (Optional)

2026-06-09.11.58.15.mov
2026-06-09.12.00.13.mov
개선 전 개선 후

@opficdev opficdev self-assigned this Jun 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the login flow by adopting TCA's BindableAction and BindingReducer in LoginFeature, and instantiating the store directly within LoginView instead of passing it from RootView. The review feedback highlights a compilation issue in existing tests due to the removal of the .setAlert action, and a performance concern regarding resolving SignInUseCase from the dependency container inside the SwiftUI body of RootView. It is recommended to update the tests and inject SignInUseCase via the initializer of RootView instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Application/DevLogPresentation/Sources/Login/LoginFeature.swift Outdated
Comment thread Application/DevLogPresentation/Sources/Root/RootView.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootView.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootView.swift
Comment thread Application/DevLogPresentation/Sources/Root/RootView.swift
Comment thread Application/DevLogApp/Sources/App/DevLogApp.swift
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

❌ iOS CI failed.

Tests failed

Failed schemes:

  • DevLogPresentation (ios-test-Persistence-Presentation)
cd /Users/runner/work/SwiftUI_DevLog/SwiftUI_DevLog/Application/DevLogPresentation
/Users/runner/work/SwiftUI_DevLog/SwiftUI_DevLog/Application/DevLogPresentation/Tests/Login/LoginFeatureTests.swift:201:23: error: type 'LoginFeature.Action' has no member 'setAlert'
feature.send(.setAlert(isPresented))
~^~~~~~~~
SwiftCompile normal arm64 /Users/runner/work/SwiftUI_DevLog/SwiftUI_DevLog/Application/DevLogPresentation/Tests/PushNotification/DeletePushNotificationTests.swift (in target 'DevLogPresentationTests' from project 'DevLogPresentation')
Failed frontend command:
/Applications/Xcode_26.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/runner/work/SwiftUI_DevLog/SwiftUI_DevLog/Application/DevLogPresentation/Tests/Login/LoginFeatureTests.swift -primary-file /Users/runner/work/SwiftUI_DevLog/Sw
SwiftCompile normal arm64 Compiling\ DeleteWebPageTests.swift /Users/runner/work/SwiftUI_DevLog/SwiftUI_DevLog/Application/DevLogPresentation/Tests/WebPage/DeleteWebPageTests.swift (in target 'DevLogPresentationTests' from project 'DevLogPresentation')
SwiftCompile normal arm64 /Users/runner/work/SwiftUI_DevLog/SwiftUI_DevLog/Application/DevLogPresentation/Tests/WebPage/DeleteWebPageTests.swift (in target 'DevLogPresentationTests' from project 'DevLogPresentation')

Check the uploaded test log artifacts for full diagnostics.

@opficdev opficdev added the qa TestFlight에 배포 label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

❌ iOS CI failed.

Tests failed

Failed schemes:

  • DevLogPresentation (ios-test-Persistence-Presentation)
✔ Test "로그인 버튼을 누르면 선택한 인증 제공자로 로그인 유스케이스가 호출된다" passed after 0.137 seconds.
◇ Test "로그인 요청 중에는 로딩 상태가 켜지고 요청이 끝나면 꺼진다" started.
✘ Test "로그인 요청 중에는 로딩 상태가 켜지고 요청이 끝나면 꺼진다" recorded an issue at LoginFeatureTests.swift:50:9: Expectation failed: !((driver → LoginTestDriver(feature: StoreOf<LoginFeature>)).isLoading → true → true)
✘ Test "로그인 요청 중에는 로딩 상태가 켜지고 요청이 끝나면 꺼진다" failed after 1.714 seconds with 1 issue.
◇ Test "로그인 실패 후에도 로딩 상태가 꺼진다" started.
✔ Test "로그인 실패 후에도 로딩 상태가 꺼진다" passed after 0.025 seconds.
◇ Test "이메일을 가져오지 못하면 이메일 없음 알림을 표시한다" started.
✔ Test "이메일을 가져오지 못하면 이메일 없음 알림을 표시한다" passed after 0.032 seconds.
◇ Test "일반 로그인 에러가 발생하면 공통 에러 알림을 표시한다" started.
✔ Test "일반 로그인 에러가 발생하면 공통 에러 알림을 표시한다" passed after 0.027 seconds.
◇ Test "소셜 로그인 취소 에러가 발생하면 알림을 표시하지 않는다" started.
✔ Test "소셜 로그인 취소 에러가 발생하면 알림을 표시하지 않는다" passed after 0.024 seconds.
◇ Test "알림을 닫으면 알림 상태와 문구가 초기화된다" started.
✔ Test "알림을 닫으면 알림 상태와 문구가 초기화된다" passed after 0.047 seconds.
✘ Suite LoginFeatureTests failed after 2.254 seconds with 1 issue.
✘ Test run with 11 tests in 3 suites failed after 2.873 seconds with 1 issue.
Test session results, code coverage, and logs:
/Users/runner/Library/Developer/Xcode/DerivedData/DevLog-adgqjxwsxodzfmbjfxdoyupnlfht/Logs/Test/Test-DevLogPresentation-2026.06.09_03-17-53-+0000.xcresult
Testing started

Check the uploaded test log artifacts for full diagnostics.

@opficdev opficdev merged commit 9734b65 into develop Jun 9, 2026
5 checks passed
@opficdev opficdev deleted the fix/#556-LoginView branch June 9, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa TestFlight에 배포

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LoginView에서 signIn이 다 되기 전 LoadingView가 사라지는 현상을 해결한다

1 participant