Calm 2.0 Fase 2: check-in guiado full-screen (build 52)
El ritual mensual como flujo paso a paso en vez de formulario: - Una fuente por pantalla: valor anterior a la vista, entrada grande (40pt rounded), delta en vivo (chip verde/rojo con importe y %), sugerencia de portapapeles, 'Igual que el mes pasado' y 'Omitir' - Barra de progreso del ritual; cancelable solo al inicio (interactiveDismiss bloqueado a mitad para no perder valores) - Reflexión: mood (5 estados existentes) + nota de una línea - Cierre: total nuevo, delta del mes, streak, compartir y haptic de éxito - Persistencia por los MISMOS caminos que Quick Update (Snapshots) y el journal (MonthlyCheckInStore → JournalEntry): coherente con el resto de entradas - Entrada: CTA del check-in card en Home (fullScreenCover); la fila de completado sigue navegando al journal - Fix: referenceDate congelada en @State al presentar — el card la recalcula al guardar y SwiftUI re-evaluaba el contenido del cover cambiando el mes a mitad de flujo - --pending-checkin en ScreenshotMode (revierte el seed a 'mes pendiente') + UITest testGuidedCheckInFlow end-to-end (valor → skips → mood → cierre) ✓ - Strings ×7 idiomas Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WoScpmHdVj1aUf4rAp6hbe
This commit is contained in:
@@ -615,6 +615,7 @@ struct MonthlyCheckInCard: View {
|
||||
var totalSources: Int = 0
|
||||
var streak: Int = 0
|
||||
@State private var startDestinationActive = false
|
||||
@State private var showingGuidedFlow = false
|
||||
|
||||
@FetchRequest(
|
||||
sortDescriptors: [NSSortDescriptor(keyPath: \JournalEntry.completionTime, ascending: false)],
|
||||
@@ -740,6 +741,12 @@ struct MonthlyCheckInCard: View {
|
||||
}
|
||||
.opacity(0)
|
||||
)
|
||||
// Calm 2.0 Fase 2: the ritual runs as a guided full-screen flow — one
|
||||
// source per step, reflection, closing summary.
|
||||
.fullScreenCover(isPresented: $showingGuidedFlow) {
|
||||
GuidedCheckInView(referenceDate: navigationReferenceDate)
|
||||
.environment(\.managedObjectContext, CoreDataStack.shared.viewContext)
|
||||
}
|
||||
}
|
||||
|
||||
/// Done state: one quiet, reassuring line.
|
||||
@@ -849,7 +856,7 @@ struct MonthlyCheckInCard: View {
|
||||
}
|
||||
|
||||
Button {
|
||||
startDestinationActive = true
|
||||
showingGuidedFlow = true
|
||||
} label: {
|
||||
Text(buttonLabel)
|
||||
.font(.headline.weight(.semibold))
|
||||
@@ -859,6 +866,7 @@ struct MonthlyCheckInCard: View {
|
||||
.foregroundColor(.white)
|
||||
.cornerRadius(AppConstants.UI.cornerRadius)
|
||||
}
|
||||
.accessibilityIdentifier("checkin_start_cta")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user