From 01399afa2c21d4def22613fbe7bb6834023c56e3 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Wed, 15 Jul 2026 18:26:58 +0900 Subject: [PATCH] =?UTF-8?q?chore(debug):=20-questShowEditor=20launch=20arg?= =?UTF-8?q?=20=E2=80=94=20open=20quest=20editor=20headlessly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 다짐 편집기를 여는 검증용 런치 인자 추가 (DEBUG 전용, §14 관례). 마감 시각이 있는 다짐을 우선 열어 새 마감 UI(토글·시간 선택·footer)의 스크린샷 검증이 CLI로 가능해진다. 없으면 첫 다짐의 편집기를 연다. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_013yKDMhuF39GVYy3FMcGHh7 --- myApp/HaruDanim/CLAUDE.md | 2 +- myApp/HaruDanim/IOS/Views/GoalViews.swift | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/myApp/HaruDanim/CLAUDE.md b/myApp/HaruDanim/CLAUDE.md index 973a60a..d55816b 100644 --- a/myApp/HaruDanim/CLAUDE.md +++ b/myApp/HaruDanim/CLAUDE.md @@ -316,7 +316,7 @@ xcrun xcstringstool sync Widgets/Localizable.xcstrings --stringsdata "${widget_f |---|---| | 모음 | `-startEditing` `-expandGoalCard` `-pinGoals ` `-openStatsFor "이름"` `-openHistoryFor "이름"` `-autoStart "이름"` | | 측정 알림 | `-settings.longSessionAlertHours `(설정 주입) `-longSessionAlertTestSeconds `(시간 대신 N초 발화, provisional 권한 자동) `-alertDump`(예약 상태 → Documents/session-alerts.txt) | -| 목표 | `-goalShowEditor` `-goalShowFinished` `-goalReorder` `-goalScrollBottom` `-endGoalYesterday "제목"`(종료일을 어제로 — 실행 시점 자동 판정 검증) `-streakDump`(모든 다짐의 연속 계산 결과 → Documents/streak-dump.txt) | +| 목표 | `-goalShowEditor` `-goalShowFinished` `-goalReorder` `-goalScrollBottom` `-questShowEditor`(다짐 편집기 표시 — 마감 시각 다짐 우선, 없으면 첫 다짐) `-endGoalYesterday "제목"`(종료일을 어제로 — 실행 시점 자동 판정 검증) `-streakDump`(모든 다짐의 연속 계산 결과 → Documents/streak-dump.txt) | | 기록/통계 | `-historyMode timetable` `-historyWeekly` `-excludeActions "이름,이름"` `-historyShowFilter` `-statShowFilter` `-statSpan ` `-statScrollBottom` `-showExport` `-exportDump`(Documents/export-dump.png) | | 설정/기타 | `-settingsScrollGoal` `-settingsScrollPremium` `-premiumPreview` `-helpPreview` `-dataExportPreview`(+`-dataExportRun`이면 CSV 자동 생성 후 Documents 복사) `-widgetPreview YES|lock` `-widgetPreviewScroll <앵커>` `cloudSync`(standard bool로 강제) `-intentSmokeTest`(시리 인텐트 10개 시나리오 실행 → Documents/intent-smoke-test.txt, -seedDemo·-premium과 함께) | | 버블 | `-radialExpanded` `-radialDoubleTapTest`(2초 뒤 FAB 더블탭 재현 — `-settings.radialDoubleTapTab <탭>`과 함께) | diff --git a/myApp/HaruDanim/IOS/Views/GoalViews.swift b/myApp/HaruDanim/IOS/Views/GoalViews.swift index 690828d..680c5c9 100644 --- a/myApp/HaruDanim/IOS/Views/GoalViews.swift +++ b/myApp/HaruDanim/IOS/Views/GoalViews.swift @@ -26,6 +26,10 @@ struct GoalListView: View { @State private var showingPremiumSheet = false @State private var isReordering = false @State private var editMode: EditMode = .inactive + #if DEBUG + /// 검증용 (-questShowEditor): 다짐 편집기를 바로 표시 (마감 시각 다짐 우선, 없으면 첫 다짐) + @State private var debugEditingQuest: Quest? + #endif // 다짐 목록 접힘 상태는 기기별 로컬 설정 (CloudKit 동기화 제외, LocalPrefs 참고) @AppStorage(LocalPrefsKeys.collapsedGoals, store: AppGroup.defaults) private var collapsedGoalsRaw = "" @@ -145,6 +149,13 @@ struct GoalListView: View { .sheet(isPresented: $showingAdd) { GoalEditorView(goal: nil) } + #if DEBUG + .sheet(item: $debugEditingQuest) { quest in + if let goal = quest.goal { + QuestEditorView(goal: goal, quest: quest) + } + } + #endif .alert("무료 사용 한도", isPresented: $showLimitAlert) { Button("프리미엄 알아보기") { showingPremiumSheet = true } Button("확인", role: .cancel) {} @@ -174,6 +185,11 @@ struct GoalListView: View { withAnimation { proxy.scrollTo("finishedLink", anchor: .bottom) } } } + // 검증용: -questShowEditor YES → 다짐 편집기 바로 표시 (마감 시각 다짐 우선) + if UserDefaults.standard.bool(forKey: "questShowEditor") { + let quests = goals.flatMap(\.sortedQuests) + debugEditingQuest = quests.first { $0.deadlineMinutes >= 0 } ?? quests.first + } #endif } }