- KegelPhase에 prepare 국면 추가(무진동 — 첫 수축 진동이 시작 신호), 준비 0초면 즉시 수축 - 세팅에 '준비' 스테퍼(0~10초), 워치 자동 동기화, 구버전 설정 decodeIfPresent 보존 - 진행 화면: 준비=회그린 원이 작게 시작해 천천히 부풀며 첫 수축으로 연결(기존 그래픽 문법 유지), 진행 링 0·카운터 색 연동. 워치·Live Activity도 준비 국면 색/표시 대응 - 기록·건강의 시작 시각은 준비를 뺀 첫 수축 기준. Live Activity는 sync 단일 진입점으로 정리 - 도움말·세팅 푸터 문구 갱신, 신규 문자열 번역(en/ja)·stale 정리 — 전 카탈로그 0/0 - 검증: Debug·Release·워치 빌드 그린, 준비→수축 전환·세팅 화면 QA Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UPmp29DQHY6Ahfss5SRopT
44 lines
1.6 KiB
Swift
44 lines
1.6 KiB
Swift
//
|
|
// DebugSeed.swift
|
|
// Keging
|
|
//
|
|
// 검증용 런치 인자 (DEBUG 전용) — CLAUDE.md §14
|
|
// -seedStats: 지난 35일 결정적 가짜 기록으로 교체 (통계 화면 QA)
|
|
//
|
|
|
|
#if DEBUG
|
|
import Foundation
|
|
|
|
@MainActor
|
|
enum DebugSeed {
|
|
static func applyLaunchArguments() {
|
|
if CommandLine.arguments.contains("-seedStats") { seedStats() }
|
|
// 완주 경로 검증용 초단축 세팅 (준비 1초·수축 1초·이완 1초·2회)
|
|
if CommandLine.arguments.contains("-quickConfig") {
|
|
SettingsStore.shared.config = WorkoutConfig(prepSeconds: 1, contractSeconds: 1, relaxSeconds: 1, reps: 2)
|
|
}
|
|
// 기본 세팅 복원
|
|
if CommandLine.arguments.contains("-resetConfig") {
|
|
SettingsStore.shared.config = WorkoutConfig()
|
|
}
|
|
}
|
|
|
|
private static func seedStats() {
|
|
let calendar = Calendar.current
|
|
let today = calendar.startOfDay(for: Date())
|
|
var records: [SessionRecord] = []
|
|
for dayOffset in 0..<35 {
|
|
guard let day = calendar.date(byAdding: .day, value: -dayOffset, to: today) else { continue }
|
|
let sets = (dayOffset * 7 + 3) % 4 // 0~3세트 결정적 패턴
|
|
for index in 0..<sets {
|
|
let hour = [8, 13, 21][index % 3]
|
|
let minute = (dayOffset * 11 + index * 17) % 60
|
|
guard let start = calendar.date(bySettingHour: hour, minute: minute, second: 0, of: day) else { continue }
|
|
records.append(SessionRecord(startedAt: start, reps: 20, contractSeconds: 10, relaxSeconds: 5))
|
|
}
|
|
}
|
|
RecordStore.shared._replaceAll(records)
|
|
}
|
|
}
|
|
#endif
|