Skip to content

Conversation

@JinUng41
Copy link
Collaborator

@JinUng41 JinUng41 commented Jul 3, 2025

👻 PULL REQUEST

📄 작업 내용

  • 강제 업데이트 관련 경고창이 뜨지 않는 문제를 해결합니다.
  • 와블 로거를 개선하였습니다.

💻 주요 코드 설명

📍 와블 로거 개선하기

  • 와블 로거를 사용하는 데에 있어 보다 간편하게 사용할 수 있도록 개선하였습니다.
  • 메서드의 인자를 Any로 변경하여, 어떠한 타입이든 동작이 가능하도록 하였습니다.
  • 타입 메서드 debug, network, error를 구현하여 사용 시 내용을 좀 더 간략하게 할 수 있도록 하였습니다.
개선된 와블 로거 사용 예시
func execute() async throws -> UpdateRequirement {
        let appStoreVersion = try await appVersionRepository.fetchAppStoreVersion()
        let currentVersion = appVersionRepository.fetchCurrentVersion()
        let isAlreadyShown = updateAlertPolicyRepository.hasSeenOptionalAlert()
        WableLogger.debug(appStoreVersion) // [🐞 Debug/CheckAppUpdateRequirementUseCase] 22 line in execute() ; AppVersion(major: 1, minor: 4, patch: 0)

👀 리뷰어에게 전달할 사항

  • 강제 업데이트와 관련해서 링크의 URL 파라미터가 country=kr인 것이 반영을 느리게 만들었습니다.

✅ 이번 PR에서 이런 부분을 중점적으로 체크해주세요!

잠깐 확인하고 갈까요?
  • 들여쓰기를 5번 이하로 준수했는지, 코드 가독성이 적절한지 확인해주세요.

  • 한 줄당 120자 제한을 준수했는지 확인해주세요.

  • MARK 주석이 정해진 순서와 형식에 맞게 작성되었는지 확인해주세요.

  • 반복되는 상수 값이 있는지, 있다면 Constant enum으로 분리되어 있는지 확인해주세요.

  • 삼항 연산자가 길어질 경우 적절히 개행되어 있는지 확인해주세요.

  • 조건문에서 중괄호가 올바르게 사용되었는지 확인해주세요.

  • 라이브러리 import가 퍼스트파티와 서드파티로 구분되고 알파벳순으로 정렬되었는지 확인해주세요.

  • 용량이 큰 리소스나 호출되지 않을 가능성이 있는 프로퍼티에 lazy var가 적절히 사용되었는지 확인해주세요.

  • 메모리 누수 방지를 위한 weak 참조가 필요한 곳에 적용되었는지 확인해주세요.

  • 도메인 로직과 UI 로직이 적절히 분리되어 있는지 확인해주세요.

🔗 연결된 이슈

Summary by CodeRabbit

  • 신규 기능

    • 네트워크, 디버그, 에러 로그를 위한 새로운 로깅 메서드가 추가되었습니다.
  • 버그 수정

    • iTunes 조회 URL에서 국가 지정 파라미터가 제거되어 보다 일반적인 조회가 가능해졌습니다.
  • 개선 사항

    • 로그 메시지 입력 시 문자열 외의 다양한 타입도 지원하도록 개선되었습니다.

JinUng41 added 2 commits July 3, 2025 08:57
- 보다 사용하기 간편한 형태로 메서드의 인자를 Any로 수정
@JinUng41 JinUng41 requested a review from youz2me July 3, 2025 00:12
@JinUng41 JinUng41 self-assigned this Jul 3, 2025
@JinUng41 JinUng41 added 🛠️ fix 기능적 버그나 오류 해결 시 사용 🍻 진웅 술 한잔 가온나~ labels Jul 3, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 3, 2025

Walkthrough

iTunes 조회 URL에서 국가 파라미터가 제거되었으며, 로깅 유틸리티에 Any 타입 메시지 지원과 함께 network, debug, error 전용 메서드가 추가되었습니다. 기존 로깅 메서드의 메시지 타입도 String에서 Any로 변경되었습니다.

Changes

파일/경로 변경 요약
Wable-iOS/Core/Literals/String/StringLiterals+URL.swift iTunes lookup URL에서 &country=kr 파라미터 제거
Wable-iOS/Core/Logger/WableLogger.swift log 메서드의 메시지 타입을 Any로 변경, network, debug, error 전용 메서드 추가

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant WableLogger

    Caller->>WableLogger: network(message)
    WableLogger->>WableLogger: log(message, .network, ...)
    Note right of WableLogger: 로그 출력

    Caller->>WableLogger: debug(message)
    WableLogger->>WableLogger: log(message, .debug, ...)
    Note right of WableLogger: 로그 출력

    Caller->>WableLogger: error(message)
    WableLogger->>WableLogger: log(message, .error, ...)
    Note right of WableLogger: 로그 출력
Loading

Assessment against linked issues

Objective Addressed Explanation
강제 업데이트 관련 경고창이 보여지지 않는 문제 해결 (#260) URL 변경이 강제 업데이트 경고창 노출 문제 해결과 직접적 연관이 명확하지 않음. 로거 변경은 관련 없음.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
로깅 메서드의 메시지 타입 변경 및 전용 메서드 추가 (Wable-iOS/Core/Logger/WableLogger.swift) 강제 업데이트 경고창 노출 문제(#260)와 직접적인 관련이 없는 로깅 기능 개선이 포함되어 있음.

📜 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 5892d95 and 45aea24.

📒 Files selected for processing (2)
  • Wable-iOS/Core/Literals/String/StringLiterals+URL.swift (1 hunks)
  • Wable-iOS/Core/Logger/WableLogger.swift (2 hunks)
🔇 Additional comments (5)
Wable-iOS/Core/Literals/String/StringLiterals+URL.swift (1)

19-19: 중복 파라미터 제거 승인!

iTunes 조회 URL에서 &country=kr 쿼리 파라미터를 제거한 것이 적절합니다. URL 경로에 이미 /kr/이 포함되어 있어 중복되며, PR 설명에 따르면 이 파라미터가 변경사항 반영 지연을 일으켰다고 하니 제거하는 것이 맞습니다.

Wable-iOS/Core/Logger/WableLogger.swift (4)

15-15: 로깅 유연성 향상 승인!

메시지 파라미터 타입을 String에서 Any로 변경한 것이 좋습니다. 이제 다양한 타입의 객체를 직접 로깅할 수 있어 사용성이 크게 향상됩니다.


27-34: 네트워크 로깅 편의 메서드 승인!

network 편의 메서드가 잘 구현되었습니다. 모든 기본 파라미터를 올바르게 전달하고 있으며, 호출 위치 정보도 정확히 보존됩니다.


36-43: 디버그 로깅 편의 메서드 승인!

debug 편의 메서드가 일관성 있게 구현되었습니다. 파라미터 전달과 메타데이터 보존이 적절합니다.


45-52: 에러 로깅 편의 메서드 승인!

error 편의 메서드가 다른 메서드들과 동일한 패턴으로 잘 구현되었습니다. 전체적으로 로깅 API의 사용성이 크게 개선되었습니다.

✨ 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 or `` 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
Member

@youz2me youz2me left a comment

Choose a reason for hiding this comment

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

굿!! 로거를 조금 더 간편하게 쓰기 위한 고민이 엿보이는 좋은 리팩토링이네요 ㅎㅎ 고생하셨습니다.
국가 설정이 업데이트 반영을 느리게 만드는 줄은 몰랐는데 😂 원인이 생각보다 간단하면서도 찾기 힘드셨을거라는 생각이 드네요. 고생하셨습니다 ~!


static func log(
_ message: String,
_ message: Any,
Copy link
Member

Choose a reason for hiding this comment

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

기존에는 무조건 String 타입으로 넣어야만 했는데 Any 타입으로 변경되어 사용성이 높아진 점 너무 좋습니다!

@JinUng41 JinUng41 merged commit 5725466 into develop Jul 3, 2025
1 check passed
@JinUng41 JinUng41 deleted the fix/#260-force-update branch July 3, 2025 08:21
youz2me pushed a commit that referenced this pull request Oct 26, 2025
[Fix] 강제 업데이트 오류 해결
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍻 진웅 술 한잔 가온나~ 🛠️ fix 기능적 버그나 오류 해결 시 사용

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 강제 업데이트 관련 오류 해결

3 participants