Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "challengeStartCherry.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import SwiftUI
enum ChallengeRoute: PresentationTypeProtocol {
case root
case startChallenge
case selectMission
case selectRoutine
case loading
case selectMission
}

final class ChallengeCoordinator: CoordinatorProtocol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ struct ChallengeCoordinatorView: View {
ViewFactory.shared.makeChallengeView()
case .startChallenge:
ViewFactory.shared.makeStartChallengeView()
case .selectMission:
ViewFactory.shared.makeSelectMissionView()
case .selectRoutine:
ViewFactory.shared.makeSelectRoutineView()
case .loading:
ViewFactory.shared.makeLoadingView()
case .selectMission:
ViewFactory.shared.makeSelectMissionView()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// SelectRoutineView.swift
// Cherrish-iOS
//
// Created by sumin Kong on 1/13/26.
//

import SwiftUI

struct SelectRoutineView: View {
@EnvironmentObject private var challengeCoordinator: ChallengeCoordinator

var body: some View {
ZStack {
Color.red600
Comment on lines +14 to +15
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for Color.red600 static property or red600 method definition

echo "=== Searching for red600 definition in the codebase ==="
rg -n "red600|red_600" --type swift -A 2 -B 2

echo -e "\n=== Checking Color extension definitions ==="
rg -n "extension Color" --type swift -A 5

echo -e "\n=== Searching specifically in Colors or Design token files ==="
fd -e swift | xargs grep -l -i "color\|design" | head -10

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 3725


🏁 Script executed:

#!/bin/bash
# Search for Color extension or red_600 color asset definition

echo "=== Searching for Color extension with red600 ==="
rg -n "extension Color" --type swift -A 10

echo -e "\n=== Searching for red_600 color name definition ==="
rg -n "red_600" --type swift -B 2 -A 2

echo -e "\n=== Check if Color struct has red600 property ==="
rg -n "Color.*red600|var red600" --type swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1141


Color.red600 컴파일 μ—λŸ¬ - μ •μ˜λ˜μ§€ μ•Šμ€ ν”„λ‘œνΌν‹°

Color.red600은 μ‘΄μž¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ •μ˜λœ 것은 View extension의 red600() λ©”μ„œλ“œλΏμž…λ‹ˆλ‹€.

μˆ˜μ • 방법:

  • Color("red_600") 직접 μ‚¬μš©, λ˜λŠ”
  • View에 modifier 적용: Text("SelectRoutine").red600()

이 λ¬Έμ œλŠ” SelectRoutineView.swift뿐만 μ•„λ‹ˆλΌ ChallengeView.swift, LoadingView.swift, SelectMissionView.swiftμ—μ„œλ„ λ°œμƒν•©λ‹ˆλ‹€.

πŸ€– Prompt for AI Agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift
around lines 14 - 15, Color.red600 is undefined; use the existing View extension
red600() or the asset initializer instead: replace direct references to the
non-existent Color.red600 with Color("red_600") where a Color is required (e.g.,
backgrounds) or apply the view modifier red600() to Views/Text (e.g., in
SelectRoutineView's ZStack and the other occurrences in ChallengeView,
LoadingView, SelectMissionView) so calls reference the defined red600()
extension or the asset name.


VStack {
Text("SelectRoutine")

Button("next") {
challengeCoordinator.push(.loading)
}
Comment on lines +18 to +22
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | πŸ”΅ Trivial

ν”Œλ ˆμ΄μŠ€ν™€λ” UI - ν–₯ν›„ κ΅¬ν˜„ μ˜ˆμ • 확인

ν˜„μž¬ λ·°κ°€ μž„μ‹œ ν”Œλ ˆμ΄μŠ€ν™€λ”λ‘œ λ³΄μž…λ‹ˆλ‹€. λ‹€μŒ 사항을 κ³ λ €ν•΄ μ£Όμ„Έμš”:

  1. "next" λ²„νŠΌ λ ˆμ΄λΈ”μ˜ λ‹€κ΅­μ–΄ 지원 (Localizable.strings μ‚¬μš©)
  2. μ‹€μ œ 루틴 선택 UI κ΅¬ν˜„ μ‹œ μ ‘κ·Όμ„±(accessibility) λ ˆμ΄λΈ” μΆ”κ°€
πŸ€– Prompt for AI Agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift
around lines 18 - 22, The placeholder view currently uses a hard-coded Button
label and lacks accessibility hooks; update SelectRoutineView to use a localized
string for the button (e.g., replace the literal "next" with a
LocalizedStringKey/NSLocalizedString lookup and add a corresponding "next" entry
in Localizable.strings) and, when implementing the real routine selection UI,
ensure each selectable element and the Button (which triggers
challengeCoordinator.push(.loading)) has appropriate
accessibilityLabel/accessibilityIdentifier values that reference localized
strings so VoiceOver and testing can use them.

}
}
Comment on lines +14 to +24
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find View+Color.swift and related color definitions
fd "Color|View" --type f --extension swift | grep -i "view\|color" | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 1716


🏁 Script executed:

#!/bin/bash
# Search for red600 definition and usage
rg "red600" --type swift -B 2 -A 5

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 4131


🏁 Script executed:

#!/bin/bash
# Search for SelectRoutineView.swift
fd "SelectRoutineView" --type swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 242


🏁 Script executed:

#!/bin/bash
# Search for Color extension definitions
rg "extension Color" --type swift -A 20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Search more broadly for red600 in Color context
rg "Color.*red600|red600.*Color" --type swift -B 3 -A 3

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2984


🏁 Script executed:

#!/bin/bash
# List all Swift files in Global/Extension directory
find Cherrish-iOS -name "*Color*" -type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 142


🏁 Script executed:

#!/bin/bash
# Read the entire View+Color.swift file
cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Color.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2838


🏁 Script executed:

#!/bin/bash
# Search for Color extension with static property definitions
rg "extension Color" --type swift -A 30

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Search for any static property on Color
rg "static.*Color|Color.*static" --type swift -B 2 -A 2

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Check if there are other extension files
find Cherrish-iOS -path "*/Extension/*.swift" -type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 357


🏁 Script executed:

#!/bin/bash
# Read Font+.swift to understand the pattern
cat "Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 3326


🏁 Script executed:

#!/bin/bash
# Search for all Swift files in the entire project for Color extension
find Cherrish-iOS -name "*.swift" -type f -exec grep -l "extension Color" {} \;

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Check if Color has any static properties or methods defined anywhere
rg "Color\." --type swift | grep -E "static|Color\.red|Color\.gray" | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 900


🏁 Script executed:

#!/bin/bash
# Search for where Color might be extended or defined
rg "Color\(" --type swift -B 3 | grep -E "extension|static|red|gray" | head -30

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 3463


🏁 Script executed:

#!/bin/bash
# Check all Swift files for any Color initialization patterns
rg "Color\(" -A 2 -B 2 | grep -E "red_|gray_|static" | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2359


🏁 Script executed:

#!/bin/bash
# Look for Color asset definitions
rg "red_600|red_500|red_700|red_300|gray_100" --type swift -B 2 -A 2

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 2694


🏁 Script executed:

#!/bin/bash
# Search all swift files for Color extension definition
find Cherrish-iOS -name "*.swift" -type f -exec grep -H "extension Color" {} \;

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Check if there's any Color+Color file or similar
find Cherrish-iOS -name "*Color*" -type f

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 142


🏁 Script executed:

#!/bin/bash
# Search for static properties on Color
rg "static.*red|static.*gray" --type swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 251


🏁 Script executed:

#!/bin/bash
# Verify SelectRoutineView.swift actually compiles with Color.red600
cat "Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift"

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 590


Color.red600 정적 ν”„λ‘œνΌν‹°κ°€ μ‘΄μž¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

Color.red600을 μ‚¬μš©ν•˜κ³  μžˆμœΌλ‚˜, 이 정적 ν”„λ‘œνΌν‹°λŠ” μ½”λ“œλ² μ΄μŠ€μ— μ •μ˜λ˜μ–΄ μžˆμ§€ μ•ŠμŠ΅λ‹ˆλ‹€. View+Color.swift의 red600()은 ν…μŠ€νŠΈ 색상 μŠ€νƒ€μΌμ„ μœ„ν•œ View μΈμŠ€ν„΄μŠ€ λ©”μ„œλ“œμΌ λΏμž…λ‹ˆλ‹€. λŒ€μ‹  ν”„λ‘œμ νŠΈμ˜ 색상 μ‹œμŠ€ν…œμ— 따라 Color("red_600")을 μ‚¬μš©ν•˜μ„Έμš”.

πŸ€– Prompt for AI Agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift
around lines 14 - 24, SelectRoutineView uses a nonexistent static Color.red600;
replace that with the project color initializer Color("red_600") (e.g., change
the ZStack background from Color.red600 to Color("red_600")), and do not call
the View+Color.swift red600() instance method here since it’s a text-style View
extension, not a Color provider; keep the rest of the view (including
SelectRoutineView and challengeCoordinator.push(.loading)) unchanged.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,37 @@ import SwiftUI
struct StartChallengeView: View {
@EnvironmentObject private var challengeCoordinator: ChallengeCoordinator

@State private var startButtonState: ButtonState = .active

Comment on lines +13 to +14
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | πŸ”΅ Trivial

startButtonStateκ°€ λ·° λ‚΄μ—μ„œ μˆ˜μ •λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

ν˜„μž¬ startButtonStateκ°€ .active둜 μ΄ˆκΈ°ν™”λœ ν›„ λ³€κ²½λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. CherrishButton이 바인딩을 ν•„μˆ˜λ‘œ μš”κ΅¬ν•˜λŠ” API라면 ν˜„μž¬ κ΅¬ν˜„μ΄ λ§žμ§€λ§Œ, λ§Œμ•½ μƒνƒœ 변경이 ν•„μš” μ—†λ‹€λ©΄ λΆˆν•„μš”ν•œ @State 선언일 수 μžˆμŠ΅λ‹ˆλ‹€.

var body: some View {
ZStack {
Color.red600
VStack {
Text("StartChallenge")
Button("next") {
challengeCoordinator.push(.selectMission)
VStack {
HStack {
VStack(alignment: .leading, spacing: 4) {
TypographyText("μ΄λ²ˆμ—” μ–΄λ–€ λ£¨ν‹΄μœΌλ‘œ κ΄€λ¦¬ν• κΉŒμš”?", style: .headline_sb_20, color: .gray1000)
TypographyText("루틴을 μ§€ν‚¬μˆ˜λ‘ 체리가 μ„±μž₯ν•΄μš”.", style: .title2_m_16, color: .gray800)
}
Spacer()
}
.padding(.top, 84.adjustedH)
.padding(.leading, 24.adjustedW)

Spacer()

Image(.challengeStartCherry)
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | πŸ”΅ Trivial

이미지 λ‘œλ”© 방식이 μΌκ΄€λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

Line 29μ—μ„œλŠ” νƒ€μž… μ„Έμ΄ν”„ν•œ Image(.challengeStartCherry) 방식을 μ‚¬μš©ν•˜κ³  μžˆμœΌλ‚˜, Line 34μ—μ„œλŠ” λ¬Έμžμ—΄ 기반 Image("info") 방식을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. ν”„λ‘œμ νŠΈ λ‚΄ 일관성을 μœ„ν•΄ λ™μΌν•œ νŒ¨ν„΄μ„ μ‚¬μš©ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

♻️ νƒ€μž… μ„Έμ΄ν”„ν•œ 이미지 λ‘œλ”©μœΌλ‘œ λ³€κ²½ μ œμ•ˆ
 HStack(spacing: 12) {
-    Image("info")
+    Image(.info)
     TypographyText("이 μ±Œλ¦°μ§€λŠ” μ„€μ • μ‹œμ λΆ€ν„° 7일간 μ§„ν–‰λ©λ‹ˆλ‹€.", style: .body3_m_12, color: .gray600)
 }

Asset catalog에 info 이미지가 ImageResource enum으둜 μ ‘κ·Ό κ°€λŠ₯ν•œμ§€ 확인해 μ£Όμ„Έμš”.

Also applies to: 33-36

πŸ€– Prompt for AI Agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift
at line 29, StartChallengeView uses a type-safe asset call
Image(.challengeStartCherry) but elsewhere (e.g., Image("info") around the same
block) uses a string literal; make them consistent by switching the string-based
Image("info") (and any other Image("...") in the 33-36 region) to the type-safe
enum form (e.g., Image(.info) or the project’s ImageResource.info) used for
.challengeStartCherry, and ensure the asset catalog exposes an enum case for
"info" before changing.


Spacer()

HStack(spacing: 12) {
Image("info")
TypographyText("이 μ±Œλ¦°μ§€λŠ” μ„€μ • μ‹œμ λΆ€ν„° 7일간 μ§„ν–‰λ©λ‹ˆλ‹€.", style: .body3_m_12, color: .gray600)
}
.padding(.bottom, 12.adjustedH)

CherrishButton(title: "μ±Œλ¦°μ§€ μ‹œμž‘ν•˜κΈ°", type: .next, state: $startButtonState) {
challengeCoordinator.push(.selectRoutine)
Comment on lines +39 to +40
Copy link
Contributor

Choose a reason for hiding this comment

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

μ’‹μ•„μš©

}
.padding(.horizontal, 24.adjustedW)
.padding(.bottom, 36.adjustedH)
}
}
}
5 changes: 5 additions & 0 deletions Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ protocol ViewFactoryProtocol {
func makeMyPageView() -> MyPageView
func makeSelectTreatmentView() -> SelectTreatmentView
func makeStartChallengeView() -> StartChallengeView
func makeSelectRoutineView() -> SelectRoutineView
func makeSelectMissionView() -> SelectMissionView
func makeLoadingView() -> LoadingView
}
Expand Down Expand Up @@ -61,6 +62,10 @@ final class ViewFactory: ViewFactoryProtocol {
return StartChallengeView()
}

func makeSelectRoutineView() -> SelectRoutineView {
return SelectRoutineView()
}

func makeSelectMissionView() -> SelectMissionView {
return SelectMissionView()
}
Expand Down