From 22653c35ab372f7649711a743fd88b71265ae4e5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 9 Oct 2026 16:04:46 -0700 Subject: Profiles: Posts / Replies tabs. Replies were mixed into a profile's list, tagged "↩ reply" — now Posts (the default) is what they posted and Replies is their side of other people's threads (NIP-10 replies, NIP-22 comments). Profiles load thirty mixed notes a page and older pages only on scroll, so a tab that holds few of its kind (someone who mostly replies, or never does) fetches older pages by itself — five at most per tab, so a person who never replies doesn't have their whole history paged through. tools/profile-replies-test.js; profile-feed-test waits for rows (the tabs come before them; the old "Latest posts" heading only appeared with notes in hand). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3 --- tools/profile-feed-test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tools/profile-feed-test.js') diff --git a/tools/profile-feed-test.js b/tools/profile-feed-test.js index f2ca9e6..87dfc80 100644 --- a/tools/profile-feed-test.js +++ b/tools/profile-feed-test.js @@ -49,8 +49,13 @@ try { await page.evaluate(() => document.querySelector('.chat-avatar.clickable')?.click()); check('profile screen opens', await waitText('back', 10000)); // the feed: either notes arrive or the explicit empty state shows - const fed = await waitText('Latest posts', 15000); - const empty = !fed && (await bodyText()).includes('No recent posts'); + // (the Posts / Replies tabs come first; their rows once the relays answer) + let fed = false, empty = false; + for (let i = 0; i < 60 && !fed && !empty; i++) { + fed = await page.evaluate(() => document.querySelectorAll('.notes-feed [data-zap-post]').length > 0); + empty = !fed && /No recent posts/.test(await bodyText()); + if (!fed && !empty) await sleep(250); + } check('note feed resolves', fed || empty, fed ? 'notes shown' : 'no posts for this pk'); if (fed) { // the ⚡ in every note's action bar, live when the wallet can pay -- cgit v1.2.3