Reported as "le doy a cualquier actividad y solo me presenta los pasos de hoy… debiera presentarme una medida por hora, y no me da el histórico". Two separate things, and only one of them was the app's fault. **The history was the automation's setting.** With Date Range on its default (`Today`) every sync carries today and nothing else, so there is exactly one day in the file to draw. That is why a card looked frozen: not a rendering bug, a range that was never sent. The setup steps now say `Previous 7 Days` and say why. **The hours were thrown away by us.** Even when the phone sends 288 readings a day, the receiver folded every one of them into a single day aggregate, so "8,123 steps today" was all there could ever be — a number you cannot look into. Worse, the recommended setting was Time Grouping `Days`, which sends one point per metric per day: the intraday detail never arrived in the first place. The recommendation is now `Hours`, and the storage keeps the hours. The merge rule for them is the same shape as the day rule, for the same reason: a payload whose datapoints all sit on the hour is HAE's own hour grouping, and the hour *in progress* grows on every run of a five-minute automation, so it is replaced and never unioned — 500 + 900 + 1,340 steps in one hour is a number no watch recorded. The day is then recomputed as the sum of its hours, which is what keeps the card and the detail from ever disagreeing, and which also makes switching an automation from Days to Hours mid-day converge instead of double-count. Raw samples (real timestamps) still union by instant plus numbers, and they now land in their own hour, which is where intraday detail comes from when nothing is grouped. Three things that would have been silent bugs, caught while writing it: - The hour rule is decided from the **whole payload**, never from one timestamp. A five-minute automation produces samples that sit exactly on the hour, and reading one of those as an hour total wipes the hour it belongs to. There is a test with a 09:00:00 and a 09:05:00 sample in one payload, and it fails against the per-point version of the rule. - A day that arrived as a day total keeps its hours beside it, and a day stored before this existed keeps its aggregate when the first hour shows up — recomputing it from hours it does not have would delete 2,000 steps. Both are mutation-checked (removing either guard fails a test). - A payload grouped by hour writes the ledger row anyway, because a later payload with real minutes can describe the same instant and the union path can only see the ledger. Without it the raw-sample route test double-counts a single sample. The hours are the bulky part of this data, so they are kept for a week (the day aggregates still live the full 400 days), pruned when the night's file is written, and fetched one metric and one day at a time — `GET /api/vitals/hours`. A screen listing forty cards downloads none of them; the day view carries only a count per day, which is what tells the sheet whether it is worth asking. The sheet draws the hours, the days before it (tapping one moves the hour list to that day), and every field the watch sent; when the automation groups by Days it says so instead of leaving a gap where a chart should be. Coverage: 6 new tests in `api/test/vitals.test.js` (19 total) and a route test in `api/test/server-vitals.test.js` (5), the hour/history model in `vitals-view.test.js` (31), three render tests through the real sheet, the route documented in `api/openapi.yaml` and `website/api.html`, and `docs/HEALTH.md` with the settings, the new merge row and the two symptoms now in Troubleshooting.
KuentaGYM website
Source of the project website — plain hand-written HTML/CSS/JS, no build step, served as
static files. It is not part of any pipeline here: .gitea/workflows/ builds and pushes the
container images and nothing else, and this site is not deployed for this fork. Every page's
canonical and og: URLs assume it is served alongside the app at https://gym.dploy.lol.
Not in this folder (added when the pages are published):
img/— built bybuild-images.sh <dist>/img: the five screenshots from../assets/screenshots/as PNG plus WebP at 480/600/1170 px (served through<picture>),banner.png, andsocial.jpg(1200×630, the og:image on every page)icon-180.png/icon-512.png— copied from../frontend/public/(the same icons the PWA uses, so the browser tab, home screen and app all match)
There is no KuentaGYM.apk and no demo/ here. This fork publishes no APK, so the mobile
app is whatever you build from ../frontend yourself (see ../docs/MOBILE.md); there is no
public demo instance, so nothing is framed or linked as one. Both belonged to the upstream
project, and the sections and links that promised them are gone.
Navigation is a topic rail (.side): one title/subtitle list of everything on the
site, a fixed column beside the page from 1300 px up and the hamburger sheet below
that, with a scrollspy lighting the section under the reader. The top bar keeps
only the brand, the source repository and the "Get started" button.
site.js carries the pieces that are left, each failing soft so the page is complete
without any of them: the two panel controllers (header sheet, contents drawer), the
scrollspy and the chapter groups, the scroll reveals, the feature-rail arrows and the
hero intro handoff. It makes no third-party request. The repo star/issue counts, the
Discord member count and the About page's release timeline were removed with the upstream
links they belonged to: they read api.github.com and discord.com, which know nothing
about this fork's repository — and the About page's timeline is now static, marked up in
the HTML.
Every page starts with a "Skip to content" link (.skip, visible on focus) that
targets <main id="main">. Screenshots change under the same file name, and nginx
caches images for seven days — bump the name if a new one must show up at once.
api.html is the one generated file in here: node scripts/build-api-docs.mjs
rewrites it from ../api/openapi.yaml. Edit the spec, re-run the script, commit both —
never hand-edit api.html, the next run overwrites it. The page is static HTML in this
site's own design (no Swagger UI, nothing rendered at view time); the only script of its
own it carries is the contents drawer and the card expand/collapse.
api.htmlis generated — never edit it by hand. Its whole chrome (nav, nav sheet, contents rail, footer, the "Get started" button, the no-analytics comment, the cache-busters, the spec download link) lives inscripts/build-api-docs.mjs, outside this folder, which renders the page from../api/openapi.yaml. Change the generator, then re-runnode scripts/build-api-docs.mjs; anything typed intoapi.htmlis overwritten wholesale. Keep the four pages'?v=Nvalues in step whenstyles.cssorsite.jschanges — three pages carry their own tags, and the generator writes api.html's.
styles.css and site.js are cache-busted with ?v=N — nginx serves the site
with no-cache, must-revalidate, but the query bump is what saves a Cloudflare
edge from handing out an old stylesheet with new markup. Bump it on every change.