From 990a79a1d2f7c67fffad4a6686b70bb529bb72f8 Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Sun, 22 Nov 2026 09:29:06 +0100 Subject: [PATCH] feat(web): fewer explaining words on the box's page A tester found explaining text everywhere. On the Plan page two of every three words explained instead of showed. Drop the sentence under each page title, the plan chart's paragraph, the help report's blurb and the History cards' blurbs. Shorten the planning style captions, the export permission and the sun lines; the sun line now speaks only while the plan holds spare sun back. Say nothing when nothing adjusts the plan. Move the planner's workings to the Advanced view and let the plan's cells fill the row they have. Add the rule to AGENTS.md: a screen shows facts, and explains only when something is off or one tap away. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Fredrik Ahlgren --- .changeset/fewer-words-on-the-box-page.md | 16 +++++++ AGENTS.md | 3 ++ web/app.css | 49 ++++++-------------- web/app.js | 4 +- web/dashboard-simplification.test.mjs | 13 ++++-- web/energy-history-integration.test.mjs | 2 +- web/energy-history.js | 2 +- web/energy-today.js | 2 +- web/ev-plan.js | 4 +- web/index.html | 30 +++--------- web/mobile-information-architecture.test.mjs | 2 +- web/mode-picker.test.mjs | 4 +- web/plan-brief.js | 6 ++- web/plan-brief.test.mjs | 2 +- web/plan-prefs.js | 28 ++++++----- web/plan-prefs.test.mjs | 23 +++++---- web/plan.js | 24 ++++++---- 17 files changed, 101 insertions(+), 113 deletions(-) create mode 100644 .changeset/fewer-words-on-the-box-page.md diff --git a/.changeset/fewer-words-on-the-box-page.md b/.changeset/fewer-words-on-the-box-page.md new file mode 100644 index 000000000..91a873787 --- /dev/null +++ b/.changeset/fewer-words-on-the-box-page.md @@ -0,0 +1,16 @@ +--- +"ftw": patch +--- + +The box's page reads shorter. A tester found explaining text everywhere. +On the Plan page two of every three words explained instead of showed. + +The pages lose the sentence under each title and the cards in History lose +theirs. The Plan page loses the paragraph over the chart (tomorrow's price +time moved into the "?" help), the help report's blurb and "Safety limits +are the same in every style". The style captions, the export permission and +the sun lines are shorter, and the sun line speaks only while the plan holds +spare sun back. "No active safety adjustment" no longer shows when nothing +adjusts. The planner's workings (mode, horizon, slots, solver, DP shadow, +start SoC and the Planner cell) show in the Advanced view. The words on the +Plan page fall from 341 to 172 in the simple view. diff --git a/AGENTS.md b/AGENTS.md index fa623043a..4c07bfd9e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,6 +21,9 @@ and agents to assess and continue. See [CONTRIBUTING.md](CONTRIBUTING.md). handling its stored state; hidden configuration must not keep steering a site. - Make request, acceptance, command, device response and measured effect distinct. Show freshness and failures in the normal experience. +- A screen shows facts. Explain only when something is off, or one tap + away; cut a sentence that says what the screen already shows (xorath, + 21 November 2026). - Treat useful cold start, simple charging, notifications, recovery and analysis by agents as parts of the product, not optional polish. - Default battery wear cost is zero. Include charge/discharge efficiency. diff --git a/web/app.css b/web/app.css index 6302d3985..408c9a549 100644 --- a/web/app.css +++ b/web/app.css @@ -54,10 +54,6 @@ body.ftw-app .view-heading h2 { font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.025em; } -body.ftw-app .view-heading > p:last-child { - max-width: 62ch; - color: var(--fg-dim); -} body.ftw-app .view-kicker { color: var(--accent-e); font-family: var(--mono); @@ -259,10 +255,6 @@ body.ftw-app .overview-heading p { body.ftw-app .overview-heading h2 { margin-top: 3px; } -body.ftw-app .overview-heading > div:first-child > p:last-child { - max-width: 62ch; - color: var(--fg-dim); -} /* Direct child of the 12-column Overview grid: span the row or the card occupies one column and the copy wraps a word per line. */ @@ -683,6 +675,8 @@ body.ftw-app .overview-plan-constraint { margin-top: 4px; color: var(--fg-muted); } +body.ftw-app .overview-plan-constraint:empty, +body.ftw-app #plan-constraint:empty { display: none; } body.ftw-app .overview-detail-link { align-self: flex-start; margin-top: auto; @@ -1301,6 +1295,7 @@ body.ftw-app .plan-style-note { color: var(--fg-dim); } body.ftw-app .plan-style-note .btn-link { + padding-left: 0; font-family: var(--sans); font-size: 13px; } @@ -1788,19 +1783,21 @@ body.ftw-app .plan-now-secondary > div { flex-direction: column; gap: 2px; } +/* One column per shown cell: Expected charge goes without a battery and + Planner shows in the Advanced view only. The first cell always shows. */ body.ftw-app .plan-now-meta { display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-auto-flow: column; + grid-auto-columns: minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); } body.ftw-app .plan-now-meta > div { min-width: 0; padding: 9px 16px 11px; - border-right: 1px solid var(--line); } -body.ftw-app .plan-now-meta > div:last-child { - border-right: 0; +body.ftw-app .plan-now-meta > div + div { + border-left: 1px solid var(--line); } body.ftw-app .plan-now-meta dt { margin: 0 0 3px; @@ -1895,14 +1892,6 @@ body.ftw-app .plan-warning-details > pre { white-space: pre-wrap; overflow-wrap: anywhere; } -body.ftw-app .plan-help { - font-family: var(--sans); - font-size: 12px; - line-height: 1.5; - color: var(--fg-muted); - margin: 6px 0 4px; - max-width: 68ch; -} body.ftw-app .plan-actions { gap: 10px; display: flex; align-items: center; } /* The "why is it doing that?" escape hatch, below the chart because @@ -1919,15 +1908,6 @@ body.ftw-app .plan-help-request button[disabled] { cursor: default; text-decoration: none; } -body.ftw-app .plan-help-request small { - display: block; - font-family: var(--sans); - font-size: 11px; - line-height: 1.5; - color: var(--fg-muted); - margin-top: 2px; - max-width: 68ch; -} body.ftw-app .more-actions { display: grid; @@ -2710,9 +2690,6 @@ body.ftw-app .diagnose-detail { grid-column: 1; align-items: start; } - body.ftw-app .overview-heading > div:first-child > p:last-child { - display: none; - } body.ftw-app .overview-health { padding-top: 4px; } @@ -2958,15 +2935,15 @@ body.ftw-app .diagnose-detail { text-align: left; } body.ftw-app .plan-now-meta { + grid-auto-flow: row; grid-template-columns: 1fr; } body.ftw-app .plan-now-meta > div { padding: 9px 12px; - border-right: 0; - border-bottom: 1px solid var(--line); } - body.ftw-app .plan-now-meta > div:last-child { - border-bottom: 0; + body.ftw-app .plan-now-meta > div + div { + border-left: 0; + border-top: 1px solid var(--line); } body.ftw-app .plan-actions { align-items: stretch; flex-wrap: wrap; } body.ftw-app .more-actions { grid-template-columns: 1fr; } diff --git a/web/app.js b/web/app.js index e98bab371..fd6560f65 100644 --- a/web/app.js +++ b/web/app.js @@ -1095,7 +1095,7 @@ var mismatch = qualities.indexOf("balance_mismatch") >= 0; var partial = mismatch || qualities.indexOf("incomplete") >= 0; qualityNote.hidden = !partial; - qualityNote.textContent = mismatch ? "Measurements do not balance. Home use is unknown for those samples." : "Some measurements are missing. Working devices keep recording; gaps are unknown."; + qualityNote.textContent = mismatch ? "Measurements do not balance. Home use is unknown for those samples." : "Some measurements are missing."; } // Forward-looking forecast: at least 15 minutes so the transition // from actual→predicted is smooth. For longer ranges, use half the @@ -3009,7 +3009,7 @@ text = "No charging plan yet. Set a ready time, or choose Charge now."; tone = "var(--text)"; } else { - text = "No charge window yet for this goal. Choose Charge now if you need to charge immediately."; + text = "No charge window yet. Choose Charge now to charge at once."; } if (lp.plan_pending && !lp.manual_active && text && text.indexOf("Updating the charging plan") < 0) text += " Updating the charging plan…"; if (lp.manual_save_error) text = (text ? text + " " : "") + "This choice is active now, but could not be saved for restart. FTW is retrying."; diff --git a/web/dashboard-simplification.test.mjs b/web/dashboard-simplification.test.mjs index 2cc31b01a..6be812cca 100644 --- a/web/dashboard-simplification.test.mjs +++ b/web/dashboard-simplification.test.mjs @@ -230,10 +230,15 @@ describe("simplified dashboard overview", () => { }); it("keeps the mobile primary answers above the fixed destination bar", () => { - assert.match( - css, - /\.overview-heading > div:first-child > p:last-child \{\s*display: none;/, - ); + const headings = html.match(/
[\s\S]*?<\/section>/g) || []; + assert.ok(headings.length >= 5, "every view keeps its heading"); + for (const heading of headings) { + assert.doesNotMatch( + heading.replace(/

[^<]*<\/p>/, ""), + /

/, + "a view heading is a title, not a paragraph explaining the page", + ); + } assert.match( css, /\.summary-card \{[\s\S]*?min-height: 44px;[\s\S]*?padding: 3px 10px;/, diff --git a/web/energy-history-integration.test.mjs b/web/energy-history-integration.test.mjs index 25310464a..7c56be084 100644 --- a/web/energy-history-integration.test.mjs +++ b/web/energy-history-integration.test.mjs @@ -87,7 +87,7 @@ test('main History uses daily totals while raw ledger stays a troubleshooting vi assert.match(source, /Used at home/); assert.match(source, /calculateEVChargeCost/); assert.match(source, /total_ore_kwh/); - assert.match(html, /Based on FTW’s configured spot price, network tariff and VAT/); + assert.match(html, /At the spot price, grid fee and VAT set in FTW/); assert.match(source, /Made by solar/); assert.match(source, /Bought from grid/); assert.match(source, /Sent to grid/); diff --git a/web/energy-history.js b/web/energy-history.js index 894cb24fe..2d8caf154 100644 --- a/web/energy-history.js +++ b/web/energy-history.js @@ -273,7 +273,7 @@ var comparison = totalLoad > 0 ? Math.round(totalPV / totalLoad * 100) : 0; target.innerHTML = '

What stands out

' + (recordingGaps(days) ? '

Some periods were not recorded. Totals cover recorded periods only.

' : '') + - (days.some(function (day) { return day.history_quality === 'estimated'; }) ? '

Home use includes estimates for brief measurement gaps or imbalances.

' : '') + '
    ' + + (days.some(function (day) { return day.history_quality === 'estimated'; }) ? '

    Home use includes estimates.

    ' : '') + '
      ' + '
    • Solar made ' + comparison + '% as much energy as the home used.
    • ' + '
    • Best solar day was ' + escapeHtml(formatDay(bestSolar.day)) + ' at ' + formatKWh(bestSolar.pv_wh) + '.
    • ' + diff --git a/web/energy-today.js b/web/energy-today.js index 4b37e2ed0..e0e3e1fb2 100644 --- a/web/energy-today.js +++ b/web/energy-today.js @@ -56,5 +56,5 @@ export function updateEnergyToday(today, root = document) { note.textContent = today ? "Gaps in today's readings. ≥ shows recorded energy only." : "Today's energy is not available yet."; - if (estimated) note.textContent = (incomplete ? note.textContent + " " : "") + "Home use includes estimates for brief balance failures."; + if (estimated) note.textContent = (incomplete ? note.textContent + " " : "") + "Home use includes estimates."; } diff --git a/web/ev-plan.js b/web/ev-plan.js index 82885a898..3a5aa68e5 100644 --- a/web/ev-plan.js +++ b/web/ev-plan.js @@ -98,15 +98,13 @@ export function createChargingTimeline(doc = document) { const list = node('div', 'ev-plan-windows', el); const more = node('details', 'ev-plan-more', el); const summary = node('summary', '', more), rest = node('div', 'ev-plan-windows', more); - const note = node('small', 'ev-timeline-note', el); - note.textContent = 'Planned charging · times can change as FTW replans.'; return { el, update(lp, { start = Date.now(), end = start + 24 * 3600000, label = 'Next 24 hours' } = {}) { const data = chargingPlan(lp, start, end); title.textContent = label; energy.textContent = data.windows.length ? `${data.approximate ? '≈ ' : ''}${(data.wh / 1000).toFixed(1)} kWh` : ''; message.textContent = data.message; message.hidden = !data.message; graphic.hidden = !data.windows.length; list.hidden = !data.windows.length; - note.hidden = !data.windows.length; more.hidden = data.windows.length <= 2; + more.hidden = data.windows.length <= 2; track.replaceChildren(); ticks.replaceChildren(); list.replaceChildren(); rest.replaceChildren(); for (let i = 0; i <= 4; i++) { const tick = node('span', '', ticks), ts = start + (end - start) * i / 4; diff --git a/web/index.html b/web/index.html index a480e22dc..0ddf47a4d 100644 --- a/web/index.html +++ b/web/index.html @@ -150,7 +150,6 @@

      Restart required

      Overview

      Your home, right now

      -

      Live power, today’s price and the next safe action.

      @@ -237,7 +236,7 @@

      What FTW does next

      Reading the current plan —

      Waiting for planner state.

      -

      Safety limits remain active.

      +

      Open full plan @@ -516,7 +515,7 @@

      Plan

      Why —
      - No active limit reported +
      @@ -533,7 +532,7 @@

      Plan

      —
      -
      +
      Planner
      — @@ -571,7 +570,6 @@

      Plan

      - Safety limits are the same in every style.

      @@ -586,9 +584,9 @@

      Plan

      -

      Solar can still export when this is off. Check your electricity contract.

      +

      Solar still exports when this is off.

      @@ -616,11 +614,6 @@

      Plan

      -

      - Schedule for the home battery and cars, as far ahead as electricity prices are published, updated every few minutes. - Tomorrow’s prices usually arrive around 13:00. Each bar is a 15-minute slot. - Hover any slot for the full breakdown. The dashed vertical line marks “now”. -

      @@ -645,7 +638,6 @@

      Plan

      - One file describing what FTW is doing and why, with the logs behind it. Share it when asking for help.
@@ -702,7 +694,6 @@

Calibration

Energy

Live energy detail

-

Start with current power, then inspect today’s totals, prices and the last 24 hours.

@@ -710,7 +701,6 @@

Live energy detail

Plan

What FTW will do next

-

The active schedule, its inputs and the limits that shape it.

@@ -719,12 +709,10 @@

What FTW will do next

History

Your energy, day by day

-

See how much the home used, produced, bought and sold.

Last 7 days

-

Daily totals from the same readings used by Energy today.

@@ -737,7 +725,7 @@

Last 7 days

EV charging — energy and cost

-

Based on FTW’s configured spot price, network tariff and VAT.

+

At the spot price, grid fee and VAT set in FTW.

@@ -749,7 +737,6 @@

EV charging — energy and cost

Energy by day

-

Compare home use and solar with energy bought from or sold to the grid.

@@ -766,7 +753,6 @@

What stands out

Devices, data quality and export - Use this when checking a meter or downloading source data Open @@ -823,7 +809,6 @@

What stands out

Past plan decisions - Technical detail for inspecting an earlier schedule Open @@ -867,7 +852,6 @@

Plan decisions

More

Setup, settings and system

-

Configure FTW, see its version or open advanced operational details.