From 8d190bb59190c4561dce89c0cc531f43b1b17206 Mon Sep 17 00:00:00 2001 From: Daniel Santillan Date: Wed, 23 Sep 2026 10:23:31 -0400 Subject: [PATCH] Salud moves to Home's header: a sixth tab pushed Start off centre MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tab bar is a flex row of equal columns with the Start button raised in the middle, so the tab count has to stay odd. Adding Salud as a sixth pushed that disc half a column to the right, and it read immediately as "the button moved" — the app's primary action is the one thing in the bar that must not drift. Salud is now the heart button in Home's header, next to the gear, with the same destination and the same route (/health). It is reachable from Settings → Data as well, which was already there. The tab bar is back to five: Home, Plan, Start, Stats, Exercises. Two tests, because this is the kind of change that regresses silently: TabBar.test.jsx asserts the odd count and that the raised button is the middle child (plus that no tab points at /health), and Home.health-door.test.jsx asserts the heart sits in the same non-shrinking container as the gear and navigates to /health — if that breaks, the screen is only reachable from Settings, where nobody looks for it. Also: the Comments in Home, TabBar, README, CHANGELOG and docs/HEALTH.md now say where Salud is, and one test assertion checks flexGrow/flexShrink rather than the `flex: none` shorthand — the CSSOM rewrites that to `0 0 auto`, which is what the first version of the test tripped over. --- CHANGELOG.md | 3 +- README.md | 2 +- docs/HEALTH.md | 7 ++- frontend/src/components/TabBar.jsx | 8 ++- frontend/src/components/TabBar.test.jsx | 58 ++++++++++++++++++++ frontend/src/views/Home.health-door.test.jsx | 51 +++++++++++++++++ frontend/src/views/Home.jsx | 9 ++- 7 files changed, 129 insertions(+), 9 deletions(-) create mode 100644 frontend/src/components/TabBar.test.jsx create mode 100644 frontend/src/views/Home.health-door.test.jsx diff --git a/CHANGELOG.md b/CHANGELOG.md index b2a9df1..a56812c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## Sin publicar — Apple Health (Salud) -A new **Salud** tab, next to Plan, and an endpoint behind it. An iOS automation in *Health Auto +A new **Salud** screen, opened from the heart button in Home's header (next to the gear — the tab +bar keeps its five tabs so the raised Start button stays centred), and an endpoint behind it. An iOS automation in *Health Auto Export* POSTs Apple Health to your profile and the data shows up as read-only cards: steps, heart rate, sleep, weight, oxygen, workouts, and every other metric HAE can export — including ones this fork has never heard of, which land under **Other** with a humanised name and a detail sheet listing diff --git a/README.md b/README.md index 7fb3887..d11bd7d 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ as a home-screen app, passkey sign-in, offline support, sync across your phone a - 🎨 **Designed, not assembled** — light/dark themes and 8 accent colors saved to your profile, over a hand-drawn icon set instead of emoji, so it looks the same on every phone - 🌍 **14 languages** — full UI translation (EN, DE, ES, FR, IT, PT (Portugal), PT (Brazil), PL, TR, RU, ZH, KO, HI, TH, HU); exercise instructions localized in 12 of them and built-in exercise names shown bilingually in PT-BR and HU, all loaded on demand so the app stays fast - 📥 **Bring your history with you** — import from **FitNotes** (Android and iOS), **Strong** and **Hevy** (CSV or directly with a [Hevy Pro API key](https://hevy.com/settings?developer)), or body weight straight out of an **Apple Health** export. Exercise names are matched against the library and anything unrecognised becomes one of your own exercises, so nothing in the file is dropped -- ❤️ **Salud: your Apple Health, live** — a **Salud** tab draws whatever your iPhone reports: steps, heart rate, sleep, weight, oxygen, workouts and every other metric Health Auto Export can send, as cards with trends over 7/30/90/365 days. Per profile and private by construction — each profile mints its own **write-only** ingest key, the phone's data lands in its own file, and re-sends are de-duplicated, so an automation firing every five minutes never counts a day twice. See [docs/HEALTH.md](docs/HEALTH.md) +- ❤️ **Salud: your Apple Health, live** — a **Salud** screen (the heart button in Home's header) draws whatever your iPhone reports: steps, heart rate, sleep, weight, oxygen, workouts and every other metric Health Auto Export can send, as cards with trends over 7/30/90/365 days. Per profile and private by construction — each profile mints its own **write-only** ingest key, the phone's data lands in its own file, and re-sends are de-duplicated, so an automation firing every five minutes never counts a day twice. See [docs/HEALTH.md](docs/HEALTH.md) - 📦 **Yours to keep** — one-tap JSON export/import, guest mode, **no telemetry**; switching kg ↔ lb offers to convert every stored number - 🤖 **Ask an AI about your training** (optional) — an [MCP server](mcp/README.md) lets a client like Claude Desktop or Cursor read your history in your own words: *"what did I bench last week?"*. Read-only, spawned locally by the client, nothing leaves your box. Not in the Docker build — if you don't use an AI assistant, it isn't there - 🧠 **An AI coach that writes your plan** (optional, off by default) — answer a handful of questions and it designs a week of routines; later it reads what you actually logged and proposes changes, each one with the evidence behind it. You approve every change and can undo it. It runs on **your** server under **your** provider account — Anthropic, OpenAI, Gemini or any OpenAI-compatible endpoint (Ollama on your LAN counts) with a pasted API key on the default image, or the Claude Agent SDK / Codex CLI on a separate build. The phone app can use your instance or its own key. See [docs/AI_COACH.md](docs/AI_COACH.md) diff --git a/docs/HEALTH.md b/docs/HEALTH.md index ea5e02c..8257ba0 100644 --- a/docs/HEALTH.md +++ b/docs/HEALTH.md @@ -3,9 +3,10 @@ KuentaGYM does not read Apple Health. Your iPhone posts it. An iOS automation in [Health Auto Export](https://www.healthexportapp.com/) (HAE) reads Apple -Health and POSTs its JSON export to your KuentaGYM profile. The **Salud** tab draws whatever -arrived, as read-only cards; `api/vitals.js` does the arithmetic; `frontend/src/lib/vitals-view.js` -decides which number each card shows. +Health and POSTs its JSON export to your KuentaGYM profile. The **Salud** screen — the heart button +in Home's header, next to the gear: the tab bar keeps its five tabs so its raised Start button stays +centred — draws whatever arrived, as read-only cards; `api/vitals.js` does the arithmetic; +`frontend/src/lib/vitals-view.js` decides which number each card shows. Nothing here is an input. There is no way to type a step count into this screen, and the workouts the watch records are shown as a list rather than merged into your workout history — they carry no diff --git a/frontend/src/components/TabBar.jsx b/frontend/src/components/TabBar.jsx index 0c82241..c0ecc9c 100644 --- a/frontend/src/components/TabBar.jsx +++ b/frontend/src/components/TabBar.jsx @@ -32,9 +32,11 @@ export default function TabBar({ onStart }) {