diff options
| author | Adam Soltys <[email protected]> | 2026-09-27 20:20:14 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-27 20:20:14 -0700 |
| commit | 78f49d1b44952e9c7dba95013ab47af542fea929 (patch) | |
| tree | 9114031c7478c4a91a39ca12db2f560ae18d9346 /tools/link-preview-test.js | |
| parent | 5b64b345cf533515c331bae5eb500609347c3415 (diff) | |
| download | coinosv3-78f49d1b44952e9c7dba95013ab47af542fea929.tar.gz coinosv3-78f49d1b44952e9c7dba95013ab47af542fea929.zip | |
Everything on the coinos relay is a feed of its own, and every feed can read from relays of your choosing.
Plain /feed is the firehose: every post relay.coinos.io carries, no filter.
It sits beside Following as a built-in chip for wallets and opens as a
session feed for a visitor.
A feed's relay list is independent of what it asks for. The Relays button
in the header opens a panel to add to or take from the list; empty means
the usual choice (each author's outbox, the wide relays for a topic, the
coinos relay for the firehose). The list rides in the URL as ?r=…, on every
kind of feed, so a shared link reads where you read.
A feed state dropped while its fetch was still out used to swallow the
answers meant for its replacement; a relay change showed nothing.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VhUKyXKtsJ67QAFfb7QR9D
Diffstat (limited to 'tools/link-preview-test.js')
| -rw-r--r-- | tools/link-preview-test.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/link-preview-test.js b/tools/link-preview-test.js index 52d86fe..673cb20 100644 --- a/tools/link-preview-test.js +++ b/tools/link-preview-test.js @@ -115,7 +115,8 @@ try { check('a page with nothing to show stays a bare link', !!blank && blank.bareLink && !blank.card, JSON.stringify(blank)); check('a picture link is still a picture, not a card', !!pic && pic.img && !pic.card, JSON.stringify(pic)); check('the registrar was asked once per link', previewHits.filter((u) => u === 'https://news.example/story/1').length === 1 && !previewHits.some((u) => u.endsWith('.png')), JSON.stringify(previewHits)); - const kept = await page.evaluate(() => JSON.parse(localStorage.getItem('coinos-link-previews') || '[]').length); + let kept = 0; // written behind, a second after the card was learned + for (let i = 0; i < 12 && !kept; i++) { kept = await page.evaluate(() => JSON.parse(localStorage.getItem('coinos-link-previews') || '[]').length); if (!kept) await sleep(300); } check('the card is remembered for next time', kept === 1, kept + ' kept'); check('no page errors', errs.length === 0, errs.slice(0, 2).join(' | ')); } finally { await browser.close(); server.stop(true); } |
