<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coinosv3.git/tools/chat-watchdog-test.js, branch fdroid-v1.7</title>
<subtitle>coinos v3 — bitcoin, Ark, Lightning and nostr wallet (web + Android)</subtitle>
<id>https://git.coinos.io/coinosv3.git/atom?h=fdroid-v1.7</id>
<link rel='self' href='https://git.coinos.io/coinosv3.git/atom?h=fdroid-v1.7'/>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/'/>
<updated>2026-09-15T18:56:52Z</updated>
<entry>
<title>Chat keeps its relay subscriptions alive while the app is on screen.</title>
<updated>2026-09-15T18:56:52Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-09-15T18:56:52Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/commit/?id=0ebef05d3850d312ec8098584525b22ec1b9a0de'/>
<id>urn:sha1:0ebef05d3850d312ec8098584525b22ec1b9a0de</id>
<content type='text'>
New messages rang in Vector but sat unseen in v3 until a reload. The
resume hook only rebuilds subscriptions after an absence it was told
about; a socket that errors while the page stays visible (a wifi hop, a
laptop lid, a phone freezing the tab without the away timer noticing,
another tab clearing that timer first) is dropped from the nostr-tools
pool with every subscription it carried, and nothing dials it again.

A watchdog now runs whenever the app is on screen: on focus, on becoming
visible, and every ten seconds between. It asks the pool whether each
relay the inbox and the rooms listen on still holds a live socket (a dial
hung past 20s counts as dead, and a relay that closed a subscription on us
counts too) and rebuilds the lot when one is missing, dropping a stuck
relay first so the rebuild dials afresh. Rebuilds retry on a growing
backoff while a relay keeps refusing. tools/chat-watchdog-test.js errors
every socket under an open room and checks the recovery.

Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01JuwQqNWtDJcxPWtEm9134z
</content>
</entry>
</feed>
