aboutsummaryrefslogtreecommitdiffstats
path: root/tools/profile-feed-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-12 22:53:21 -0700
committerAdam Soltys <[email protected]>2026-09-12 22:53:21 -0700
commitfae3468590d9e7627e855f6b5636b116d6582f3d (patch)
tree12aae8d70bf0d8ec187de19a24598d38a2290aef /tools/profile-feed-test.js
parentd57962cb896b360295ec107afd50d2ce8701c401 (diff)
downloadcoinosv3-fae3468590d9e7627e855f6b5636b116d6582f3d.tar.gz
coinosv3-fae3468590d9e7627e855f6b5636b116d6582f3d.zip
Feed rows wore punks and npubs because we asked for profiles one at a time.
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) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
Diffstat (limited to 'tools/profile-feed-test.js')
-rw-r--r--tools/profile-feed-test.js8
1 files changed, 6 insertions, 2 deletions
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');