Skip to content

Conversation

@sum130
Copy link
Contributor

@sum130 sum130 commented Jan 21, 2026

πŸ”— μ—°κ²°λœ 이슈

πŸ“„ μž‘μ—… λ‚΄μš©

  • 1μ°¨ QA

πŸ‘€ 기타 더 이야기해볼 점

image

@sum130 sum130 requested a review from a team January 21, 2026 20:58
@sum130 sum130 self-assigned this Jan 21, 2026
@sum130 sum130 requested review from soseoyo12, wotjs020708 and y-eonee and removed request for a team January 21, 2026 20:58
@sum130 sum130 added 수민🐢 Fix 버그 μˆ˜μ • labels Jan 21, 2026
@sum130 sum130 linked an issue Jan 21, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Caution

Review failed

The pull request is closed.

πŸ“ Walkthrough

Walkthrough

μ±Œλ¦°μ§€ κ΄€λ ¨ 뷰의 λ ˆμ΄μ•„μ›ƒΒ·νƒ€μ΄ν¬κ·Έλž˜ν”Ό μ‘°μ •, ChallengeProgressViewModel에 μ™„λ£Œ νŒμ • 속성(isChallengeCompleted) μΆ”κ°€ 및 μ™„λ£Œ μ‹œ Coordinator둜 쑰건뢀 λ„€λΉ„κ²Œμ΄μ…˜ 둜직 μΆ”κ°€, λ‹€μˆ˜ 이미지 μžμ‚°μ„ SVGμ—μ„œ PNG(1x/2x/3x)둜 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ν•¨.

Changes

Cohort / File(s) λ³€κ²½ 사항
ViewModel 둜직 λ³€κ²½
\Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ViewModel/ChallengeProgressViewModel.swift``
challengeTitle 기본값을 "μ±Œλ¦°μ§€"μ—μ„œ ""둜 λ³€κ²½; isChallengeCompleted 계산 속성 μΆ”κ°€ (currentDay == 7); updateInfo()μ—μ„œ challengeTitle = challengeData.title + " μ±Œλ¦°μ§€"둜 λ³€κ²½
Progress View / λ„€λΉ„κ²Œμ΄μ…˜
\.../ChallengeProgressView.swift``
@EnvironmentObject private var challengeCoordinator: ChallengeCoordinator μΆ”κ°€; λ ˆμ΄μ•„μ›ƒ ν”„λ ˆμž„/νŒ¨λ”© μ‘°μ •; λ²„νŠΌ 타이틀을 isChallengeCompleted에 따라 λ³€κ²½ν•˜κ³ , μ™„λ£Œ μ‹œ challengeCoordinator.push(.startChallenge) ν˜ΈμΆœν•˜λ„λ‘ μ•‘μ…˜ λΆ„κΈ° μΆ”κ°€
λ‘œλ”©/선택/μ‹œμž‘ λ·° λ ˆμ΄μ•„μ›ƒΒ·νƒ€μ΄ν¬κ·Έλž˜ν”Ό
\.../ChallengeLoadingView.swift`, `.../ChallengeSelectMissionView.swift`, `.../ChallengeSelectRoutineView.swift`, `.../StartChallengeView.swift``
ν…μŠ€νŠΈ μŠ€νƒ€μΌΒ·ν”„λ ˆμž„(높이) 및 νŒ¨λ”©/μŠ€νŽ˜μ΄μ‹± μ‘°μ •, 일뢀 멀티라인 ν…μŠ€νŠΈ λ³‘ν•©Β·λΆ„ν• λ‘œ λ Œλ”λ§ λ³€κ²½
이미지 μžμ‚° λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ (ChallengeImage)
\Resources/Assets.xcassets/ChallengeImage//.imageset``
λ‹€μˆ˜ imagesetμ—μ„œ SVG ν•­λͺ©μ„ μ œκ±°ν•˜κ³  PNG λž˜μŠ€ν„° 1x/2x/3x ν•­λͺ©μœΌλ‘œ λŒ€μ²΄(예: challenge_gaugebar_*, cherry*.imageset λ“±); challenge_gaugebar_0.imageset/Contents.json μ‚­μ œ
μ•„μ΄μ½˜ μžμ‚° μ—…λ°μ΄νŠΈ (cherrishIcon)
\Resources/Assets.xcassets/cherrishIcon/checkbox_active.imageset/Contents.json`, `.../checkbox_default.imageset/Contents.json``
SVG 파일λͺ… μ°Έμ‘°λ₯Ό PNG 파일λͺ…μœΌλ‘œ λ³€κ²½ (checkbox_active.svg β†’ icon_checkbox_active.png λ“±)

