Conversation
📝 Walkthrough둘러보기Challenge 흐름에 새로운 SelectRoutineView 화면과 이를 위한 라우트(selectRoutine)를 도입하고 StartChallengeView의 네비게이션을 selectRoutine으로 변경했으며, ViewFactory에 makeSelectRoutineView()를 추가하고 관련 에셋 카탈로그 항목을 추가했습니다. 변경사항
시퀀스 다이어그램sequenceDiagram
participant User
participant StartChallengeView
participant ChallengeCoordinator
participant ChallengeCoordinatorView
participant ViewFactory
participant SelectRoutineView
User->>StartChallengeView: Start 버튼 탭
StartChallengeView->>StartChallengeView: startButtonState 업데이트
StartChallengeView->>ChallengeCoordinator: push(.selectRoutine)
ChallengeCoordinator->>ChallengeCoordinatorView: selectRoutine 처리
ChallengeCoordinatorView->>ViewFactory: makeSelectRoutineView()
ViewFactory->>SelectRoutineView: SelectRoutineView 인스턴스 생성/반환
ChallengeCoordinatorView-->>User: SelectRoutineView 표시
User->>SelectRoutineView: next 버튼 탭
SelectRoutineView->>ChallengeCoordinator: push(.loading)
예상 코드 검토 노력🎯 3 (보통) | ⏱️ ~25분 관련 가능성이 있는 PR
제안된 레이블
제안된 검토자
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift:
- Around line 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.
- Around line 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.
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift:
- Around line 16-18: The code uses braces without a space (e.g., "VStack{",
"HStack{", "VStack(alignment: .leading, spacing: 4){"); update these to follow
Swift style by adding a space before the opening brace (e.g., "VStack {",
"HStack {", "VStack(alignment: .leading, spacing: 4) {") throughout
StartChallengeView (struct StartChallengeView and its body) to keep brace
spacing consistent in this file.
- Around line 13-14: startButtonState is declared as an unused @State and never
changes; either remove the @State and pass a constant binding to CherrishButton,
or implement the state transitions where the button should change. Replace the
variable declaration (startButtonState: ButtonState) with a constant usage by
passing .constant(.active) into CherrishButton (e.g., CherrishButton(..., state:
.constant(.active), ...) and remove startButtonState), or if you intend dynamic
behavior, keep startButtonState but add the handlers that mutate it (e.g., set
startButtonState = .loading/.disabled in the tap closure before calling
challengeCoordinator.push(.selectRoutine) and update it on completion) so the
state actually changes.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/challengeStartCherry.svgis excluded by!**/*.svg
📒 Files selected for processing (7)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.jsonCherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.jsonCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swiftCherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift
🧰 Additional context used
🧬 Code graph analysis (3)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift (1)
Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift (3)
makeSelectRoutineView(65-67)makeLoadingView(73-75)makeSelectMissionView(69-71)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift (4)
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Shadow.swift (1)
body(9-17)Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift (1)
typography(60-65)Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Color.swift (3)
gray1000(49-51)gray800(41-43)gray600(33-35)Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift (1)
push(23-25)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift (2)
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Shadow.swift (1)
body(9-17)Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Color.swift (1)
red600(85-87)
🔇 Additional comments (7)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.json (1)
1-6: LGTM!표준 Xcode 에셋 카탈로그 폴더 메타데이터입니다. 형식이 올바릅니다.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift (1)
22-27: LGTM!새로운
.selectRoutine라우트가 올바르게 추가되었고,ViewFactory를 통해 일관된 뷰 생성 패턴을 따르고 있습니다. 네비게이션 흐름이 논리적으로 구성되어 있습니다.Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift (1)
10-16: LGTM!
ChallengeRouteenum에selectRoutine케이스가 올바르게 추가되었습니다. 라우트 순서가 네비게이션 흐름을 논리적으로 반영하고 있습니다.Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.json (1)
1-12: LGTM!SVG 파일을 universal idiom으로 참조하는 표준 에셋 카탈로그 구조입니다. SVG는 벡터 기반이므로 별도의 스케일 변형(@2x, @3x) 없이도 모든 해상도에서 선명하게 렌더링됩니다.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift (2)
45-47: 네비게이션 로직이 올바르게 구현되었습니다.코디네이터 패턴을 사용하여
selectRoutine화면으로의 이동이 정상적으로 구현되었습니다.
33-33: 이미지 에셋이 Asset Catalog에 정상 추가되었습니다.
challengeStartCherry:Assets.xcassets/ChallengeImage/challengeStartCherry.imageset에 존재info:Assets.xcassets/cherrishIcon/info.imageset에 존재두 이미지 에셋 모두 Asset Catalog에 올바르게 구성되어 있습니다.
Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift (1)
19-19: LGTM!
makeSelectRoutineView()메서드가 기존 팩토리 패턴과 일관되게 추가되었습니다. 프로토콜과 구현체 모두 올바르게 정의되어 있습니다.Also applies to: 65-67
| ZStack { | ||
| Color.red600 | ||
|
|
||
| VStack { | ||
| Text("SelectRoutine") | ||
|
|
||
| Button("next") { | ||
| challengeCoordinator.push(.loading) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 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 -20Repository: 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 5Repository: TEAM-Cherrish/Cherrish-iOS
Length of output: 4131
🏁 Script executed:
#!/bin/bash
# Search for SelectRoutineView.swift
fd "SelectRoutineView" --type swiftRepository: TEAM-Cherrish/Cherrish-iOS
Length of output: 242
🏁 Script executed:
#!/bin/bash
# Search for Color extension definitions
rg "extension Color" --type swift -A 20Repository: 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 3Repository: 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 fRepository: 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 30Repository: 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 2Repository: 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 fRepository: 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 -20Repository: 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 -30Repository: 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 -20Repository: 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 2Repository: 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 fRepository: TEAM-Cherrish/Cherrish-iOS
Length of output: 142
🏁 Script executed:
#!/bin/bash
# Search for static properties on Color
rg "static.*red|static.*gray" --type swiftRepository: 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.
| Text("SelectRoutine") | ||
|
|
||
| Button("next") { | ||
| challengeCoordinator.push(.loading) | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
플레이스홀더 UI - 향후 구현 예정 확인
현재 뷰가 임시 플레이스홀더로 보입니다. 다음 사항을 고려해 주세요:
- "next" 버튼 레이블의 다국어 지원 (Localizable.strings 사용)
- 실제 루틴 선택 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.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift
Outdated
Show resolved
Hide resolved
| Text("이번엔 어떤 루틴으로 관리할까요?") | ||
| .typography(.headline_sb_20) | ||
| .foregroundStyle(.gray1000) | ||
| Text("루틴을 지킬수록 체리가 성장해요.") | ||
| .typography(.title2_m_16) | ||
| .foregroundStyle(.gray800) |
There was a problem hiding this comment.
Text View Builder 방식으로 부탁드립니다~
Color로 .gray800으로 사용해주세요!
64fa85f to
9955a40
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift:
- Around line 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.
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift:
- Around line 16-27: The code uses no-space-before-brace for Swift view builders
(e.g., VStack{ and HStack{) which violates the Swift style guide; update all
occurrences in StartChallengeView.swift to place a single space before the
opening brace (e.g., change VStack{ to VStack { and HStack{ to HStack {),
including any nested view builders in the file, and run the formatter/lint to
ensure consistent spacing across the file.
- Around line 37-42: The HStack in StartChallengeView currently contains
Image("info") and text but lacks accessibility configuration; decide if
Image("info") is decorative or meaningful, then either mark the image as
decorative by setting it accessibilityHidden(true) or provide a descriptive
accessibilityLabel for it, and make the whole HStack a single accessibility
element by applying accessibilityElement(children: .combine) (or set
isAccessibilityElement = true and provide a combined accessibilityLabel) so
screen readers read the full 안내 문구 as one unit.
- Around line 13-14: startButtonState is declared as @State but never mutated;
replace the state with a simple constant or remove it and pass .active directly
to CherrishButton (i.e., remove @State from startButtonState or eliminate the
variable entirely and use .active where the button is constructed). If the
button truly needs to become dynamic later (e.g., during network calls),
implement that enabling/disabling logic and only then convert to @State or a
Binding and update the variable from the async logic; otherwise keep it as a
non-state constant to avoid unnecessary state overhead.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/challengeStartCherry.svgis excluded by!**/*.svg
📒 Files selected for processing (7)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.jsonCherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.jsonCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swiftCherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swiftCherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift
🧰 Additional context used
🧬 Code graph analysis (2)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift (2)
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Shadow.swift (1)
body(9-17)Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Color.swift (1)
red600(85-87)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift (1)
Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift (3)
makeSelectRoutineView(65-67)makeLoadingView(73-75)makeSelectMissionView(69-71)
🔇 Additional comments (9)
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/Contents.json (1)
1-6: LGTM!ChallengeImage 에셋 폴더의 표준 Xcode 에셋 카탈로그 메타데이터입니다.
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/ChallengeImage/challengeStartCherry.imageset/Contents.json (1)
1-12: LGTM!SVG 포맷을 사용한 이미지 에셋 구성이 적절합니다. Universal idiom으로 모든 기기에서 벡터 스케일링이 가능합니다.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift (1)
10-16: LGTM!라우팅 순서가 논리적인 네비게이션 플로우를 잘 반영합니다:
startChallenge→selectRoutine→loading→selectMission.Cherrish-iOS/Cherrish-iOS/Presentation/ViewFactory.swift (2)
19-19: LGTM!프로토콜에
makeSelectRoutineView()메서드가 적절히 선언되었습니다.
65-67: LGTM!기존 팩토리 패턴과 일관된 구현입니다.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/SelectRoutineView.swift (1)
10-25: 플레이스홀더 뷰로 보입니다 - 향후 구현 예정 확인현재 구현이 스켈레톤/플레이스홀더 형태입니다. 실제 UI 디자인이 적용될 예정인지 확인 부탁드립니다.
네비게이션 로직(
challengeCoordinator.push(.loading))은 올바르게 구현되어 있습니다.Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift (2)
45-47: 네비게이션 로직 변경 확인 - LGTM!PR 목표에 따라
.selectMission에서.selectRoutine으로 네비게이션 경로가 올바르게 변경되었습니다. 코디네이터 패턴을 적절히 활용하고 있습니다.
33-33: 이미지 에셋이 프로젝트에 존재합니다
"challengeStartCherry"및"info"이미지 에셋은 모두 Assets.xcassets에 정상적으로 추가되어 있습니다. 런타임 문제 없습니다.Likely an incorrect or invalid review comment.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinatorView.swift (1)
17-28: 라우팅 로직 구현 - LGTM!새로운
.selectRoutine케이스가 올바르게 추가되었고,ViewFactory.shared.makeSelectRoutineView()와 적절히 연결되어 있습니다. 기존.selectMission경로도 유지되어 있으며, 스위치 문에서 모든ChallengeRoute케이스(root, startChallenge, selectRoutine, loading, selectMission)가 완전히 처리되고 있습니다.
| ZStack { | ||
| Color.red600 |
There was a problem hiding this comment.
🧩 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 -10Repository: 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 swiftRepository: 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.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift
Outdated
Show resolved
Hide resolved
| HStack(spacing: 12){ | ||
| Image("info") | ||
| Text("이 챌린지는 설정 시점부터 7일간 진행됩니다.") | ||
| .typography(.body3_m_12) | ||
| .foregroundStyle(.gray600) | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
접근성 개선 고려
정보 안내 HStack에서 Image("info")가 장식용인지 의미 있는 아이콘인지에 따라 접근성 레이블을 추가하는 것이 좋습니다. 스크린 리더 사용자를 위해 전체 안내 문구가 하나의 접근성 요소로 읽히도록 설정을 고려해주세요.
♻️ 접근성 개선 제안
HStack(spacing: 12){
- Image("info")
+ Image("info")
+ .accessibilityHidden(true)
Text("이 챌린지는 설정 시점부터 7일간 진행됩니다.")
.typography(.body3_m_12)
.foregroundStyle(.gray600)
}
+ .accessibilityElement(children: .combine)
.padding(.bottom, 12)🤖 Prompt for AI Agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift
around lines 37 - 42, The HStack in StartChallengeView currently contains
Image("info") and text but lacks accessibility configuration; decide if
Image("info") is decorative or meaningful, then either mark the image as
decorative by setting it accessibilityHidden(true) or provide a descriptive
accessibilityLabel for it, and make the whole HStack a single accessibility
element by applying accessibilityElement(children: .combine) (or set
isAccessibilityElement = true and provide a combined accessibilityLabel) so
screen readers read the full 안내 문구 as one unit.
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift
Outdated
Show resolved
Hide resolved
|
|
||
| Spacer() | ||
|
|
||
| Image("challengeStartCherry") |
There was a problem hiding this comment.
이거 이미지 .으로 접근해서 쓰는걸로 바꿔주세요 !!!!
| CherrishButton(title: "챌린지 시작하기", type: .next, state: $startButtonState) { | ||
| challengeCoordinator.push(.selectRoutine) |
wotjs020708
left a comment
There was a problem hiding this comment.
전체적으로 코드가 깔끔하네욤 고생하셨습니다!
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift:
- 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.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift
🧰 Additional context used
🧬 Code graph analysis (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift (3)
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Shadow.swift (1)
body(9-17)Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/View+Color.swift (3)
gray1000(49-51)gray800(41-43)gray600(33-35)Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/Coordinator/ChallengeCoordinator.swift (1)
push(23-25)
🔇 Additional comments (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/StartChallengeView.swift (1)
16-44: 전체적인 뷰 구조가 잘 구성되어 있습니다.VStack/HStack을 활용한 레이아웃 구성, 코디네이터 패턴을 통한 네비게이션 처리, 그리고
.adjustedH/.adjustedW를 활용한 반응형 패딩 적용이 적절합니다. PR 목표에 명시된 챌린지 시작 화면 구현이 잘 완료되었습니다.
| @State private var startButtonState: ButtonState = .active | ||
|
|
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
startButtonState가 뷰 내에서 수정되지 않습니다.
현재 startButtonState가 .active로 초기화된 후 변경되지 않습니다. CherrishButton이 바인딩을 필수로 요구하는 API라면 현재 구현이 맞지만, 만약 상태 변경이 필요 없다면 불필요한 @State 선언일 수 있습니다.
|
|
||
| Spacer() | ||
|
|
||
| Image(.challengeStartCherry) |
There was a problem hiding this comment.
🧹 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.
Feat/#40 startchallengeview
🔗 연결된 이슈
📄 작업 내용
💻 주요 코드 설명
코드 설명할 파일 이름 (ex: HomeView)👀 기타 더 이야기해볼 점
나연이가 적어준 거 보고 해보긴했는데 잘 맞춰서한건지!! 리뷰 마니마니 달아주세요 열띠미 반영하겠습니당