Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/fewer-words-on-the-box-page.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
49 changes: 13 additions & 36 deletions web/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.";
Expand Down
13 changes: 9 additions & 4 deletions web/dashboard-simplification.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(/<section class="view-heading[^"]*">[\s\S]*?<\/section>/g) || [];
assert.ok(headings.length >= 5, "every view keeps its heading");
for (const heading of headings) {
assert.doesNotMatch(
heading.replace(/<p class="view-kicker">[^<]*<\/p>/, ""),
/<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;/,
Expand Down
2 changes: 1 addition & 1 deletion web/energy-history-integration.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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/);
Expand Down
2 changes: 1 addition & 1 deletion web/energy-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
var comparison = totalLoad > 0 ? Math.round(totalPV / totalLoad * 100) : 0;
target.innerHTML = '<h3>What stands out</h3>' +
(recordingGaps(days) ? '<p>Some periods were not recorded. Totals cover recorded periods only.</p>' : '') +
(days.some(function (day) { return day.history_quality === 'estimated'; }) ? '<p>Home use includes estimates for brief measurement gaps or imbalances.</p>' : '') + '<ul>' +
(days.some(function (day) { return day.history_quality === 'estimated'; }) ? '<p>Home use includes estimates.</p>' : '') + '<ul>' +
'<li>Solar made <strong>' + comparison + '%</strong> as much energy as the home used.</li>' +
'<li>Best solar day was <strong>' + escapeHtml(formatDay(bestSolar.day)) + '</strong> at ' +
formatKWh(bestSolar.pv_wh) + '.</li>' +
Expand Down
2 changes: 1 addition & 1 deletion web/energy-today.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}
4 changes: 1 addition & 3 deletions web/ev-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
30 changes: 7 additions & 23 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ <h2>Restart required</h2>
<div>
<p class="view-kicker">Overview</p>
<h2>Your home, right now</h2>
<p>Live power, today’s price and the next safe action.</p>
</div>
<div class="overview-health" id="overview-health" aria-live="polite">
<span class="overview-health-dot" aria-hidden="true"></span>
Expand Down Expand Up @@ -237,7 +236,7 @@ <h2 id="overview-plan-title">What FTW does next</h2>
<strong class="overview-plan-action" id="overview-plan-action">Reading the current plan</strong>
<span class="overview-plan-time" id="overview-plan-time">—</span>
<p class="overview-plan-reason" id="overview-plan-reason">Waiting for planner state.</p>
<p class="overview-plan-constraint" id="overview-plan-constraint">Safety limits remain active.</p>
<p class="overview-plan-constraint" id="overview-plan-constraint"></p>
<p class="overview-plan-soc" id="overview-plan-soc" hidden></p>
<div id="overview-ev-plans" hidden></div>
<a class="overview-detail-link" href="#plan">Open full plan <span aria-hidden="true">→</span></a>
Expand Down Expand Up @@ -516,7 +515,7 @@ <h2>Plan</h2>
<span class="plan-now-label">Why</span>
<strong id="plan-main-reason">—</strong>
</div>
<small id="plan-constraint">No active limit reported</small>
<small id="plan-constraint"></small>
</div>
<dl class="plan-now-meta">
<div>
Expand All @@ -533,7 +532,7 @@ <h2>Plan</h2>
<small id="plan-soc-detail">—</small>
</dd>
</div>
<div>
<div class="advanced-only">
<dt>Planner</dt>
<dd>
<strong id="plan-solver-state">—</strong>
Expand Down Expand Up @@ -571,7 +570,6 @@ <h2>Plan</h2>
<p id="plan-style-extra" class="plan-style-extra" hidden></p>
<p class="plan-style-note">
<span id="plan-style-fine" hidden></span>
Safety limits are the same in every style.
<button type="button" class="btn-link" id="plan-style-settings">Fine-tune in Settings</button>
</p>
<p id="plan-style-status" class="plan-style-status" role="status" hidden></p>
Expand All @@ -586,9 +584,9 @@ <h2>Plan</h2>
</div>
<label id="plan-export-row" class="plan-export-row" hidden>
<input type="checkbox" id="plan-export-check">
<span>Allow the battery to sell to the grid when the plan expects a worthwhile sale.</span>
<span>Let the battery sell to the grid when it pays.</span>
</label>
<p class="plan-export-help">Solar can still export when this is off. Check your electricity contract.</p>
<p class="plan-export-help">Solar still exports when this is off.</p>
<p id="plan-export-unknown" class="plan-export-unknown" hidden>Not checked — battery export stays off.</p>
</div>
<p id="plan-export-sentence" class="plan-export-sentence"></p>
Expand Down Expand Up @@ -616,11 +614,6 @@ <h2>Plan</h2>
</div>
<div class="mode-buttons mode-buttons-advanced" id="mode-buttons" style="display:none"></div>
</div>
<p class="plan-help">
Schedule for the home battery and cars, as far ahead as electricity prices are published, updated every few minutes.
Tomorrow&rsquo;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 &ldquo;now&rdquo;.
</p>
<div class="chart-container">
<canvas id="plan-chart" width="800" height="260"></canvas>
</div>
Expand All @@ -645,7 +638,6 @@ <h2>Plan</h2>
<button type="button" id="plan-help-report" class="btn-link">
Something looks wrong? Download a help report
</button>
<small>One file describing what FTW is doing and why, with the logs behind it. Share it when asking for help.</small>
</div>
</section>
</section>
Expand Down Expand Up @@ -702,15 +694,13 @@ <h2 style="font-size:0.9rem;color:var(--text-dim)">Calibration</h2>
<section class="view-heading">
<p class="view-kicker">Energy</p>
<h2>Live energy detail</h2>
<p>Start with current power, then inspect today’s totals, prices and the last 24 hours.</p>
</section>
</main>