Sequence Diagram(s)

sequenceDiagram
    participant View as ChallengeProgressView
    participant VM as ChallengeProgressViewModel
    participant Coord as ChallengeCoordinator

    View->>VM: await viewModel.advanceDay()
    Note right of VM: currentDay 증가 및 μƒνƒœ μ—…λ°μ΄νŠΈ
    VM-->>View: Published μƒνƒœ λ³€κ²½
    alt VM.isChallengeCompleted == true
        View->>Coord: challengeCoordinator.push(.startChallenge)
    else
        Note right of View: μΆ”κ°€ λ„€λΉ„κ²Œμ΄μ…˜ μ—†μŒ
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • Fix/#149 1μ°¨ QAΒ #154: λ™μΌν•œ ViewModel 및 View νŒŒμΌμ„ μˆ˜μ • β€” challengeTitle/isChallengeCompleted 및 ProgressView λ„€λΉ„κ²Œμ΄μ…˜ λ³€κ²½κ³Ό 직접 관련됨.
  • Feat/#30 μ•„μ΄μ½˜νŒŒμΌ μˆ˜μ •Β #31: μ•„μ΄μ½˜/이미지 μžμ‚° μ°Έμ‘° λ³€κ²½(λ²‘ν„°β†”λž˜μŠ€ν„°) κ΄€λ ¨ β€” asset Contents.json λ³€κ²½κ³Ό 연관됨.
  • Hotfix/#134 λΉŒλ“œ μ—λŸ¬ ν•΄κ²°Β #137: ChallengeProgressViewModel κ΄€λ ¨ 변경을 포함 β€” λ·°λͺ¨λΈ 둜직·ꡬ쑰 λ³€κ²½κ³Ό 연관됨.

Suggested reviewers

  • y-eonee
  • soseoyo12
πŸš₯ Pre-merge checks | βœ… 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive PR 제λͺ©μ€ '1μ°¨ QA'λΌλŠ” μž‘μ—… λ‚΄μš©μ„ μ–ΈκΈ‰ν•˜μ§€λ§Œ, ꡬ체적인 λ³€κ²½ 사항(UI λ ˆμ΄μ•„μ›ƒ μ‘°μ •, 이미지 μžμ‚° ν˜•μ‹ λ³€κ²½ λ“±)을 λͺ…ν™•νžˆ μ„€λͺ…ν•˜μ§€ μ•Šμ•„ λ‹€μ†Œ λͺ¨ν˜Έν•©λ‹ˆλ‹€. PR 제λͺ©μ„ λ”μš± ꡬ체적으둜 μž‘μ„±ν•˜μ„Έμš”. 예: 'Fix: Challenge view layouts and update image assets for QA' λ˜λŠ” '1μ°¨ QA 반영: λ ˆμ΄μ•„μ›ƒ μ‘°μ • 및 이미지 μžμ‚° ν˜•μ‹ λ³€κ²½'.
βœ… Passed checks (3 passed)
Check name Status Explanation
Description check βœ… Passed PR μ„€λͺ…은 μ—°κ²°λœ 이슈 #149λ₯Ό λͺ…μ‹œν•˜κ³  '1μ°¨ QA' μž‘μ—… λ‚΄μš©μ„ μ–ΈκΈ‰ν•˜μ—¬ λ³€κ²½ 사항과 관련이 μžˆμŠ΅λ‹ˆλ‹€.
Linked Issues check βœ… Passed μ—°κ²°λœ 이슈 #149의 μ£Όμš” μš”κ΅¬ 사항인 '1μ°¨ QA' 적용이 μ™„λ£Œλ˜μ—ˆμœΌλ©°, μ½”λ“œ λ³€κ²½ 사항(UI λ ˆμ΄μ•„μ›ƒ μ‘°μ •, 이미지 μžμ‚° ν˜•μ‹ λ³€κ²½, μ±Œλ¦°μ§€ μ™„λ£Œ 둜직 μΆ”κ°€)이 QA ν”Όλ“œλ°±μ„ λ°˜μ˜ν•©λ‹ˆλ‹€.
Out of Scope Changes check βœ… Passed λͺ¨λ“  λ³€κ²½ 사항이 1μ°¨ QA 반영과 μ§μ ‘μ μœΌλ‘œ κ΄€λ ¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€(UI λ ˆμ΄μ•„μ›ƒ, 이미지 μžμ‚° ν˜•μ‹, μ±Œλ¦°μ§€ μ§„ν–‰ μƒνƒœ ν‘œμ‹œ 둜직).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#149-challenge7planlogic

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 2

