OverviewFilesCommitsIssuesDocsReleasesPeers

favela-surface-android commits / d0a7504

0.0.17: a staged bundle now reaches the state file, so the restart button exists
⛔ `writeState()` ran ONCE at boot. With the watch, the download lands SECONDS later — so `app-update.json` still said `staged: null` and settings rendered "Up to date" with no restart button, over a bundle sitting on disk. Seen directly in logcat rather than inferred: `ota: staged 791a4f78…` on the device, `staged: null` in the state the page reads. The `say` callback is the only signal that crosses out of `startOta`, so the rewrite keys on it — narrowly (`/^ota: staged /`), so an unrelated line cannot trigger a spurious write. ⚠ This is the third time today a value was correct in one layer and stale in the one that renders it: the banner needed `running`, the settings section printed only what it already agreed with, and now the file itself lagged the event. Rendering a snapshot of a thing that changes underneath is the recurring shape. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
d0a7504b0523d06c2ee466cf144b2136ad096b79
by plankatron <fleeky@gmail.com> · 2026-09-10T18:51:25.000Z

Changed files (3) +15 -4

lib/node.js +12 -1
……@@ -251,7 +251,18 @@ export async function boot (storage) {
251251 // only that nothing happened, which is what several hours of guessing were spent on.
252252 const ota = await startOta({
253253 storage,
254 say: (m) => { lastOtaNote = String(m); send({ t: 'log', msg: m }) },
254 say: (m) => {
255 lastOtaNote = String(m)
256 send({ t: 'log', msg: m })
257 // ⛔ RE-WRITE THE STATE WHEN SOMETHING IS STAGED. `writeState()` ran once at boot, and with
258 // the watch the download lands SECONDS LATER — so app-update.json still said `staged: null`
259 // and settings rendered "Up to date" with no restart button, over a bundle sitting on disk.
260 // Seen directly in logcat: staged on the device, null in the state file.
261 //
262 // ⚠ Keyed on the message because `say` is the only signal that crosses out of startOta. A
263 // narrow match, so an unrelated line cannot cause a spurious rewrite.
264 if (/^ota: staged /.test(String(m))) { try { refreshUpdateState() } catch {} }
265 },
255266 currentTreeHash: shell.bundle
256267 })
257268
lib/version.js +2 -2
……@@ -1,4 +1,4 @@
11// GENERATED by scripts/gen-version.mjs — do not edit.
2export const VERSION = "0.0.16"
3export const BUILT_AT = 1789065599425
2export const VERSION = "0.0.17"
3export const BUILT_AT = 1789066113076
44export default { VERSION, BUILT_AT }
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-surface-android",
3 "version": "0.0.16",
3 "version": "0.0.17",
44 "description": "favela-surface-android \u2014 a React Native shell over a bare-kit worklet running a full favela-peer node (markdown records, no atproto) with favela-surface rendering its pages in a WebView.",
55 "type": "module",
66 "private": true,