diff --git a/AGENTS.md b/AGENTS.md index 1e8634f0..5715bd4f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1027,8 +1027,11 @@ because breaking it fails silently: `estimatedActiveCalories` (raw, exported) vs `estimatedActiveCaloriesAdjusted` (shown), and `hrRestingBaseline` (raw, exported) vs `Corrections.baseline()` at read time. The display helpers (`DailyCalorieEstimator.displayActiveCalories` / `displayCalories`) must not be used - by an exporter. A screen showing corrected figures carries the `AdjustedCaption` (a widget tile, - its `adjusted` flag). The coach reads through the corrections too and is told so; a workout's + by an exporter. The caption saying figures are corrected lives in Settings, not on the tabs + (owner's call: on Today it was a line shown on every visit for something set once). The + Accuracy check row reads "Adjusting your ring" while corrections are on, and its screen lists + them; the detail screens (vital detail, workout summary) keep the `AdjustedCaption`, and a + widget tile its `adjusted` flag. The coach reads through the corrections too and is told so; a workout's stored samples and summary stay raw because Health Connect and Strava get them. - **Corrections belong to one ring (BLE address) and only exist after a consistent-bias verdict.** Don't widen them to "Inconsistent": a slider that moves the average of an erratic @@ -1216,8 +1219,8 @@ clutter came from ignoring one of them: It points at what to look at and never names a condition. It is one line, ellipsised, and keeps its last text while the next is read, so the header never changes height or blanks. Sleep, Vitals and Activity each end with one in-context row into My Health; Today has none. -- **One open section per screen.** Today shows two rows of tiles and folds the rest behind "Show - all metrics"; My Health keeps health areas open and folds Trends, Habits and Stress into +- **One open section per screen.** Today shows every card the user kept, always, with no "Show + all" fold (owner's call); trimming Today is Customize cards' job. My Health keeps health areas open and folds Trends, Habits and Stress into closed sections (`Section(summary = …)`), and the radar to one line unless it flags something. A new card should usually be a closed section, not another open one. - **Repeat a figure only when the question differs.** Last night's sleep on Today (am I okay?) and diff --git a/app/src/main/assets/i18n/pt-BR.json b/app/src/main/assets/i18n/pt-BR.json index 1960a8cd..86575bc7 100644 --- a/app/src/main/assets/i18n/pt-BR.json +++ b/app/src/main/assets/i18n/pt-BR.json @@ -148,6 +148,7 @@ "Adjust start or end time to trim this record. Stages outside the new range will be removed.": "Ajuste o horário de início ou de término para recortar este registro. As fases fora do novo intervalo serão removidas.", "Adjust start time": "Ajustar horário de início", "Adjusted by your accuracy check: {0}. Settings → Accuracy check to change.": "Ajustado pela sua verificação de precisão: {0}. Configurações → Verificação de precisão para alterar.", + "Adjusting your ring": "Ajustando seu anel", "After 1–2 drinks": "Depois de 1–2 doses", "After 1–2 drinks, your HRV runs {0}% {1} than on dry nights.": "Depois de 1–2 bebidas, sua HRV fica {0}% {1} do que nas noites sem álcool.", "After 3 or more": "Depois de 3 ou mais", diff --git a/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt index 873341a4..a4dfbd3f 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt @@ -163,7 +163,6 @@ fun ActivityScreen( // Day navigation (issue #76): the summary + RECORDS cards follow the shown day, so a // past day's steps/distance/calories are reachable the way Sleep already allows. item { ActivityDayNavHeader(state, viewModel) } - state.adjustedNote?.let { note -> item { AdjustedCaption(note) } } item { DailyActivitySummaryCard(state, units) } diff --git a/app/src/main/java/com/pulseloop/ui/screens/Screens.kt b/app/src/main/java/com/pulseloop/ui/screens/Screens.kt index f4ca6e18..be92506c 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/Screens.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/Screens.kt @@ -296,7 +296,6 @@ fun VitalsScreen( // The answer first: is anything outside this person's usual range? The // cards below are the detail. VitalsStatusLine() - state.adjustedNote?.let { AdjustedCaption(it) } } // Measure button: combined (0x23) for 56ff/Jring, or sequential live // HR + SpO₂ (0x69) for Colmi. Hidden for rings that support neither. diff --git a/app/src/main/java/com/pulseloop/ui/screens/SettingsScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/SettingsScreen.kt index a29c9199..b840d721 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/SettingsScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/SettingsScreen.kt @@ -80,12 +80,15 @@ fun SettingsScreen( else -> keyStore.model } val openCheck by remember(db) { db.accuracyDao().openFlow() }.collectAsState(initial = null) + // The tabs no longer carry the "Adjusted by your accuracy check" caption; this row is + // where the user sees that corrections are on, and the screen behind it lists them. + val accuracyCorrections = rememberAccuracyCorrections() val accuracyTrailing = openCheck?.let { c -> if (c.state == com.pulseloop.data.entity.AccuracyCheckEntity.STATE_RUNNING) { val (day, total) = AccuracyUiText.dayOf(c) trf("Day {0} of {1}", day, total) } else tr("Report ready") - } + } ?: tr("Adjusting your ring").takeIf { !accuracyCorrections.isEmpty } fun navigate(route: String) { navController?.navigate(route) diff --git a/app/src/main/java/com/pulseloop/ui/screens/SleepScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/SleepScreen.kt index b6138fa9..dc05f741 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/SleepScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/SleepScreen.kt @@ -109,7 +109,6 @@ fun SleepScreen( item { SleepRangeSelector(state.range) { viewModel?.setRange(it) } } - state.adjustedNote?.let { note -> item { AdjustedCaption(note) } } // Every rebuild stamps shownDayMillis, so 0 means the first one hasn't landed yet: render // nothing rather than flash "No sleep recorded" (and a 1970 date header) for a frame. val loaded = viewModel == null || state.shownDayMillis != 0L diff --git a/app/src/main/java/com/pulseloop/ui/screens/TodayScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/TodayScreen.kt index b29b597f..957f280b 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/TodayScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/TodayScreen.kt @@ -109,7 +109,6 @@ fun TodayScreen( val vitalsLoaded = vitalsViewModel == null || vitals.loaded val guidance = rememberGuidance(db, listOf(state.lastUpdated, sleep.lastNight?.id, sleep.lastNight?.updatedAt)) var briefSheet by remember { mutableStateOf(false) } - var showAllTiles by androidx.compose.runtime.saveable.rememberSaveable { mutableStateOf(false) } // The "+ Log" sheet is app-wide (PulseLoopApp); Today's shortcuts open it at a step, and // its closing is what refreshes the food and drinks numbers here. val logOpen by com.pulseloop.ui.LaunchRequests.openLog.collectAsState() @@ -244,7 +243,8 @@ fun TodayScreen( // Accuracy check in progress (docs/accuracy-check-plan.md): say so, since it pauses export. accuracyOpen?.let { c -> item { AccuracyCheckBanner(c) { navController?.navigate("settings/accuracy-check") } } } - state.adjustedNote?.let { note -> item { AdjustedCaption(note) } } + // The accuracy-check correction note lives in Settings → Accuracy check, not here: + // on Today it was a line shown on every visit for something set once. // Glance: one line of what today means, and an alert line only when something is off. item { @@ -362,9 +362,9 @@ fun TodayScreen( // No tiles until vitals and sleep have loaded: before that every supports* flag is // false (the HRV/temperature tiles appear later and reflow the grid) and the tiles // say "No sleep recorded" / "No data" for data that is merely still being read. - // Two rows of tiles, the user's first choices, and the rest behind one tap: twelve tiles - // at equal weight turned Today into a wall. Editing shows them all. - val shown = if (editState.editing || showAllTiles) visibleOrdered else visibleOrdered.take(columns * 2) + // Every visible card, always: the owner wants Today's cards present without a + // "Show all" tap. Hide or reorder them with Customize cards. + val shown = visibleOrdered val rows = if (vitalsLoaded && sleepLoaded) shown.chunked(columns) else emptyList() // Keyed by the cards in the row so a reorder in edit mode moves rows rather than // recomposing every row in place. @@ -387,21 +387,6 @@ fun TodayScreen( } } - val more = visibleOrdered.size - columns * 2 - if (!editState.editing && more > 0 && vitalsLoaded && sleepLoaded) { - item { - Text( - if (showAllTiles) tr("Show fewer") else trf("Show all metrics ({0} more)", more), - fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = PulseColors.accent, - textAlign = androidx.compose.ui.text.style.TextAlign.Center, - modifier = Modifier - .fillMaxWidth() - .heightIn(min = 48.dp) - .clickable(role = Role.Button) { showAllTiles = !showAllTiles } - .wrapContentHeight(Alignment.CenterVertically), - ) - } - } if (editState.editing) { item { HiddenMetricsTray(hiddenCards) { editState.setHidden(it, false) } } }