diff options
| author | Adam Soltys <[email protected]> | 2026-09-29 11:01:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-29 11:01:43 -0700 |
| commit | 3948ad95beb6e5e40dd275b7c4909ec8c4dee8a9 (patch) | |
| tree | 43e3057ae2c7118f7d25aa6b4931755b15e36322 /tools/avatar-profile-test.js | |
| parent | 75d437e81824865ba21fb9c732b351b75c78a180 (diff) | |
| download | coinosv3-3948ad95beb6e5e40dd275b7c4909ec8c4dee8a9.tar.gz coinosv3-3948ad95beb6e5e40dd275b7c4909ec8c4dee8a9.zip | |
Quoted notes are found on more relays and never show as a bare "view note"; Back from a post keeps the feed's place.
- findNote: the reference's hints, its author's NIP-65 relays and ours,
plus a wide net of big public relays, all at once, first answer wins.
A real quote (SuiGenerisJohn → 0c5e0f08…) sat only on nostr.mom,
named by neither the nevent nor its author's relay list.
- A feed row whose quote isn't in yet shows the quote card with
"Fetching note…" / "Couldn't find that note" instead of a link;
the card replaces it once found.
- Opening a post remembers the scroll position like opening a profile
does; Back restores it instead of landing at the top of the feed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp
Diffstat (limited to 'tools/avatar-profile-test.js')
| -rw-r--r-- | tools/avatar-profile-test.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/avatar-profile-test.js b/tools/avatar-profile-test.js index 6e84429..54c40dc 100644 --- a/tools/avatar-profile-test.js +++ b/tools/avatar-profile-test.js @@ -69,6 +69,17 @@ try { } check('back returns to the feed where the reader was', back.feed && Math.abs(back.y - feedY) < 60, 'scrollY ' + back.y + ' vs ' + feedY); + // a post opened into its thread: Back lands where the reader was + await page.evaluate(() => { const r = [...document.querySelectorAll('.notes-feed [data-key]')].find((n) => n.innerText.includes('post number 13')); r.scrollIntoView({ block: 'center' }); }); + await sleep(700); + const y0 = await page.evaluate(() => window.scrollY); + await page.evaluate(() => [...document.querySelectorAll('.notes-feed [data-key]')].find((n) => n.innerText.includes('post number 13')).querySelector('.note-text').click()); + await sleep(1500); + const inThread = await page.evaluate(() => !!document.querySelector('.thread-page')); + await page.goBack(); await sleep(1500); + const y1 = await page.evaluate(() => window.scrollY); + check('back from a post returns to the same place in the feed', inThread && y0 > 500 && Math.abs(y1 - y0) < 60, 'scrollY ' + y1 + ' vs ' + y0); + // "Their timeline" from the profile: its chip names it (it was a blank pill) await page.evaluate(() => { const r = [...document.querySelectorAll('.notes-feed .note-avatar')].find((n) => n.closest('[data-key]')?.innerText.includes('Bob Poster')); r.click(); }); await sleep(1000); |