<main id="view-plan" class="app-view hidden" role="tabpanel" aria-label="Plan">
<section class="view-heading">
<p class="view-kicker">Plan</p>
<h2>What FTW will do next</h2>
<p>The active schedule, its inputs and the limits that shape it.</p>
</section>
</main>

Expand All @@ -719,12 +709,10 @@ <h2>What FTW will do next</h2>
<section class="view-heading">
<p class="view-kicker">History</p>
<h2>Your energy, day by day</h2>
<p>See how much the home used, produced, bought and sold.</p>
</section>
<section class="energy-history-header">
<div>
<h2 id="energy-history-period-title">Last 7 days</h2>
<p>Daily totals from the same readings used by Energy today.</p>
</div>
<div id="energy-history-range" class="energy-history-range" role="tablist" aria-label="History period">
<button type="button" role="tab" data-range="24h" aria-selected="false">Today</button>
Expand All @@ -737,7 +725,7 @@ <h2 id="energy-history-period-title">Last 7 days</h2>
<div class="energy-history-card-heading">
<div>
<h2 id="energy-history-ev-title">EV charging — energy and cost</h2>
<p>Based on FTW’s configured spot price, network tariff and VAT.</p>
<p>At the spot price, grid fee and VAT set in FTW.</p>
</div>
</div>
<div id="energy-history-ev-cost" class="energy-history-ev-cost" aria-live="polite">
Expand All @@ -749,7 +737,6 @@ <h2 id="energy-history-ev-title">EV charging — energy and cost</h2>
<div class="energy-history-card-heading">
<div>
<h3>Energy by day</h3>
<p>Compare home use and solar with energy bought from or sold to the grid.</p>
</div>
<button id="energy-history-refresh" class="btn-quiet" type="button">Refresh</button>
</div>
Expand All @@ -766,7 +753,6 @@ <h3>What stands out</h3>
<summary>
<span>
<strong>Devices, data quality and export</strong>
<small>Use this when checking a meter or downloading source data</small>
</span>
<span id="energy-history-detail-meta" class="history-disclosure-meta">Open</span>
</summary>
Expand Down Expand Up @@ -823,7 +809,6 @@ <h3>What stands out</h3>
<summary>
<span>
<strong>Past plan decisions</strong>
<small>Technical detail for inspecting an earlier schedule</small>
</span>
<span class="history-disclosure-meta" id="diagnose-meta">Open</span>
</summary>
Expand Down Expand Up @@ -867,7 +852,6 @@ <h2>Plan decisions</h2>
<section class="view-heading">
<p class="view-kicker">More</p>
<h2>Setup, settings and system</h2>
<p>Configure FTW, see its version or open advanced operational details.</p>
</section>
<section class="more-actions" aria-label="System actions">
<button id="more-settings-btn" class="more-action" type="button">
Expand Down Expand Up @@ -954,7 +938,7 @@ <h3>Header line</h3>
</ul>

<h3>Price bars (top of the chart)</h3>
<p>Each bar is one 15-minute slot, stacked as the three pieces of your real consumer price:</p>
<p>Each bar is one 15-minute slot, stacked as the three pieces of your real consumer price. Tomorrow&rsquo;s prices usually arrive around 13:00.</p>
<ul>
<li>
<span class="legend-color" style="background:color-mix(in srgb, var(--fg) 50%, transparent);display:inline-block;width:10px;height:10px;border-radius:2px;vertical-align:middle"></span>
Expand Down
2 changes: 1 addition & 1 deletion web/mobile-information-architecture.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe("plain-language plan briefing", () => {
}
assert.match(plan, /derivePlanBrief/);
assert.match(planBrief, /Fallback active/);
assert.match(planBrief, /No active safety adjustment/);
assert.doesNotMatch(planBrief, /No active safety adjustment/);
assert.match(planBrief, /Plan until /);
assert.match(planBrief, /at the end of the plan/);
});
Expand Down
Loading
Loading