Skip to content

Conversation

@youz2me
Copy link
Member

@youz2me youz2me commented May 30, 2025

👻 PULL REQUEST

📄 작업 내용

  • 최종 QA 내용을 반영했어요.

💻 주요 코드 설명

앱 진입 시 회원가입 여부 판별 로직 추가

func proceedToAppLaunch() {
        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2.0) { [weak self] in
            guard let self = self,
            let session = userSessionRepository.fetchActiveUserSession(),
            let isAutoLoginEnabled = session.isAutoLoginEnabled
            else {
                return
            }
            
            (session.nickname != "" && isAutoLoginEnabled) ? configureMainScreen() : configureLoginScreen()
        }
    }
  • 앱 진입 시 자동 로그인 여부 판단과 함께 닉네임이 없을 경우(=정상적으로 활동이 불가능할 경우) 메인 화면으로 접근할 수 없도록 처리했습니다.
  • 사용자는 무조건 로그인 화면으로 진입해 로그인을 시도하고, 로그인 시도 시 무조건 온보딩 로직을 재수행하도록 처리했습니다.
  • 혹시라도 더 발생할 예외 케이스가 있다면 말씀해주세요!

👀 기타 더 이야기해볼 점

  • 제 것까지 머지하고 바로 업데이트 심사 올리면 될 것 같습니닷.

🔗 연결된 이슈

Summary by CodeRabbit

  • New Features

    • The bottom tab bar is now hidden when composing a new post, providing a more focused writing experience.
    • The post content input area enforces a minimum height for improved usability.
  • Bug Fixes

    • Tapping the comment button no longer accidentally dismisses the keyboard.
    • Prevented multiple taps on the comment button while a comment is being posted.
  • Improvements

    • Enhanced feedback and smoother UI updates after posting a comment.
    • Streamlined app launch and auto-login handling for a faster startup experience.

@youz2me youz2me requested a review from JinUng41 May 30, 2025 19:12
@youz2me youz2me self-assigned this May 30, 2025
@youz2me youz2me added 🛠️ fix 기능적 버그나 오류 해결 시 사용 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌 labels May 30, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 30, 2025

