Add CBT-based guided reflection questions with clinical info sheet
Replace generic journaling prompts with evidence-based therapeutic techniques: CBT thought record for negative moods, ACT cognitive defusion for neutral, and behavioral activation for positive. Each question now shows a clinical step label (e.g. SITUATION, REFRAME). Added info button linking to a new sheet explaining the techniques with citations to Beck, Harris, and Martell/Dimidjian. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ struct GuidedReflectionView: View {
|
||||
@State private var currentStep: Int = 0
|
||||
@State private var isSaving = false
|
||||
@State private var showDiscardAlert = false
|
||||
@State private var showInfoSheet = false
|
||||
@FocusState private var isTextFieldFocused: Bool
|
||||
|
||||
/// Snapshot of the initial state to detect unsaved changes
|
||||
@@ -83,6 +84,15 @@ struct GuidedReflectionView: View {
|
||||
.accessibilityIdentifier(AccessibilityID.GuidedReflection.cancelButton)
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
Button {
|
||||
showInfoSheet = true
|
||||
} label: {
|
||||
Image(systemName: "info.circle")
|
||||
}
|
||||
.accessibilityLabel(String(localized: "guided_reflection_about_title"))
|
||||
}
|
||||
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
Spacer()
|
||||
Button("Done") {
|
||||
@@ -102,6 +112,9 @@ struct GuidedReflectionView: View {
|
||||
Text(String(localized: "guided_reflection_unsaved_message"))
|
||||
}
|
||||
.trackScreen(.guidedReflection)
|
||||
.sheet(isPresented: $showInfoSheet) {
|
||||
GuidedReflectionInfoView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +166,16 @@ struct GuidedReflectionView: View {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
if currentStep < reflection.responses.count {
|
||||
let response = reflection.responses[currentStep]
|
||||
let stepLabels = reflection.moodCategory.stepLabels
|
||||
|
||||
// CBT step label
|
||||
if currentStep < stepLabels.count {
|
||||
Text(stepLabels[currentStep].uppercased())
|
||||
.font(.caption)
|
||||
.fontWeight(.semibold)
|
||||
.foregroundStyle(.secondary)
|
||||
.tracking(1.5)
|
||||
}
|
||||
|
||||
Text(response.question)
|
||||
.font(.title3)
|
||||
|
||||
Reference in New Issue
Block a user