From fae3468590d9e7627e855f6b5636b116d6582f3d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 12 Sep 2026 22:53:21 -0700 Subject: Feed rows wore punks and npubs because we asked for profiles one at a time. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A screenful of eighty rows sent eighty kind-0 REQs in the same breath. Relays cap how many subscriptions a connection may have open, most were refused, the five-second timeout expired, and the empty answer was then believed for ten minutes — which is a real account dressed as a punk with a shortened npub for the rest of the session. Measured against this wallet's own feed, 131 of the 133 people on screen had a kind 0 sitting on relays we were already connected to. It was never reach; it was us. So profiles go out in batches: a 250ms beat collects a paint's worth of rows into one request of up to 200 authors, and each batch paints as soon as it lands rather than waiting behind the outbox fallback chasing stragglers. A miss now backs off instead of sticking — fifteen seconds, then half a minute, up to the ten minutes that's right for someone who genuinely has no profile. And noteRow no longer calls prefetchProfilePage. That fetches an author's whole page — kind 0, relay list, last thirty notes — which for twenty rows is sixty requests, and is what starved the batch in the first place. A row is not a profile tap; the page still loads when the profile is opened. profile-feed-test had rotted in three places (onboarding copy, and .header-msgs now matching the settings button first) — repaired, not rewritten. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx --- tools/profile-feed-test.js | 8 ++++++-- 1 file changed, 6 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 e499e5a..1e7283b 100644 --- a/tools/profile-feed-test.js +++ b/tools/profile-feed-test.js @@ -25,7 +25,7 @@ const waitText = async (x, ms = 20000) => { for (let i = 0; i < ms / 250; i++) { try { await page.goto('http://localhost:5234/', { waitUntil: 'domcontentloaded' }); await sleep(400); - await click('button', 'I already have a wallet'); + await click('button', 'Get started'); await sleep(300); await click('button', 'Import existing'); await sleep(300); @@ -34,7 +34,11 @@ try { await click('button', 'Open wallet'); check('wallet opens', await waitText('receive', 20000)); - await page.evaluate(() => document.querySelector('.header-msgs')?.click()); + // .header-msgs is the shared header-button class — settings, lock and + // search wear it too, and the first one is no longer this. Ask for the + // messages button by name. + await page.evaluate(() => [...document.querySelectorAll('button')] + .find((b) => /message/i.test(b.getAttribute('aria-label') || ''))?.click()); await sleep(800); check('chat home opens', await waitText('coinos', 10000)); await click('.item, .chat-thread-row', 'coinos'); -- cgit v1.2.3