From 29b961c1b0b56905477c5037237eb8528f51b9f5 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Mon, 24 Aug 2026 12:59:52 +0000 Subject: [PATCH] Add meal gaps to the timing panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Meals have the same shape as the pee and poo intervals already shown here — gapsBetween() is type-agnostic, so it is two more rows and one more call. The window, the median-based "typical" and the em-dash empty state all come along unchanged. The heading drops "Bathroom", which stops being accurate once feeding is in the panel. data-panel stays "timing", so a collapsed panel stays collapsed across the rename. The hint keeps keying off pees: it is advice about when to take the puppy out, which meal spacing has nothing to say about. Only its empty-state text widens. --- src/app.js | 5 ++++- src/changelog.json | 1 + src/index.html | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index 57ea2c7..fbbc5c7 100644 --- a/src/app.js +++ b/src/app.js @@ -695,6 +695,7 @@ function renderTiming(events) { const peeGaps = gapsBetween(events, "pee"); const pooGaps = gapsBetween(events, "poo"); + const eatGaps = gapsBetween(events, "eat"); const show = (id, ms) => { document.getElementById(id).textContent = ms == null ? "—" : formatDuration(ms); }; @@ -702,6 +703,8 @@ show("gap-pee-min", peeGaps[0] ?? null); show("gap-poo", median(pooGaps)); show("gap-poo-min", pooGaps[0] ?? null); + show("gap-eat", median(eatGaps)); + show("gap-eat-min", eatGaps[0] ?? null); const hint = document.getElementById("timing-hint"); const typicalPee = median(peeGaps); @@ -710,7 +713,7 @@ `Based on ${peeGaps.length} pee gap${peeGaps.length === 1 ? "" : "s"}. ` + `Aim to take the puppy out a little before the typical ${formatDuration(typicalPee)} mark.`; } else { - hint.textContent = "Log a few more pees and poos to see typical timings."; + hint.textContent = "Log a few more pees, poos and meals to see typical timings."; } } diff --git a/src/changelog.json b/src/changelog.json index 010f99a..5ac85ca 100644 --- a/src/changelog.json +++ b/src/changelog.json @@ -1,4 +1,5 @@ [ + { "date": "2026-08-24", "text": "The timing panel now covers meals too — typical and shortest time between them, alongside the pee and poo gaps — so you can see the feeding rhythm the same way. It is titled just “Timing” now that it is no longer only about bathroom breaks" }, { "date": "2026-08-24", "text": "The “By hour of day” chart is now tappable: tap any block to read what it counts (“3 meals between 07:00 and 08:00”) just under the chart — until now that number only showed as a hover tooltip, which phones never get. The block you tapped gets a ring; tap it again to clear it" }, { "date": "2026-08-21", "text": "The sleep timer pill in the day bar — the one that appears once you've scrolled past the big timer — is now tappable: tap it while the puppy is asleep to log the wake-up, or while awake to log a sleep start, without scrolling back up to the buttons" }, { "date": "2026-08-20", "text": "Added reminders: turn them on in Settings and your phone gets a notification when it's time to sleep (\"Awake for 45 min\") or when there's been no pee, poo or meal for a while. Each one has its own interval, they arrive even with the app closed, and they stay quiet while the puppy is logged as asleep so you're not nagged all night. On iPhone, add Puppy Tracker to your Home Screen first — iOS only allows notifications for installed apps" }, diff --git a/src/index.html b/src/index.html index 9579e9a..e2d24ce 100644 --- a/src/index.html +++ b/src/index.html @@ -170,12 +170,14 @@
-

Bathroom timing (last 7 days)

+

Timing (last 7 days)

Typical time between pees
Shortest between pees
Typical time between poos
Shortest between poos
+
Typical time between meals
+
Shortest between meals