πŸ€– Fix all issues with AI agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ViewModel/ChallengeProgressViewModel.swift`:
- Around line 97-99: The isChallengeCompleted property currently hardcodes the
7-day completion check; change it to use a configurable duration value (e.g., a
Challenge.duration / totalDays constant or a value from the Challenge
model/repository) instead of the literal 7. Update ChallengeProgressViewModel to
reference that configurable property (for example challengeDuration or
challenge.totalDays) when evaluating currentDay in isChallengeCompleted so
different challenge lengths are supported. Ensure the new source is injected or
accessible in the ViewModel constructor or via its existing challenge/currentDay
data so you don't introduce globals.

In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeProgressView.swift`:
- Around line 160-175: The completion branch calls
challengeCoordinator.push(.startChallenge) regardless of whether
viewModel.advanceDay() succeeded; modify the branch handling in the
CherrishButton action so you await and verify success before navigating: call
viewModel.advanceDay() and check its result (or catch errors if it throws) and
only call challengeCoordinator.push(.startChallenge) when advanceDay reports
success; update viewModel.advanceDay() to return a Bool or throw if it currently
doesn't so you can gate navigation in the completion path (symbols:
CherrishButton, viewModel.isChallengeCompleted, viewModel.advanceDay(),
challengeCoordinator.push(.startChallenge)).

Comment on lines +97 to +99
var isChallengeCompleted: Bool {
currentDay == 7
}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | πŸ”΅ Trivial

μ™„λ£Œ κΈ°μ€€(7일) ν•˜λ“œμ½”λ”© 확인 ν•„μš”.
μ±Œλ¦°μ§€ 기간이 κ³ μ • 7일이 μ•„λ‹ˆλΌλ©΄ 데이터/μƒμˆ˜λ‘œ 뢄리해 기쀀을 λ§žμΆ”λŠ” 편이 μ•ˆμ „ν•©λ‹ˆλ‹€.

πŸ€– Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ViewModel/ChallengeProgressViewModel.swift`
around lines 97 - 99, The isChallengeCompleted property currently hardcodes the
7-day completion check; change it to use a configurable duration value (e.g., a
Challenge.duration / totalDays constant or a value from the Challenge
model/repository) instead of the literal 7. Update ChallengeProgressViewModel to
reference that configurable property (for example challengeDuration or
challenge.totalDays) when evaluating currentDay in isChallengeCompleted so
different challenge lengths are supported. Ensure the new source is injected or
accessible in the ViewModel constructor or via its existing challenge/currentDay
data so you don't introduce globals.

Comment on lines 160 to +175
CherrishButton(
title: "였늘 λ―Έμ…˜ μ’…λ£Œν•˜κΈ°",
title: viewModel.isChallengeCompleted ? "μ±Œλ¦°μ§€ μ’…λ£Œν•˜κΈ°":"였늘 λ―Έμ…˜ μ’…λ£Œν•˜κΈ°",
type: .small,
state: .constant(buttonState),
leadingIcon: nil,
trailingIcon: nil
) {
Task {
await viewModel.advanceDay()
if viewModel.isChallengeCompleted {
Task {
await viewModel.advanceDay()
challengeCoordinator.push(.startChallenge)
}
}else {
Task {
await viewModel.advanceDay()
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

μ™„λ£Œ λΆ„κΈ°μ—μ„œ advanceDay μ‹€νŒ¨ μ‹œμ—λ„ λ„€λΉ„κ²Œμ΄μ…˜λ©λ‹ˆλ‹€.
advanceDay()κ°€ μ‹€νŒ¨ν•΄λ„ κ³§λ°”λ‘œ μƒˆ μ±Œλ¦°μ§€λ‘œ μ΄λ™ν•˜λ©΄ μ„œλ²„ μƒνƒœμ™€ UIκ°€ μ–΄κΈ‹λ‚  수 μžˆμŠ΅λ‹ˆλ‹€. 성곡 확인 ν›„ μ΄λ™ν•˜λ„λ‘ κ°€λ“œκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

βœ… μˆ˜μ • μ œμ•ˆ
-                if viewModel.isChallengeCompleted {
-                    Task {
-                        await viewModel.advanceDay()
-                        challengeCoordinator.push(.startChallenge)
-                    }
-                }else {
-                    Task {
-                        await viewModel.advanceDay()
-                    }
-                }
+                if viewModel.isChallengeCompleted {
+                    Task {
+                        await viewModel.advanceDay()
+                        guard viewModel.errorMessage == nil else { return }
+                        challengeCoordinator.push(.startChallenge)
+                    }
+                } else {
+                    Task {
+                        await viewModel.advanceDay()
+                    }
+                }
πŸ€– Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeProgressView.swift`
around lines 160 - 175, The completion branch calls
challengeCoordinator.push(.startChallenge) regardless of whether
viewModel.advanceDay() succeeded; modify the branch handling in the
CherrishButton action so you await and verify success before navigating: call
viewModel.advanceDay() and check its result (or catch errors if it throws) and
only call challengeCoordinator.push(.startChallenge) when advanceDay reports
success; update viewModel.advanceDay() to return a Bool or throw if it currently
doesn't so you can gate navigation in the completion path (symbols:
CherrishButton, viewModel.isChallengeCompleted, viewModel.advanceDay(),
challengeCoordinator.push(.startChallenge)).

