Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/src/main/assets/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"Add any lab report as a PDF: blood, urine, hormones or anything else. The coach reads it, you check the values, and every marker gets a chart across your exams.": "Adicione qualquer laudo em PDF: sangue, urina, hormônios ou qualquer outro. O coach lê, você confere os valores, e cada marcador ganha um gráfico ao longo dos seus exames.",
"Add by hand": "Adicionar manualmente",
"Add medication or supplement": "Adicionar medicamento ou suplemento",
"Add one with Log Past Activity.": "Adicione um em Registrar atividade anterior.",
"Add stravaClientId and stravaClientSecret to local.properties to enable Strava integration.": "Adicione stravaClientId e stravaClientSecret ao local.properties para ativar a integração com o Strava.",
"Add this to claude_desktop_config.json or .cursor/mcp.json, then restart the app. It needs Node.js on the computer.": "Adicione isto ao claude_desktop_config.json ou ao .cursor/mcp.json e reinicie o app. É preciso ter Node.js no computador.",
"Add what you take on a schedule. PulseLoop asks once per dose and keeps a week's record, and the coach can see it.": "Adicione o que você toma com horário. O PulseLoop pergunta uma vez por dose e guarda o registro de uma semana, e o coach pode vê-lo.",
Expand Down Expand Up @@ -1202,6 +1203,7 @@
"No subscription": "Sem assinatura",
"No temperature data yet — temperature trends appear after overnight wear.": "Ainda não há dados de temperatura — as tendências de temperatura aparecem após usar o anel durante a noite.",
"No tools paired yet.": "Nenhuma ferramenta pareada ainda.",
"No workouts recorded on {0}": "Nenhum treino registrado em {0}",
"No workouts recorded today": "Nenhum treino registrado hoje",
"No workouts yet — recorded workouts will appear here.": "Nenhum treino ainda — os treinos registrados aparecerão aqui.",
"None": "Nenhum",
Expand Down
23 changes: 19 additions & 4 deletions app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,16 @@ fun ActivityScreen(
}
}

// The workouts of the day on screen, not always today's: the day arrows move the whole tab,
// and a list fixed to today hid every past workout behind the history button.
val todayStart = com.pulseloop.util.TimeUtil.startOfTodayLocal()
val todayWorkouts = remember(state.finishedWorkouts, todayStart) { state.finishedWorkouts.filter { it.startedAt >= todayStart } }
val dayStart = shownDayStart(state)
val isToday = dayStart == todayStart
val dayEnd = java.time.Instant.ofEpochMilli(dayStart).atZone(java.time.ZoneId.systemDefault())
.toLocalDate().plusDays(1).atStartOfDay(java.time.ZoneId.systemDefault()).toInstant().toEpochMilli()
val todayWorkouts = remember(state.finishedWorkouts, dayStart, dayEnd) {
state.finishedWorkouts.filter { it.startedAt in dayStart until dayEnd }
}
val todayIdx = ((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1) + 6) % 7
// recentDays is newest-first; index 0..6 = Monday..Sunday of this week's steps.
val stepsByWeekday = weeklySteps(state, todayIdx)
Expand Down Expand Up @@ -196,7 +204,7 @@ fun ActivityScreen(

item {
Text(
tr("TODAY"),
if (isToday) tr("TODAY") else dayHeaderLabel(dayStart).uppercase(),
style = com.pulseloop.ui.theme.PulseType.eyebrow, color = PulseColors.textSecondary,
)
}
Expand All @@ -215,8 +223,15 @@ fun ActivityScreen(
// Until the sessions have loaded the card keeps its size but says nothing, so
// "no workouts" never flashes for a day that has them.
val shown = Modifier.alpha(if (state.workoutsLoaded) 1f else 0f)
Text(tr("No workouts recorded today"), fontSize = 14.sp, fontWeight = FontWeight.Medium, color = PulseColors.textPrimary, modifier = shown)
Text(tr("Start one manually when your ring misses an activity."), fontSize = 12.sp, color = PulseColors.textMuted, modifier = shown)
Text(
if (isToday) tr("No workouts recorded today") else trf("No workouts recorded on {0}", dayHeaderLabel(dayStart)),
fontSize = 14.sp, fontWeight = FontWeight.Medium, color = PulseColors.textPrimary, modifier = shown,
)
// On a past day the way in is Log Past Activity, not recording one now.
Text(
if (isToday) tr("Start one manually when your ring misses an activity.") else tr("Add one with Log Past Activity."),
fontSize = 12.sp, color = PulseColors.textMuted, modifier = shown,
)
}
}
} else {
Expand Down
37 changes: 37 additions & 0 deletions audits/2026-11-16-activity-workouts-follow-day.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Audit: Activity's workout list follows the shown day (2.16.12)

Date: 2026-11-16 · PR: see the PR linking this file · Auditor: Claude Code (impeccable run with the
skill loaded earlier this session; the other three applied by hand from their SKILL.md files)

## Scope

The Activity tab has day arrows, but its workout list was fixed to today ("TODAY", "No workouts
recorded today") whatever day was shown, so the owner's 12 Nov gym workout (finished, 46 min) only
appeared inside the history dialog. The list now shows the shown day's workouts; its header names
the day (TODAY, YESTERDAY, a weekday or a date) and the empty text names it too, pointing to Log
Past Activity on a past day instead of recording one now.

## ux-user-flows

Flow: Activity → ‹ previous day → that day's workouts → tap one → detail. Branches: today / a past
day; workouts / none. Errors: none new. Conventions: matches Sleep's day header. Evidence: the
owner's Developer → activity_sessions screenshot (two finished workouts not listed).

## impeccable

Native audit unchanged at the dimension level (no new components); fixes a P1 Visibility of system
status failure: the screen said "No workouts recorded today" on a day that had one. No new findings.

## graphic-design-fundamentals

No visual change: same eyebrow and empty-state styles, new words only. pt-BR "Nenhum treino
registrado em quarta-feira" fits the card.

## less-is-more

Nothing added. The history dialog keeps its place for scanning many weeks. Taps to see a past
day's workout drop from 3 (history button, find it, tap) to 2 (arrow, tap).

## Verdict

Merge.
Loading