"""

Walkthrough

The changes update auto-login logic in the app launch flow to be synchronous, refine keyboard dismissal and comment posting UX in the home detail view, enforce minimum height and hide the tab bar in the write post view, and adjust the logic for checking empty nicknames in the login view controller.

Changes

File(s) Change Summary
Wable-iOS/App/SceneDelegate.swift Simplified proceedToAppLaunch() by making auto-login check synchronous and removing Combine publisher/error handling.
Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift Improved keyboard dismissal logic, prevented multiple comment submissions, and adjusted toast/scroll/reset order after posting.
Wable-iOS/Presentation/Home/View/WritePostViewController.swift Set hidesBottomBarWhenPushed to true and added a minimum height constraint to the content text view.
Wable-iOS/Presentation/Login/LoginViewController.swift Changed nickname emptiness check from .isEmpty to explicit == "" comparison.

Sequence Diagram(s)

sequenceDiagram
    participant SceneDelegate
    participant UserSessionRepository
    participant MainScreen
    participant LoginScreen

    SceneDelegate->>UserSessionRepository: Fetch active session
    alt Session exists and auto-login enabled and nickname not empty
        SceneDelegate->>MainScreen: Configure main screen
    else
        SceneDelegate->>LoginScreen: Configure login screen
    end
Loading
sequenceDiagram
    participant HomeDetailVC
    participant User
    participant Toast
    participant CollectionView

    User->>HomeDetailVC: Tap createCommentButton
    HomeDetailVC->>HomeDetailVC: Disable button interaction
    HomeDetailVC->>HomeDetailVC: Post comment
    alt Success
        HomeDetailVC->>Toast: Show success toast
        HomeDetailVC->>CollectionView: Scroll to top
        HomeDetailVC->>HomeDetailVC: Clear text view, update placeholder, enable button
    else
        HomeDetailVC->>HomeDetailVC: Enable button
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Apply final QA feedback fixes (#213)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Suggested reviewers

  • youz2me

Poem

A hop and a skip, the login’s now swift,
The keyboard won’t vanish when comments you lift.
The post view grows tall, the tab bar takes flight,
With tweaks from the warren, all feels just right.
QA bunnies rejoice—
The app’s future is bright! 🐇✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f59d320 and a230c7e.

📒 Files selected for processing (1)
  • Wable-iOS/App/SceneDelegate.swift (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Wable-iOS/App/SceneDelegate.swift
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6d5dca and f59d320.

📒 Files selected for processing (4)
  • Wable-iOS/App/SceneDelegate.swift (1 hunks)
  • Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift (4 hunks)
  • Wable-iOS/Presentation/Home/View/WritePostViewController.swift (2 hunks)
  • Wable-iOS/Presentation/Login/LoginViewController.swift (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
Wable-iOS/App/SceneDelegate.swift (1)
Wable-iOS/Data/RepositoryImpl/UserSessionRepositoryImpl.swift (1)
  • fetchActiveUserSession (39-44)
🪛 SwiftLint (0.57.0)
Wable-iOS/App/SceneDelegate.swift

[Warning] 128-128: Using ternary to call Void functions should be avoided

(void_function_in_ternary)

🔇 Additional comments (8)
Wable-iOS/App/SceneDelegate.swift (1)

121-126: LGTM! Good defensive programming with early return pattern.

The synchronous approach using fetchActiveUserSession() simplifies the logic compared to the previous asynchronous Combine chain. The guard statement with early return properly handles cases where session or auto-login flag is unavailable.

Wable-iOS/Presentation/Login/LoginViewController.swift (1)

157-157: LGTM! Consistent empty string checking.

The explicit comparison == "" aligns with the similar change in SceneDelegate.swift (line 128), ensuring consistent nickname validation across the app launch and login flows.

Wable-iOS/Presentation/Home/View/WritePostViewController.swift (2)

87-87: LGTM! Proper navigation behavior.

Setting hidesBottomBarWhenPushed = true ensures the tab bar is hidden when this view controller is pushed, providing a cleaner focused writing experience.


142-144: LGTM! Ensures adequate text input space.

The minimum height constraint of 300 points provides sufficient space for content input, improving the writing experience by preventing the text view from being too small.

Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift (4)

197-197: LGTM! Proper gesture handling setup.

Adding the tap gesture delegate enables fine-grained control over gesture recognition, which is used in the UIGestureRecognizerDelegate implementation to prevent keyboard dismissal when tapping the comment button.


754-760: LGTM! Smart gesture filtering.

The delegate implementation correctly prevents the tap gesture from dismissing the keyboard when the user taps the createCommentButton, improving the commenting UX by avoiding unintended keyboard dismissals.


582-582: LGTM! Prevents multiple submissions.

Disabling user interaction immediately when the comment button is tapped prevents multiple rapid submissions while the comment is being processed, which is a good UX practice.


681-684: LGTM! Improved operation sequencing.

The reordering of operations (showing toast and scrolling before resetting the text view) provides better visual feedback to the user. Re-enabling button interaction and updating placeholder state after successful posting ensures proper UI state management.

Also applies to: 691-692

isAutologinEnabled ? owner.configureMainScreen() : owner.configureLoginScreen()
}
.store(in: cancelBag)
(session.nickname != "" && isAutoLoginEnabled) ? configureMainScreen() : configureLoginScreen()
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix the ternary operator usage with void functions.

SwiftLint correctly flags this pattern as it can reduce readability when calling void functions.

Apply this diff to improve readability:

-(session.nickname != "" && isAutoLoginEnabled) ? configureMainScreen() : configureLoginScreen()
+if session.nickname != "" && isAutoLoginEnabled {
+    configureMainScreen()
+} else {
+    configureLoginScreen()
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(session.nickname != "" && isAutoLoginEnabled) ? configureMainScreen() : configureLoginScreen()
if session.nickname != "" && isAutoLoginEnabled {
configureMainScreen()
} else {
configureLoginScreen()
}
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 128-128: Using ternary to call Void functions should be avoided

(void_function_in_ternary)

🤖 Prompt for AI Agents
In Wable-iOS/App/SceneDelegate.swift at line 128, the ternary operator is used
to call void functions, which reduces readability and is flagged by SwiftLint.
Replace the ternary operator with a clear if-else statement that calls
configureMainScreen() if session.nickname is not empty and isAutoLoginEnabled is
true; otherwise, call configureLoginScreen(). This improves code clarity and
adheres to SwiftLint guidelines.

Copy link
Collaborator

@JinUng41 JinUng41 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~ 👍👍🏻👍🏼👍🏽👍🏾👍🏿

Comment on lines 679 to 680
.sink { owner, isSucceed in
if isSucceed {
Copy link
Collaborator

Choose a reason for hiding this comment

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

filter를 사용해도 좋을 것 같습니다.

@github-project-automation github-project-automation bot moved this to In Review in Wable-iOS May 30, 2025
@JinUng41 JinUng41 merged commit 888f2eb into develop May 31, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Wable-iOS May 31, 2025
@JinUng41 JinUng41 deleted the fix/#213-qa branch May 31, 2025 02:26
youz2me pushed a commit that referenced this pull request Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ fix 기능적 버그나 오류 해결 시 사용 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 최종 QA 반영

3 participants