@y-eonee y-eonee changed the title Feat/#149 1μ°¨ QA Fix/#149 1μ°¨ QA Jan 22, 2026
Copy link
Contributor

@y-eonee y-eonee left a comment

Choose a reason for hiding this comment

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

IMG_1164
μˆ˜κ³ ν•΄λ– μ—¬

Copy link
Contributor

@soseoyo12 soseoyo12 left a comment

Choose a reason for hiding this comment

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

와~!!!~ μˆ˜κ³ ν•˜μ…¨μˆ¨λ””μ•™

Copy link
Contributor

@wotjs020708 wotjs020708 left a comment

Choose a reason for hiding this comment

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

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€. 근데 폰트 λ§ˆλ‹€ 높이 μž‘μ•„μ£Όμ…”μ•Ό ν•˜λŠ” κ±° μ•„λ‹Œκ°€μš”?

@sum130 sum130 merged commit 0306683 into develop Jan 22, 2026
@sum130 sum130 deleted the feat/#149-challenge7planlogic branch January 22, 2026 09:20
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: 4

πŸ€– Fix all issues with AI agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeLoadingView.swift`:
- Around line 16-29: The fixed frame heights applied to TypographyText in
ChallengeLoadingView (the TypographyText(...) calls with .frame(height: ...))
prevent Dynamic Type resizing and can truncate text; remove the explicit
.frame(height:) on those TypographyText instances (or replace with a flexible
.frame(minHeight: ...) or no height constraint), add .lineLimit(nil) and
.fixedSize(horizontal: false, vertical: true) so lines can grow, and ensure the
TypographyText view itself uses a scalable font (applies .font with a
.scaledFont / .dynamicType support or .environment(\.sizeCategory) handling) so
the text responds to accessibility Dynamic Type changes.

In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeProgressView.swift`:
- Around line 51-53: The ChallengeProgressView currently declares
`@EnvironmentObject` private var challengeCoordinator: ChallengeCoordinator which
can crash if not injected and declares `@StateObject` var viewModel:
ChallengeProgressViewModel with non-private visibility; update the view to
ensure safe EnvironmentObject usage by either (1) asserting or providing a
fallback when ChallengeCoordinator is missing at creation sites (verify all
ChallengeProgressView initializers call
.environmentObject(ChallengeCoordinator()) or wrap uses in a parent that injects
it) or (2) change the property to `@EnvironmentObject` private var
challengeCoordinator: ChallengeCoordinator? and guard/handle the nil case to
avoid runtime crashes; also make viewModel private (change to `@StateObject`
private var viewModel) and adopt the init-injection pattern for
ChallengeProgressView by adding an init(_ viewModel: ChallengeProgressViewModel)
that assigns _viewModel = StateObject(wrappedValue: viewModel) to satisfy
SwiftLint and visibility expectations, and then update all call sites to pass
the viewModel and ensure .environmentObject(ChallengeCoordinator) is applied
where the view is created.

