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
22 changes: 22 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1096,3 +1096,25 @@ sources: `docs/postpartum-breastfeeding-research.md`.
by the difference between what the stage calls for and what was added before, so weaning or
switching off takes exactly that back.
- **No F*cking Health jokes here**: postpartum text is on the voice's safety list.

## Where things live: intent first, then overview → detail

**Read this before adding a card, a row or a screen.** The app is organised in two layers, and most
clutter came from ignoring one of them:

- **Where a thing lives follows what the user came to do.** Logging (meal, drink, dose, period,
tags, workout) is one job, so it has one door: the "+ Log" button on every tab but Coach
(`LogSheet`, opened through `LaunchRequests.openLog`). Today's Meal/Drink chips open the same
sheet at a step; don't grow a second logging path on a new screen. Programs the user switched on
(cycle, meds, postpartum) surface on Today (`ProgramsRow`), and Rest Mode is offered where
"I'm unwell" happens (`RestModeLine`), not only in a menu.
- **Inside a screen, summary first, detail on tap.** A screen leads with one summary and its
primary action; everything else is a row that opens. A new section added inline at full weight
is how My Health became a wall.
- **Repeat a figure only when the question differs.** Last night's sleep on Today (am I okay?) and
on Sleep (why?) is fine; the same sleep three times on Today is not. The alcohol-clearance card
on Postpartum stays even though Drinks has one: "can I feed now?" is asked on that screen.
- **Notifications are reachable whether or not the coach is on.** Most of them (daily guidance,
battery alerts) never needed it, and gating the row on the coach hid them all.
- **A goal saved anywhere goes through `GoalSync.afterManualSave`** — it is what stops the field
following the coach, sends the step goal to the ring and republishes the widget.
4 changes: 2 additions & 2 deletions app/src/main/assets/i18n/en-FH.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"First sync": "First sync. Let's see the damage.",
"Flow, stretch, or breathwork": "Flow, stretch, or just f*cking breathe",
"For drinks, money and calories saved": "For drinks, money and calories you didn't waste",
"Get a daily check-in from your coach. You can change this anytime in Coach Check-Ins.": "Get a daily check-in from your coach. Change your mind anytime in Coach Check-Ins.",
"Get a daily check-in from your coach. You can change this anytime in Settings → Notifications.": "Get a daily check-in from your coach. Change your mind anytime in Settings → Notifications.",
"Get notified when your ring drops below 20% and 10%, so tracking doesn't stop mid-day.": "Get yelled at when your ring drops below 20% and 10%, so tracking doesn't die mid-day.",
"Get started": "Fine, let's start",
"Goal met on {0} of the last {1} days": "Goal met on {0} of the last {1} days. And the rest, huh?",
Expand Down Expand Up @@ -456,4 +456,4 @@
"{0} steps to your goal.": "{0} steps to your goal. Move it.",
"{0} steps today. {1} Time to start winding down.": "{0} steps today. {1} Now put the damn phone down and wind down.",
"{0}% of the night asleep": "{0}% of the night actually asleep"
}
}
4 changes: 2 additions & 2 deletions app/src/main/assets/i18n/pt-BR-FH.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"First sync": "Primeira sincronização. Bora ver o estrago.",
"Flow, stretch, or breathwork": "Flow, alongamento ou só respira, p*rra",
"For drinks, money and calories saved": "Para bebidas, dinheiro e calorias que você não torrou",
"Get a daily check-in from your coach. You can change this anytime in Coach Check-Ins.": "Receba um check-in diário do seu coach. Mudou de ideia? Altera quando quiser em Check-ins do Coach.",
"Get a daily check-in from your coach. You can change this anytime in Settings → Notifications.": "Receba um check-in diário do seu coach. Mudou de ideia? Altera quando quiser em Configurações → Notificações.",
"Get notified when your ring drops below 20% and 10%, so tracking doesn't stop mid-day.": "Leve um grito quando a bateria do anel ficar abaixo de 20% e 10%, pro monitoramento não morrer no meio do dia.",
"Get started": "Tá, bora começar",
"Goal met on {0} of the last {1} days": "Meta atingida em {0} dos últimos {1} dias. E o resto, hein?",
Expand Down Expand Up @@ -456,4 +456,4 @@
"{0} steps to your goal.": "Faltam {0} passos para sua meta. Bora.",
"{0} steps today. {1} Time to start winding down.": "{0} passos hoje. {1} Agora larga a p*rra do celular e vai relaxar.",
"{0}% of the night asleep": "{0}% da noite dormindo de verdade"
}
}
18 changes: 16 additions & 2 deletions app/src/main/assets/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"Aim for an earlier bedtime: you averaged {0} against a {1} goal.": "Tente dormir mais cedo: sua média foi {0} contra uma meta de {1}.",
"Aim to be in bed by {0} to get your {1} hours before your usual {2} wake-up.": "Tente estar na cama até {0} para ter suas {1} horas antes do seu despertar habitual às {2}.",
"Alcohol": "Álcool",
"Alcohol, stress, a late meal…": "Álcool, estresse, refeição tarde…",
"Alcohol: estimated clear for feeding around {0}": "Álcool: estimativa de liberação para amamentar por volta de {0}",
"Alcoólicos Anônimos": "Alcoólicos Anônimos",
"Alerts when your ring's battery runs low": "Alerta quando a bateria do anel estiver baixa",
Expand Down Expand Up @@ -383,6 +384,7 @@
"Customize": "Personalizar",
"Cycle": "Ciclo",
"Cycle of {0} days": "Ciclo de {0} dias",
"Cycle · day {0}": "Ciclo · dia {0}",
"Cycle · day {0} · {1}": "Ciclo · dia {0} · {1}",
"Cycling": "Ciclismo",
"DATA SOURCE": "FONTE DE DADOS",
Expand Down Expand Up @@ -462,6 +464,7 @@
"Dizziness or fainting": "Tontura ou desmaio",
"Done": "Concluído",
"Dose (optional)": "Dose (opcional)",
"Drink": "Bebida",
"Drink less, sleep better": "Beba menos, durma melhor",
"Drink to thirst and keep water where you feed. Ask your clinician about iodine, DHA and your baby's vitamin D. This is no time for a diet.": "Beba conforme a sede e deixe água por perto onde você amamenta. Pergunte ao seu profissional de saúde sobre iodo, DHA e a vitamina D do bebê. Não é hora de fazer dieta.",
"Drinks": "Bebidas",
Expand Down Expand Up @@ -544,7 +547,7 @@
"Export app, device, and wearable logs as JSON.": "Exporte logs do app, do dispositivo e do wearable em JSON.",
"Export failed": "Falha na exportação",
"Export reset — re-grant permissions to sync again.": "Exportação redefinida — conceda as permissões novamente para voltar a sincronizar.",
"Export ring data to Health Connect so other apps and dashboards can show it. Write-only: PulseLoop never reads data back.": "Exporte os dados do anel para o Health Connect para que outros apps e painéis possam exibi-los. Somente gravação: o PulseLoop nunca lê dados de volta.",
"Export ring data to Health Connect so other apps and dashboards can show it. Exporting only writes. PulseLoop reads Health Connect only for features you turn on: body data in your profile, Use without a ring, and the accuracy check.": "Exporte os dados do anel para o Health Connect para que outros apps e painéis possam exibi-los. A exportação só grava. O PulseLoop lê o Health Connect apenas para recursos que você ativa: dados corporais no seu perfil, Usar sem anel e a verificação de precisão.",
"Export them too": "Exportar também",
"Export them too if you're taking the other device off and want the ring's full history in Health Connect.": "Exporte também se você vai deixar de usar o outro dispositivo e quer o histórico completo do anel no Health Connect.",
"Exported only when switched on. A row stays dim until its permission is granted.": "Exportado somente quando ativado. Uma linha fica esmaecida até que sua permissão seja concedida.",
Expand Down Expand Up @@ -604,7 +607,7 @@
"Gemini": "Gemini",
"Gemini API Key": "Chave de API do Gemini",
"General": "Geral",
"Get a daily check-in from your coach. You can change this anytime in Coach Check-Ins.": "Receba um check-in diário do seu coach. Você pode alterar isso a qualquer momento em Check-ins do Coach.",
"Get a daily check-in from your coach. You can change this anytime in Settings → Notifications.": "Receba um check-in diário do seu coach. Você pode alterar isso a qualquer momento em Configurações → Notificações.",
"Get care now if you notice": "Procure atendimento agora se notar",
"Get notified when your ring drops below 20% and 10%, so tracking doesn't stop mid-day.": "Seja avisado quando a bateria do anel ficar abaixo de 20% e 10%, para o monitoramento não parar no meio do dia.",
"Get started": "Começar",
Expand Down Expand Up @@ -790,6 +793,7 @@
"Loading…": "Carregando…",
"Local": "Local",
"Location": "Localização",
"Log": "Registrar",
"Log Activity": "Registrar atividade",
"Log Meal": "Registrar refeição",
"Log Past Activity": "Registrar atividade anterior",
Expand Down Expand Up @@ -835,6 +839,7 @@
"Manage in Android settings": "Gerenciar nas configurações do Android",
"Manage or re-grant permissions, and review or delete PulseLoop's data, in the Health Connect app.": "Gerencie ou conceda novamente as permissões e revise ou exclua os dados do PulseLoop no app Health Connect.",
"Mandioca cozida": "Mandioca cozida",
"Mark today's doses": "Marque as doses de hoje",
"Mask sensitive data": "Mascarar dados sensíveis",
"Max": "Máx.",
"Max tokens": "Máximo de tokens",
Expand All @@ -851,10 +856,12 @@
"Measuring… updates when complete": "Medindo… atualiza ao concluir",
"Measuring… {0}s": "Medindo… {0}s",
"Medication": "Medicamento",
"Medication or supplement": "Medicamento ou suplemento",
"Medication reminders": "Lembretes de medicamentos",
"Medications & supplements": "Medicamentos e suplementos",
"Medicines while breastfeeding": "Medicamentos na amamentação",
"Meditation or relaxing": "Meditação ou relaxamento",
"Meds · {0} of {1}": "Remédios · {0} de {1}",
"Meet daily goals": "Cumprir metas diárias",
"Meetings across the country: aa.org.br": "Reuniões em todo o país: aa.org.br",
"Melancia": "Melancia",
Expand All @@ -881,6 +888,7 @@
"Monthly or less": "Uma vez por mês ou menos",
"Mood check-in": "Check-in de humor",
"More": "Mais",
"More drinks": "Mais bebidas",
"Morning": "Manhã",
"Morning type": "Matutino",
"Move every hour": "Mexa-se a cada hora",
Expand Down Expand Up @@ -989,6 +997,7 @@
"Nothing stood out": "Nada se destacou",
"Nothing to compare yet. Check back after the first full day and night.": "Nada para comparar ainda. Volte depois do primeiro dia e noite completos.",
"Nothing tonight": "Nada esta noite",
"Notifications": "Notificações",
"Notifications are disabled for PulseLoop in Android Settings.": "As notificações estão desativadas para o PulseLoop nas Configurações do Android.",
"Notifications are off for PulseLoop. Turn them on in Android Settings to get check-ins.": "As notificações estão desativadas para o PulseLoop. Ative-as nas Configurações do Android para receber check-ins.",
"Nutrition": "Nutrição",
Expand All @@ -1003,6 +1012,7 @@
"On until {0}/{1}: activity nudges paused, the coach eases off.": "Ativo até {0}/{1}: lembretes de atividade pausados, o Coach pega mais leve.",
"On. PulseLoop syncs your ring about every 30 minutes, even while the phone is idle.": "Ativado. O PulseLoop sincroniza seu anel a cada 30 minutos, mesmo com o celular ocioso.",
"Once per dose, at its time, for what you add in My Health → Medications & supplements.": "Uma vez por dose, no horário dela, para o que você adicionar em Minha saúde → Medicamentos e suplementos.",
"One tap for the usual ones": "Um toque para as de sempre",
"Only needed if you started the server with --api-key. Leave blank otherwise.": "Só é necessário se você iniciou o servidor com --api-key. Caso contrário, deixe em branco.",
"Only new data from now on": "Apenas dados novos daqui em diante",
"Only providers that don't retain data": "Apenas provedores que não retêm dados",
Expand Down Expand Up @@ -1032,6 +1042,7 @@
"Optional. The ring estimates glucose from your profile, not a real sensor. Enter a recent lab/meter reading (mg/dL) to offset the displayed value to match.": "Opcional. O anel estima a glicose a partir do seu perfil, não de um sensor de verdade. Informe uma leitura recente de laboratório/glicosímetro (mg/dL) para ajustar o valor exibido.",
"Other": "Outro",
"Other ideas": "Outras ideias",
"Other types, several at once, or earlier tonight": "Outros tipos, várias de uma vez ou mais cedo hoje à noite",
"Out of sync": "Fora de sincronia",
"Outdoor or treadmill runs": "Corridas ao ar livre ou na esteira",
"Output tokens": "Tokens de saída",
Expand Down Expand Up @@ -1062,6 +1073,7 @@
"Permission required": "Permissão obrigatória",
"Phases come only from the dates you log. PulseLoop doesn't predict fertile days, and this isn't contraception or a medical tool.": "As fases vêm só das datas que você registra. O PulseLoop não prevê dias férteis, e isto não é um método contraceptivo nem uma ferramenta médica.",
"Photo": "Foto",
"Photo, barcode or by hand": "Foto, código de barras ou à mão",
"Physiology": "Fisiologia",
"Pick the left and right PulseLoop metrics.": "Escolha as métricas do PulseLoop da esquerda e da direita.",
"Pick the number before the first drink. It's easier to keep a number you chose beforehand.": "Escolha o número antes da primeira dose. É mais fácil cumprir um número que você definiu antes.",
Expand Down Expand Up @@ -1347,12 +1359,14 @@
"Start an accuracy check": "Iniciar uma verificação de precisão",
"Start check-in": "Começar check-in",
"Start one manually when your ring misses an activity.": "Inicie um manualmente quando o anel não registrar uma atividade.",
"Start one now": "Comece um agora",
"Start time must be before end time.": "O horário de início deve ser anterior ao de término.",
"Start tracking": "Começar a monitorar",
"Start using PulseLoop": "Começar a usar o PulseLoop",
"Start with recommended targets. You can change these anytime.": "Comece com as metas recomendadas. Você pode alterá-las a qualquer momento.",
"Start: {0}": "Início: {0}",
"Started": "Iniciado",
"Started or ended today, or a past one": "Começou ou terminou hoje, ou uma anterior",
"Starts": "Início",
"Steady build": "Evolução constante",
"Step progress": "Progresso de passos",
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/com/pulseloop/service/GoalSync.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ object GoalSync {
if (edited.isNotEmpty()) setFollowing(context, edited, false)
}

/**
* Everything a hand-saved goal must do besides the database write, whichever screen saved it:
* stop the edited fields following the coach, send the step goal to the ring, and republish
* the widget's rings. Activity's goal dialog used to skip all three.
*/
fun afterManualSave(context: Context, saved: UserGoalEntity, coordinator: RingSyncCoordinator?) {
noteEdits(context, saved)
coordinator?.setGoal(saved.steps)
com.pulseloop.widgets.WidgetSnapshotPublisher.publish(context)
}

private fun lastApplied(context: Context): Map<Field, Double> {
val p = prefs(context)
return Field.entries.mapNotNull { f ->
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/pulseloop/ui/LaunchRequests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ object LaunchRequests {

/** Today's Workout chip: open the Activity tab with the workout-type picker up. */
val openWorkoutPicker = MutableStateFlow(false)

/** The app-wide "+ Log" sheet: open at this step, or closed when null. */
val openLog = MutableStateFlow<com.pulseloop.ui.screens.LogStep?>(null)
}
Loading
Loading