OverviewFilesCommitsIssuesDocsReleasesPeers

favela-surface commits / e415e0e

0.0.56: the update section shows its inputs, in every state
It printed `running` alone when it judged itself up to date. So when that judgement was WRONG — it required `running`, which is null on a fresh install — there was no way to see that a bundle HAD been staged. ⛔ A page that shows its inputs only when it already agrees with you cannot be used to find out that it is wrong. Hours went into guessing at a state this line could have printed. Now: running AND staged, always, plus the node's own last OTA line verbatim — "no swarm fetcher", "downloading 0.0.6", "previously failed to boot". A handset has no log anyone can read, so those messages went nowhere. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
e415e0e809325ded496e576d38829a14f3db59b4
by plankatron <fleeky@gmail.com> · 2026-09-10T16:26:18.000Z

Changed files (2) +16 -5

lib/pages.js +15 -4
……@@ -1518,6 +1518,10 @@ export function updateSettings (u) {
15181518 if (!u) return ''
15191519 const short = (h) => (h ? esc(String(h).slice(0, 12)) + '…' : '<span class="who">unknown</span>')
15201520 const checked = u.checkedAt ? '<p class="who">Last checked ' + esc(u.checkedAt) + '</p>' : ''
1521 // ⚠ The node's own last OTA line, verbatim. It says things no derived field can — "no swarm
1522 // fetcher", "downloading 0.0.6", "previously failed to boot" — and without it a device could only
1523 // report that nothing happened.
1524 const note = u.note ? '<p class="who">' + esc(u.note) + '</p>' : ''
15211525 // ⛔ THE VERSION FIRST, because it is the only line here a person can compare against a release
15221526 // page. Two tree hashes say something differs; they do not answer "is my update installed?", which
15231527 // is the question anyone opening this section actually has.
……@@ -1530,13 +1534,20 @@ export function updateSettings (u) {
15301534 // is the ordinary case — the node re-verified the bundle it is already running — and calling that
15311535 // "update available" is what makes a restart button lie.
15321536 const waiting = updateWaiting(u)
1537 // ⛔ ALWAYS SHOWN, BOTH VALUES, IN EVERY STATE. This used to print `running` alone when it judged
1538 // itself up to date — so when that judgement was WRONG (it required `running`, which is null on a
1539 // fresh install) there was no way to see that a bundle had in fact been staged. A page that shows
1540 // its inputs only when it already agrees with you cannot be used to find out that it is wrong,
1541 // and several hours went into guessing at a state this line could have printed.
1542 const facts = '<p class="who">running ' + short(u.running) +
1543 ' · staged ' + short(u.staged) + '</p>'
1544
15331545 const body = waiting
1534 ? '<p class="warn">An update is downloaded and will apply on the next start.</p>' +
1535 '<p class="who">running ' + short(u.running) + ' &rarr; staged ' + short(u.staged) + '</p>' +
1546 ? '<p class="warn">An update is downloaded and will apply on the next start.</p>' + facts +
15361547 (u.ota ? '<p><button id="app-restart">restart now</button></p>' : '<p class="who">This app cannot restart itself; close and reopen it.</p>')
1537 : '<p>Up to date.</p><p class="who">running ' + short(u.running) + '</p>'
1548 : '<p>Up to date.</p>' + facts
15381549
1539 return '<h2>App updates</h2>' + version + body + checked +
1550 return '<h2>App updates</h2>' + version + body + checked + note +
15401551 (u.ota ? '<p><button id="app-check">check now</button> <span id="app-msg" class="who"></span></p>' : '') +
15411552 (u.ota ? '<script type="module">\n' + UPDATE_JS + '\n</script>' : '')
15421553}
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-surface",
3 "version": "0.0.55",
3 "version": "0.0.56",
44 "description": "The favela renderer \u2014 server-side HTML over the daemon's socket. No storage, no keys, no swarm.",
55 "type": "module",
66 "main": "index.js",