In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeSelectRoutineView.swift`:
- Around line 21-31: The two TypographyText views inside the VStack are forced
to a fixed height via .frame(height: 27.adjustedH) which can cause truncation
for longer translations or Dynamic Type; remove the fixed height or replace it
with a dynamic-friendly approach for the TypographyText components used here
(e.g., allow flexible height, remove .frame(height:), and if necessary add
modifiers like lineLimit(nil) / fixedSize(horizontal: false, vertical: true) or
use .multilineTextAlignment and a minHeight constraint) so the text can grow
with accessibility font sizes and long locales while keeping the existing VStack
and TypographyText usages intact.

In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/StartChallengeView.swift`:
- Around line 20-23: The two TypographyText instances (the one with "μ΄λ²ˆμ—” μ–΄λ–€ λ£¨ν‹΄μœΌλ‘œ
κ΄€λ¦¬ν• κΉŒμš”?" using .frame(height: 30.adjustedH) and the one with "루틴을 μ§€ν‚¬μˆ˜λ‘ 체리가 μ„±μž₯ν•΄μš”."
using .frame(height: 24.adjustedH)) use fixed heights that can truncate wrapped
or localized text; remove the fixed .frame(height: ...) or replace it with a
flexible layout approach and enable multiline by adding lineLimit(nil) and
allowing vertical expansion (e.g., fixedSize(horizontal: false, vertical: true)
or no explicit height constraint) so the text can grow for wrapping/localization
while keeping any intended spacing via surrounding containers or Spacer.
♻️ Duplicate comments (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeProgressView.swift (1)

169-183: μ™„λ£Œ λΆ„κΈ°μ—μ„œ advanceDay μ‹€νŒ¨ μ—¬λΆ€ 확인 없이 λ„€λΉ„κ²Œμ΄μ…˜λ¨

advanceDay()κ°€ μ‹€νŒ¨ν•΄λ„ μ’…λ£Œ ν™”λ©΄μœΌλ‘œ 이동할 수 μžˆμ–΄ μ„œλ²„ μƒνƒœμ™€ UIκ°€ μ–΄κΈ‹λ‚  수 μžˆμŠ΅λ‹ˆλ‹€. 성곡 확인 ν›„ μ΄λ™ν•˜λ„λ‘ κ°€λ“œκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

βœ… μˆ˜μ • μ œμ•ˆ
-                if viewModel.isChallengeCompleted {
-                    Task {
-                        await viewModel.advanceDay()
-                        challengeCoordinator.push(.startChallenge)
-                    }
-                }else {
-                    Task {
-                        await viewModel.advanceDay()
-                    }
-                }
+                if viewModel.isChallengeCompleted {
+                    Task {
+                        await viewModel.advanceDay()
+                        guard viewModel.errorMessage == nil else { return }
+                        challengeCoordinator.push(.startChallenge)
+                    }
+                } else {
+                    Task {
+                        await viewModel.advanceDay()
+                    }
+                }

Comment on lines 16 to 29
highlight(highlightText: viewModel.selectedRoutine?.description ?? "", normalText: "λ°©ν–₯을 λ°”νƒ•μœΌλ‘œ")
.padding(.top, 113.adjustedH)
.frame(height: 27.adjustedH)
.padding(.top, 94.adjustedH)
TypographyText("TO-DO λ―Έμ…˜μ„ λ§Œλ“€κ³  μžˆμ–΄μš”.", style: .title1_sb_18, color: .gray800)

LottieView(animationName: "splash", loopMode: .loop)
.frame(width: 130.adjustedW, height: 154.adjustedH)
.padding(.top, 60.adjustedH)

Spacer()
.frame(height: 80.adjustedH)

TypographyText("μž μ‹œλ§Œ κΈ°λ‹€λ €μ£Όμ„Έμš”!", style: .title2_sb_16, color: .gray800)
.frame(height: 27.adjustedH)
Image(.loading)
.frame(height: 364.adjustedH)
.padding(.top, 17.adjustedH)
TypographyText("μž μ‹œλ§Œ κΈ°λ‹€λ €μ£Όμ„Έμš”!", style: .title2_m_16, color: .gray800)
.frame(height: 24.adjustedH)
.padding(.top, 17.adjustedH)

Spacer()

TypographyText("AIκ°€ λ§žμΆ€ν˜• 루틴을 μ œμž‘ν•˜κ³  μžˆμ–΄μš”.", style: .body3_m_12, color: .gray600)
.frame(height: 17.adjustedH)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

# ChallengeLoadingView.swift 파일 μœ„μΉ˜ 및 크기 확인
find . -name "ChallengeLoadingView.swift" -type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 196


🏁 Script executed:

# 파일 λ‚΄μš© 확인 (전체 ꡬ쑰 νŒŒμ•…)
cat -n Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeLoadingView.swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1841


🏁 Script executed:

# adjustedHκ°€ 무엇인지 확인 (μ»€μŠ€ν…€ modifier λ˜λŠ” extension 검색)
rg "adjustedH" --type swift -B 2 -A 2

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 50383


🏁 Script executed:

# TypographyText κ΅¬ν˜„ 확인
find . -name "*.swift" -type f -exec grep -l "struct TypographyText" {} \;

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 139


🏁 Script executed:

# λ‹€λ₯Έ λ·°μ—μ„œ 동적 νƒ€μž… 처리 방식 확인 (lineLimit, minimumScaleFactor λ“±)
rg "lineLimit|minimumScaleFactor|\.font\(" --type swift | head -30

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 585


🏁 Script executed:

# TypographyText κ΅¬ν˜„ μ°ΎκΈ°
find . -name "*.swift" -type f | xargs grep -l "struct TypographyText\|typealias TypographyText"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 139


🏁 Script executed:

# TypographyText의 전체 κ΅¬ν˜„ 확인
rg "struct TypographyText" -A 20 --type swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1678


🏁 Script executed:

# Font+.swift 파일 λ‚΄μš© 확인
cat -n ./Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 3963


🏁 Script executed:

# Adjust+.swift 전체 λ‚΄μš© 확인
cat -n Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Adjust+.swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1218


TypographyText 동적 νƒ€μž… λŒ€μ‘ κ²€ν†  ν•„μš”

adjustedHλŠ” 기기별 λΉ„λ‘€ μŠ€μΌ€μΌλ§μ΄λ―€λ‘œ SE/Pro Max κ°„ 높이 μ°¨μ΄λŠ” μžλ™ μ‘°μ •λ©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ TypographyText의 λͺ…μ‹œμ  frame(height:)은 동적 νƒ€μž… 크기 변화에 λŒ€μ‘ν•˜μ§€ μ•Šμ•„, μ ‘κ·Όμ„± μ„€μ •(Dynamic Type XL 이상)μ—μ„œ ν…μŠ€νŠΈ μ ˆλ‹¨ κ°€λŠ₯성이 μžˆμŠ΅λ‹ˆλ‹€. 동적 νƒ€μž… ν™˜κ²½μ—μ„œ ν…ŒμŠ€νŠΈν•˜κ³  ν•„μš”μ‹œ lineLimit λ˜λŠ” μ΅œμ†Œ 높이 쑰정을 κ³ λ €ν•˜μ„Έμš”.

πŸ€– Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeLoadingView.swift`
around lines 16 - 29, The fixed frame heights applied to TypographyText in
ChallengeLoadingView (the TypographyText(...) calls with .frame(height: ...))
prevent Dynamic Type resizing and can truncate text; remove the explicit
.frame(height:) on those TypographyText instances (or replace with a flexible
.frame(minHeight: ...) or no height constraint), add .lineLimit(nil) and
.fixedSize(horizontal: false, vertical: true) so lines can grow, and ensure the
TypographyText view itself uses a scalable font (applies .font with a
.scaledFont / .dynamicType support or .environment(\.sizeCategory) handling) so
the text responds to accessibility Dynamic Type changes.

Comment on lines +51 to 53
@EnvironmentObject private var challengeCoordinator: ChallengeCoordinator
@StateObject var viewModel: ChallengeProgressViewModel

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | πŸ”΅ Trivial

EnvironmentObject μ£Όμž… 보μž₯ 및 @StateObject κ°€μ‹œμ„± 정리 ν•„μš”

μƒˆλ‘œ μΆ”κ°€λœ EnvironmentObjectκ°€ μƒμœ„μ—μ„œ μ£Όμž…λ˜μ§€ μ•ŠμœΌλ©΄ λŸ°νƒ€μž„ ν¬λž˜μ‹œκ°€ λ‚©λ‹ˆλ‹€. 생성 μœ„μΉ˜μ—μ„œ μ£Όμž… μ—¬λΆ€λ₯Ό 확인해 μ£Όμ„Έμš”. λ˜ν•œ @StateObjectλŠ” 보톡 private둜 두고 initμ—μ„œ μ£Όμž…ν•˜λŠ” νŒ¨ν„΄μ΄ ꢌμž₯λ©λ‹ˆλ‹€(SwiftLint κ²½κ³ ).

♻️ `@StateObject` μ ‘κ·Όμ„± 정리 μ œμ•ˆ
-    `@StateObject` var viewModel: ChallengeProgressViewModel
+    `@StateObject` private var viewModel: ChallengeProgressViewModel
+
+    init(viewModel: ChallengeProgressViewModel) {
+        _viewModel = StateObject(wrappedValue: viewModel)
+    }
#!/bin/bash
# ChallengeProgressView 생성 μœ„μΉ˜μ™€ EnvironmentObject μ£Όμž… μ—¬λΆ€ 확인
rg -n --type=swift -C3 '\bChallengeProgressView\b'
rg -n --type=swift -C3 '\.environmentObject\([^)]*ChallengeCoordinator'
🧰 Tools
πŸͺ› SwiftLint (0.57.0)

[Warning] 52-52: SwiftUI state properties should be private

(private_swiftui_state)

πŸ€– Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeProgressView.swift`
around lines 51 - 53, The ChallengeProgressView currently declares
`@EnvironmentObject` private var challengeCoordinator: ChallengeCoordinator which
can crash if not injected and declares `@StateObject` var viewModel:
ChallengeProgressViewModel with non-private visibility; update the view to
ensure safe EnvironmentObject usage by either (1) asserting or providing a
fallback when ChallengeCoordinator is missing at creation sites (verify all
ChallengeProgressView initializers call
.environmentObject(ChallengeCoordinator()) or wrap uses in a parent that injects
it) or (2) change the property to `@EnvironmentObject` private var
challengeCoordinator: ChallengeCoordinator? and guard/handle the nil case to
avoid runtime crashes; also make viewModel private (change to `@StateObject`
private var viewModel) and adopt the init-injection pattern for
ChallengeProgressView by adding an init(_ viewModel: ChallengeProgressViewModel)
that assigns _viewModel = StateObject(wrappedValue: viewModel) to satisfy
SwiftLint and visibility expectations, and then update all call sites to pass
the viewModel and ensure .environmentObject(ChallengeCoordinator) is applied
where the view is created.

Comment on lines +21 to +31
VStack(alignment: .leading, spacing: 0){
TypographyText("μ§€κΈˆ λ‚˜μ—κ²Œ κ°€μž₯ ν•„μš”ν•œ",
style: .title1_sb_18,
color: .gray1000
)
.frame(height: 27.adjustedH)
TypographyText("관리 루틴을 μ„ νƒν•΄μ£Όμ„Έμš”.",
style: .title1_sb_18,
color: .gray1000
)
.frame(height: 27.adjustedH)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

# 파일 ꡬ쑰 탐색
find . -type f -name "*.swift" | grep -i typography | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 196


🏁 Script executed:

# ChallengeSelectRoutineView.swift 전체 λ‚΄μš© 확인
find . -path "*ChallengeSelectRoutineView.swift" -type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 196


🏁 Script executed:

# TypographyText μ •μ˜ μ°ΎκΈ°
rg "struct TypographyText|class TypographyText" -A 10

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1081


🏁 Script executed:

# adjustedH μ •μ˜ μ°ΎκΈ°
rg "adjustedH" -B 2 -A 2

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 50383


🏁 Script executed:

# adjustedH ν™•μž₯ ν•¨μˆ˜ μ •μ˜ μ°ΎκΈ°
rg "adjustedH" -B 5 -A 2 | grep -A 7 "func adjustedH\|extension.*adjustedH\|var adjustedH"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2224


🏁 Script executed:

# TypographyText 전체 κ΅¬ν˜„ 확인
cat -n Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift | head -100

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 3963


🏁 Script executed:

# λ‹€μ΄λ‚˜λ―Ή νƒ€μž… 지원 μ—¬λΆ€ 확인
rg "dynamicTypeSize|preferredContentSizeCategory|@Environment.*dynamicTypeSize" -A 3

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


κ³ μ • λ†’μ΄λ‘œ 닀쀑 μ–Έμ–΄ ν™•λŒ€ 및 λ‹€μ΄λ‚˜λ―Ή νƒ€μž…μ—μ„œ ν…μŠ€νŠΈ 잘림 μœ„ν—˜

.frame(height: 27.adjustedH)λŠ” ν™”λ©΄ λΉ„μœ¨λ§Œ μ‘°μ •ν•˜κ³  λ‹€μ΄λ‚˜λ―Ή νƒ€μž…(μ‹œμŠ€ν…œ 폰트 μ„€μ •)을 κ³ λ €ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. κΈ΄ λ²ˆμ—­μ΄ ν•„μš”ν•œ λ‘œμΌ€μΌμ΄λ‚˜ μ‚¬μš©μžκ°€ ν…μŠ€νŠΈ 크기λ₯Ό ν™•λŒ€ν–ˆμ„ λ•Œ 두 쀄이 μ§€μ •λœ 높이λ₯Ό μ΄ˆκ³Όν•˜μ—¬ 잘릴 수 μžˆμŠ΅λ‹ˆλ‹€.

πŸ€– Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/ChallengeSelectRoutineView.swift`
around lines 21 - 31, The two TypographyText views inside the VStack are forced
to a fixed height via .frame(height: 27.adjustedH) which can cause truncation
for longer translations or Dynamic Type; remove the fixed height or replace it
with a dynamic-friendly approach for the TypographyText components used here
(e.g., allow flexible height, remove .frame(height:), and if necessary add
modifiers like lineLimit(nil) / fixedSize(horizontal: false, vertical: true) or
use .multilineTextAlignment and a minHeight constraint) so the text can grow
with accessibility font sizes and long locales while keeping the existing VStack
and TypographyText usages intact.

Comment on lines 20 to +23
TypographyText("μ΄λ²ˆμ—” μ–΄λ–€ λ£¨ν‹΄μœΌλ‘œ κ΄€λ¦¬ν• κΉŒμš”?", style: .headline_sb_20, color: .gray1000)
.frame(height: 30.adjustedH)
TypographyText("루틴을 μ§€ν‚¬μˆ˜λ‘ 체리가 μ„±μž₯ν•΄μš”.", style: .title2_m_16, color: .gray800)
.frame(height: 24.adjustedH)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

fd "StartChallengeView.swift" --type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 160


🏁 Script executed:

find . -name "StartChallengeView.swift" -type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 162


🏁 Script executed:

git ls-files | grep -i "startchallenge"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 121


🏁 Script executed:

wc -l "Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/StartChallengeView.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 163


🏁 Script executed:

cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/StartChallengeView.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2345


🏁 Script executed:

rg "\.adjustedH" --type swift | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2610


🏁 Script executed:

rg "extension.*Int\|extension.*CGFloat" --type swift -A 3 | grep -A 5 "adjustedH"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

fd "TypographyText" --type swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 242


🏁 Script executed:

rg "adjustedH" --type swift -B 2 -A 2 | grep -E "extension|computed|var" | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2215


🏁 Script executed:

find . -name "*TypographyText*" -o -name "*typography*" | grep -i swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

rg "struct TypographyText|class TypographyText" --type swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 167


🏁 Script executed:

cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Adjust+.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1218


🏁 Script executed:

cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 3963


κ³ μ • 높이가 ν…μŠ€νŠΈ λž˜ν•‘κ³Ό λ‘œμ»¬λΌμ΄μ œμ΄μ…˜ μ‹œ ν…μŠ€νŠΈ 잘림 μœ„ν—˜ κ°€λŠ₯

ν…μŠ€νŠΈμ— κ³ μ • heightλ₯Ό μ§€μ •ν•˜λ©΄ 닀쀑 라인 ν…μŠ€νŠΈλ‚˜ κΈ΄ μ–Έμ–΄ λ¬Έμžμ—΄(ν•œκ΅­μ–΄ λ“±)μ—μ„œ 높이 초과 μ‹œ 잘릴 수 μžˆμŠ΅λ‹ˆλ‹€. 특히 30.adjustedH(line 21)와 24.adjustedH(line 23, 38)λŠ” 단일 라인 κΈ°μ€€μœΌλ‘œ μ„€μ •λ˜μ—ˆμœΌλ‚˜, ν…μŠ€νŠΈκ°€ λž˜ν•‘λ  경우 μ½˜ν…μΈ λ₯Ό λ‹΄κΈ° λΆ€μ‘±ν•  수 μžˆμŠ΅λ‹ˆλ‹€. ν•„μš”μ‹œ lineLimit(nil) μΆ”κ°€λ‚˜ 동적 높이 쑰정을 κ²€ν† ν•΄ μ£Όμ„Έμš”.

πŸ€– Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/StartChallengeView.swift`
around lines 20 - 23, The two TypographyText instances (the one with "μ΄λ²ˆμ—” μ–΄λ–€
λ£¨ν‹΄μœΌλ‘œ κ΄€λ¦¬ν• κΉŒμš”?" using .frame(height: 30.adjustedH) and the one with "루틴을 μ§€ν‚¬μˆ˜λ‘ 체리가
μ„±μž₯ν•΄μš”." using .frame(height: 24.adjustedH)) use fixed heights that can truncate
wrapped or localized text; remove the fixed .frame(height: ...) or replace it
with a flexible layout approach and enable multiline by adding lineLimit(nil)
and allowing vertical expansion (e.g., fixedSize(horizontal: false, vertical:
true) or no explicit height constraint) so the text can grow for
wrapping/localization while keeping any intended spacing via surrounding
containers or Spacer.

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] 1차 QA 반영

5 participants