diff --git a/src/app.js b/src/app.js index 9b50f5f..aba96a8 100644 --- a/src/app.js +++ b/src/app.js @@ -664,19 +664,6 @@ .map(w => ({ start: w.start, end: w.end, ongoing: w.ongoing && today })); } - // Rough age-based walking guideline (the widely used "five-minute rule"): - // about 5 minutes per month of age per walk, twice a day, until the puppy is - // grown. Returns null without a birthday or once it's a year old, the same - // way sleepTargetFor bows out. - function walkTargetFor(birthday) { - const a = ageParts(birthday); - if (!a || a.months >= 12) return null; - // Under a month of counted age the rule has nothing to say yet; treat it - // as one "month" so the advice stays a short outing rather than zero. - const months = Math.max(1, a.months); - return { perWalk: months * 5, walks: 2, total: months * 10 }; - } - // ---------- rendering ---------- const dayPicker = document.getElementById("day-picker"); const eventList = document.getElementById("event-list"); @@ -1762,7 +1749,7 @@ }; } - function drawWalkTrendChart(curves, target) { + function drawWalkTrendChart(curves) { const svg = document.getElementById("chart-walk-trend"); if (!svg) return; const W = 320, H = 180; @@ -1777,12 +1764,7 @@ { pts: curves.today, cls: "wtrend-today", label: curves.dayLabel }, ].filter(s => s.pts && s.pts.length > 1); - // The axis has to reach the goal even on a day that fell well short of it, - // or the line it is measured against would sit off the top of the chart. - const rawMax = Math.max( - target ? target.total : 0, - ...series.flatMap(s => s.pts.map(p => p.y)), - ); + const rawMax = Math.max(...series.flatMap(s => s.pts.map(p => p.y))); const { yMax, steps } = niceAxisLinear(rawMax); // Minutes are linear all the way down, so no split axis: the sleep trend // stretches its top because the interesting hours cluster near a 16h goal, @@ -1804,16 +1786,6 @@ parts.push(`${pad2(hr)}`); } - // The five-minute rule as one line rather than a band: it is a target to - // reach, with no upper bound a band would imply. - if (target) { - const y = yOf(Math.min(target.total, yMax)); - parts.push( - `` + - `${escapeText(`Goal ~${target.total} min (${target.perWalk} min × ${target.walks})`)}` - ); - } - for (const s of series) { const d = s.pts .map((p, i) => `${i === 0 ? "M" : "L"}${xOf(p.x).toFixed(1)} ${yOf(p.y).toFixed(1)}`) @@ -1830,22 +1802,11 @@ function renderWalkTrend(events) { const curves = walkTrendCurves(events); - const target = walkTargetFor(loadConfig().birthday); - drawWalkTrendChart(curves, target); + drawWalkTrendChart(curves); const chip = (id) => document.getElementById(id); const mins = (pts) => `${Math.round(pts[pts.length - 1].y)} min`; - // With no projection to carry it, the ✓ goes on today's own chip: the goal - // is a total for the day, so today's line is what meets it or doesn't. - let mark = ""; - if (target) { - const done = curves.today[curves.today.length - 1].y >= target.total; - mark = done ? " ✓" : ""; - chip("legend-wtrend-today-text").parentElement.title = done - ? "Past the walking goal for this age" - : `Goal is about ${target.total} min a day at this age`; - } - chip("legend-wtrend-today-text").textContent = `${curves.dayLabel} ${mins(curves.today)}${mark}`; + chip("legend-wtrend-today-text").textContent = `${curves.dayLabel} ${mins(curves.today)}`; const yLegend = chip("legend-wtrend-yesterday"); yLegend.hidden = !curves.yesterday; @@ -1857,11 +1818,6 @@ if (curves.avg) { chip("legend-wtrend-avg-text").textContent = `${curves.avgDays}-day avg ${mins(curves.avg)}`; } - const gLegend = chip("legend-wtrend-goal"); - gLegend.hidden = !target; - if (target) { - chip("legend-wtrend-goal-text").textContent = `Goal ~${target.total} min`; - } } // Which heatmap block is focused, remembered across re-renders so a background diff --git a/src/changelog.json b/src/changelog.json index 64a282e..e1c4b45 100644 --- a/src/changelog.json +++ b/src/changelog.json @@ -1,4 +1,5 @@ [ + { "date": "2026-09-01", "text": "Removed the walking goal from the Walk trend — the dashed target line, its legend chip and the ✓ that marked a day as met. It came from the “five-minute rule” (five minutes per month of age, twice a day), which is a widely repeated rule of thumb rather than veterinary guidance, and the app was stating it more confidently than it deserved. The chart is now just a record of what you walked, against yesterday and the average" }, { "date": "2026-09-01", "text": "The 7d / 14d / 30d buttons have moved out of the Sleep panel onto their own “Charts cover” row, just under the Log event buttons. They always set the window for every chart on the page — training, timing, sleep, walks, pees/poos/meals — but sitting inside the Sleep panel made them look like a sleep setting" }, { "date": "2026-09-01", "text": "Dropped the “Darker = more sessions that day” caption under the training consistency grid. Tapping a cell still opens that day" }, { "date": "2026-09-01", "text": "Dropped two hint lines: the “Based on N pee gaps…” sentence under the Timing charts, and the “Rule of thumb at this age…” one in the Walks panel. The charts above them already say it. The age-based walking goal is still there, drawn as the goal line on the Walk trend" }, diff --git a/src/index.html b/src/index.html index e70f2a4..a4c4b20 100644 --- a/src/index.html +++ b/src/index.html @@ -313,12 +313,11 @@ diff --git a/src/style.css b/src/style.css index fbafdef..51c2361 100644 --- a/src/style.css +++ b/src/style.css @@ -1173,16 +1173,9 @@ input.switch:checked::after { transform: translateX(18px); } fill: none; opacity: 0.85; } -.chart-svg .wtrend-goal { - stroke: var(--walk); - stroke-width: 1.5; - stroke-dasharray: 2 3; - opacity: 0.55; -} .lg.wtrend-today .sw { background: var(--walk); } .lg.wtrend-yesterday .sw { background: var(--eat); } .lg.wtrend-avg .sw { background: var(--weight); } -.lg.wtrend-goal .sw { background: color-mix(in srgb, var(--walk) 45%, var(--surface)); } .lg[hidden] { display: none; } .chart-svg .hm-cell { stroke: none; }