diff options
| author | Adam Soltys <[email protected]> | 2026-11-12 23:29:24 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-12 23:29:24 -0700 |
| commit | 5dad3fed20be40eaaeb8e7373dd005f61b3e5c8b (patch) | |
| tree | 4c356ca35093b33d3252b5b8897ca43f2b5aff72 /tools/nip29-group-test.js | |
| parent | 5026227de10e424f590d2a042e5a8770266a6b5e (diff) | |
| download | coinosv3-5dad3fed20be40eaaeb8e7373dd005f61b3e5c8b.tar.gz coinosv3-5dad3fed20be40eaaeb8e7373dd005f61b3e5c8b.zip | |
Relay groups with nothing said wait at the bottom of Messages, and a dead relay says so. "They shouldn't be at the top if they have 0 members and no recent activity" (Adam, 2026-11-12), of four groups.0xchat.com groups that came in on his kind 10009 list (saved by Armada) and topped the phone's list. A group's place was its last message, else the moment this device first recorded it, so a list adoption counted as brand new. Now a relay group without messages sorts by when it was joined on this device (joinedAt, set by Join) and one that only arrived on the list sorts last. groups.0xchat.com no longer resolves: a group whose relay can't be reached and that has shown nothing reads "<host> isn't answering" on its row ("On <host>" while it is still quiet) instead of "0 members"; the mark clears with the relay's first event and on every start. nip29-group-test joins gone.invalid'deadgroup on the second device and reads the row
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
Diffstat (limited to 'tools/nip29-group-test.js')
| -rw-r--r-- | tools/nip29-group-test.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/nip29-group-test.js b/tools/nip29-group-test.js index 9096a47..de9b8e1 100644 --- a/tools/nip29-group-test.js +++ b/tools/nip29-group-test.js @@ -122,6 +122,15 @@ try { let shown = false; for (let i = 0; i < 60 && !shown; i++) { shown = await p2.evaluate(() => [...document.querySelectorAll('.chat-thread-row')].some((r) => r.textContent.includes('pyramid runners'))); if (!shown) await sleep(250); } check('...and the group joined on the laptop appears there', !before && shown); + // a group whose relay is gone says so on its row, not "0 members" + await p2.evaluate(() => [...document.querySelectorAll('button')].find((n) => n.textContent.trim().toLowerCase() === 'new group')?.click()); await sleep(300); + await p2.evaluate(() => [...document.querySelectorAll('button')].find((n) => n.textContent.trim().toLowerCase() === 'relay group')?.click()); await sleep(200); + await p2.type('.nip29-address', "gone.invalid'deadgroup"); + await p2.evaluate(() => [...document.querySelectorAll('button')].find((n) => n.textContent.trim().toLowerCase() === 'join')?.click()); await sleep(1500); + await p2.evaluate(() => document.querySelector('.chat-head button')?.click()); await sleep(500); + let dead = ''; + for (let i = 0; i < 60 && !/answering/.test(dead); i++) { dead = await p2.evaluate(() => [...document.querySelectorAll('.chat-thread-row')].find((r) => r.textContent.includes('deadgroup'))?.textContent || ''); if (!/answering/.test(dead)) await sleep(250); } + check("a group on a relay that's gone says so", /gone\.invalid isn't answering/.test(dead), dead.slice(0, 80)); await ctx.close(); } |
