aboutsummaryrefslogtreecommitdiffstats
path: root/tools/feed-follow-test.js
Commit message (Collapse)AuthorAgeFilesLines
* Browser tests: public relays answered in the page, never reachedAdam Soltys7 days1-1/+1
| | | | | | | | | | | | | | A suite run let ~90 throwaway test wallets subscribe and publish on public relays from one home address, and nos.lol and relay.damus.io banned it. tools/puppeteer.js wraps puppeteer-core: every socket to a non-local host gets an in-page stand-in relay (EVENT -> OK, REQ -> EOSE). Tests that read real content launch with { relays: 'read' } (real reads, publishes answered in place); feed-live, chat-layout and cordn-ui launch with { relays: 'live' }. LIVE_RELAYS=read|1|host,... overrides per run. profile-key-qr: measure the QR again if a repaint swapped it out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Feed tests: open the Feed from the bottom nav, on FollowingAdam Soltys8 days1-23/+20
| | | | | | | | | | | | | | | | | | | The feed left the chat home for a bottom-nav tab, and a wallet with no feed remembered opens on Popular, so these tests click the Feed tab and seed Following as the wallet's last feed. Also brought up to date: - feed-live: the pill lands on the oldest new post; arrivals at the top go in above the first post (held still), not behind the pill; scroll up a screen at a time (one jump lands before the windowed rows are back) - feed-custom: only the feeds' chips are counted (not All/Images/…); the follows box is not the first checkbox any more; the last feed is remembered across a reload; the pack shows in the feed's editor (the chat home no longer lists the feed) - feed-follow: Feed tab + Following chip instead of the messages-home row; the feed opens at ten posts (tall ones, so a page doesn't fill the screen) - moderation: nos.lol is a local stand-in (a relay that won't connect held the mute list back past the checks) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* First run: "Create a new wallet" shows the twelve words at once.Adam Soltys2026-09-211-1/+1
| | | | | | | | | | | | No create/import tabs and no Generate button inside the wizard: the words appear the moment the button is tapped. Underneath, "Have an existing seed or entropy to import?" swaps to the import pane (which has its own entropy door), and "Create a new wallet instead" swaps back with fresh words. The create/import card elsewhere (adding an account) keeps its tabs. Tests that entered through the old tab go through the new line. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp
* The feed reads the relays it was already willing to open.Adam Soltys2026-09-131-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gap was not where I said it was. "283 of 400 authors have no relay list" sounded like the thing to fix — but those authors turned up in the sample BECAUSE our own relays carry them, and outboxPlan already asks our relays about everyone. The legacy kind-3 relay map, the fallback I proposed for them, recovers 2 of 220. Neither is worth writing. The real gap is that covering every author once was the wrong goal. People publish to several relays and each holds a different slice: of 60 sampled authors with a write list, 45 declared MORE than the three we took, and seven of twenty-five had posts living only on their fourth or later relay. Meanwhile the greedy stopped the moment everyone was covered — nineteen sockets of a twenty-four socket budget, with posts sitting unread on the five it never opened. So it takes six relays per author instead of three, and keeps picking until the budget is spent rather than until coverage is met. Measured over the same 250 authors, twice: 1265 notes before, 1549 after, 502 of them notes the old plan never saw. Same socket count we already allowed. Raising the per-author number ALONE makes it worse, which is worth knowing: more relays per author let a few fat ones cover everybody in nine sockets, and the feed read less than before (1089 against 1312). The two changes only work together. feed-follow-test now seeds one author with six write relays and asserts all six are dialled, so neither knob can drift back on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
* The front door points at your own keys.Adam Soltys2026-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Four buttons of equal weight, and only the sign-in ones said what they did. "Get started" said nothing, so the concrete offer on that screen was Google — which is a convenience wrapped around a seed phrase, not an alternative to one. Now the page says what the wallet is before it offers a button, the way in reads "Create a new wallet" with the cost under it (a minute, twelve words), and the three sign-ins sit below a line labelled "or, if you already have an account". And the second half of the same problem: a wallet that arrives by sign-in has a recovery phrase its owner has never seen and nobody can reissue. So the wizard shows it once, right after the first login, while it still reads as setting up rather than as a warning out of nowhere. "I've written it down" is the way on; "Later" is a real answer, and the wallet then keeps one quiet line — not a modal, not dismissible, gone the moment the phrase is actually seen, here or in settings. seedSeen records that per account: creating shows the words, importing means they typed them, revealing in settings counts. Only a derived seed starts false, which is exactly the case worth asking about. tools/onboard-backup-test.js covers both halves, including that "Later" leaves a reminder that survives a reload and leads somewhere. The sixteen tests that clicked the old button by its text are updated, and it has an id now so its copy can change without breaking them again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
* The feed opens at twenty posts and runs to the page's edge.Adam Soltys2026-09-111-0/+21
| | | | | | | | | | | | | | | | It was rendering everything it held — a hundred-odd notes to show the few you read. It now paints twenty, and reaching the bottom shows twenty more; only when the window catches up with what's cached does it go back to the relays for older posts. Posts arriving live at the top widen the window rather than pushing off the one you'd scrolled to. And the posts are the page now, not a card sitting inside one: they step out through the chat page's padding to the container's own edge, leaving one continuous list with hairlines between the posts instead of two sets of card walls. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
* The feed reads each author on the relays they actually publish to.Adam Soltys2026-09-111-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our set is three relays — relay.coinos.io, nos.lol, relay.primal.net — plus whatever the user's own NIP-65 names. Asking those for everyone's posts only finds the people who happen to use them; anyone else looks like they stopped posting. So the feed now reads NIP-65: relay lists are fetched in batches of a hundred, kept for a week, and the authors covered greedily — the relay carrying the most people not yet covered, repeated up to ten sockets. A feed of hundreds is a handful of connections that between them reach everyone, rather than one each. Our relays are still asked about everyone, not just the people with no list. Measured across eight busy accounts, each source holds posts the other misses: reading the author's own relays surfaced 7 to 40 notes ours had never seen (jb55 +40, verbiricha +25, pablo +23), and ours held plenty theirs didn't — fiatjaf's own three relays answered 42 where ours answered 67. The feed wants the union, so the outbox adds reach rather than replacing it. On the test set that took the feed from 83 posts to 118. Profile pages get it for free: relaysOf now reads the batch's cache first, so opening someone you follow costs no extra round trip. The test records every socket the page opens and checks the plan by what it actually dialled. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
* Follow people, read a feed of them, and put pictures in a post.Adam Soltys2026-09-111-0/+70
FOLLOWING. A profile page gains Follow / Following beside DM and Pay. The contact list is the kind-3 event, kept locally so the button is right in the first frame and refreshed from relays behind it. Publishing one is delicate: a contact list is a shared document — other clients keep relay hints in its content and petnames in its tags — so a follow re-fetches the newest list first and adds or removes exactly one p tag, preserving everything else. The button flips immediately and flips back if the publish fails. The service worker's friend filter reads the same list, so following someone also means their DMs stop being treated as a stranger's. THE FEED. Posts by the people you follow, newest first, at the top of the messages home. Replies are left out: a reply belongs to its thread, and a timeline of half-conversations reads like eavesdropping. The last screenful is kept locally so it opens with posts in it rather than a spinner, new posts arrive over a live subscription while you're looking at it, and older ones stream in as you reach the bottom — the same shape as the profile pages. A wallet that follows nobody is told so and offered the people search. MEDIA. The composer (now shared by the feed and the profile page) takes a picture or a video: it uploads when you pick it and appends the URL to the text, which is how every nostr client reads media, with a NIP-92 imeta tag published beside it for the ones that would rather be told than guess. Posts already render images and video inline, so they show up where they land. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx