aboutsummaryrefslogtreecommitdiffstats
path: root/tools/feed-custom-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-16 17:22:35 -0700
committerAdam Soltys <[email protected]>2026-10-16 17:22:35 -0700
commitef3ea098ef8b370ac71e0c3a5b638625556b0937 (patch)
tree329982d66991f464090fcc28363e8bb5edc64678 /tools/feed-custom-test.js
parent885bc2647a3558554a53a794f1d56e9dbd7657e6 (diff)
downloadcoinosv3-ef3ea098ef8b370ac71e0c3a5b638625556b0937.tar.gz
coinosv3-ef3ea098ef8b370ac71e0c3a5b638625556b0937.zip
Conversations is a view of every feed — the chip beside Notes, Images, Videos and Articles — not a feed of its own.
Adam, 2026-10-16: "conversations [should] be one of the filter chips between all and images and all should become notes". So the view row reads Notes · Conversations · Images · Videos · Articles, and Conversations shows the current feed's people in reply — Following, Popular, a list, a topic, a pack, anyone's timeline — each reply under the post it answers, as 885bc26 drew them. The view is a feed state of its own under the feed's id (suffix ~replies: its own notes, clock, disk cache, fresh counter and live watch), with a definition derived from the feed's (replies: true) so the merge, seeding, borrowing, watch and kinds all go by it unasked; Notes ↔ Conversations is entered like a switch of feed, the feed chip unchanged, and the chosen view persists across feeds and reloads like the others. A feed's state is forgotten together with its view's (dropFeedState) when its query or relays change or it is deleted. The built-in Conversations feed chip and the editor's "Replies instead of posts" toggle from this morning are gone with it (def.replies stays as the derived definition's mark). tools/feed-conversations-test.js follows: the view chips in order, no feed chip of its own, the view's cache under following~replies, the feed chip staying on Following while the view is on, Back landing on the view, a new list feed opening straight into the view with the replies borrowed from the feeds in hand and Notes giving its posts, Following's view back at once, and a reload opening on the view from its own cache. feed-media-views-test names the chips; feed-custom-test is back as it was. feed-media-cache-test is flaky either way (a stray first page in its request window, or its 8 s timing, on clean HEAD too); feed-custom-test's "lands in Everything" fails on clean HEAD; the other feed suites pass. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01J1Kon8bxJoHRpJdSzshCkp
Diffstat (limited to 'tools/feed-custom-test.js')
-rw-r--r--tools/feed-custom-test.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/feed-custom-test.js b/tools/feed-custom-test.js
index 6f345f1..122cb0a 100644
--- a/tools/feed-custom-test.js
+++ b/tools/feed-custom-test.js
@@ -108,7 +108,7 @@ try {
await waitText('receive', 20000);
await openFeed();
await sleep(1200);
- check('the feed opens on Following, with a + chip', JSON.stringify(await chips()) === JSON.stringify(['*Following', 'Conversations', 'Popular', '#gardenstr', '+']), JSON.stringify(await chips()));
+ check('the feed opens on Following, with a + chip', JSON.stringify(await chips()) === JSON.stringify(['*Following', 'Popular', '#gardenstr', '+']), JSON.stringify(await chips()));
console.log('\n[a new feed: everyone I follow, on one topic]');
await page.click('.feed-chip.add'); await sleep(300);
@@ -117,7 +117,7 @@ try {
await page.click('input[type=checkbox]:not(.feed-all-toggle)'); // everyone I follow (the first box is the relays' every-post one)
await type('input[placeholder="#bitcoin #nostr"]', '#Bitcoin, lightning');
await click('save'); await sleep(1500);
- check('the new feed is on screen and selected', JSON.stringify(await chips()) === JSON.stringify(['Following', 'Conversations', 'Popular', '#gardenstr', '*Coin talk', '+']), JSON.stringify(await chips()));
+ check('the new feed is on screen and selected', JSON.stringify(await chips()) === JSON.stringify(['Following', 'Popular', '#gardenstr', '*Coin talk', '+']), JSON.stringify(await chips()));
const req = (await page.evaluate(() => window.__reqs)).find((f) => f['#t'] && f.authors);
check('it asks relays for the follows AND the topics', !!req && req.authors?.includes(AUTHOR) && JSON.stringify(req['#t']) === JSON.stringify(['bitcoin', 'lightning']), JSON.stringify(req || null));
const tagged = signed('fresh #bitcoin post', 0, [['t', 'bitcoin']]);
@@ -132,7 +132,7 @@ try {
await page.evaluate(() => [...document.querySelectorAll('.feed-chip')].find((c) => c.textContent.trim() === 'Following').click()); await sleep(1200);
check('Following again, with its own posts', (await chips()).includes('*Following') && await waitText('plain post', 4000));
await page.evaluate(() => { const a = [...document.querySelectorAll('.notes-feed a')].find((x) => x.textContent === '#bitcoin'); if (a) a.click(); }); await sleep(1200);
- check('a #tag opens a topic feed of its own', JSON.stringify(await chips()) === JSON.stringify(['Following', 'Conversations', 'Popular', '#gardenstr', 'Coin talk', '*#bitcoin', '+']) && await page.evaluate(() => { const m = document.querySelector('[aria-label="Feed options"]'); if (!m) return false; m.click(); return true; }) && await waitText('save feed', 2000) && await page.evaluate(() => { const b = [...document.querySelectorAll('.msg-sheet button')].find((x) => /back/i.test(x.textContent)); if (b) b.click(); return true; }), JSON.stringify(await chips()));
+ check('a #tag opens a topic feed of its own', JSON.stringify(await chips()) === JSON.stringify(['Following', 'Popular', '#gardenstr', 'Coin talk', '*#bitcoin', '+']) && await page.evaluate(() => { const m = document.querySelector('[aria-label="Feed options"]'); if (!m) return false; m.click(); return true; }) && await waitText('save feed', 2000) && await page.evaluate(() => { const b = [...document.querySelectorAll('.msg-sheet button')].find((x) => /back/i.test(x.textContent)); if (b) b.click(); return true; }), JSON.stringify(await chips()));
const treq = (await page.evaluate(() => window.__reqs)).filter((f) => f['#t'] && !f.authors).pop();
check('...asked for by topic alone', !!treq && JSON.stringify(treq['#t']) === JSON.stringify(['bitcoin']), JSON.stringify(treq || null));
@@ -183,7 +183,7 @@ try {
await waitText('receive', 20000);
await openFeed(); await sleep(1200);
// (the feed you were on is remembered: Follows + lists, saved last)
- check('the saved feeds are still there; the session topic is not', JSON.stringify(await chips()) === JSON.stringify(['Following', 'Conversations', 'Popular', '#gardenstr', 'Coin talk', 'Pack feed', 'Everything', '*Follows + lists', '+']), JSON.stringify(await chips()));
+ check('the saved feeds are still there; the session topic is not', JSON.stringify(await chips()) === JSON.stringify(['Following', 'Popular', '#gardenstr', 'Coin talk', 'Pack feed', 'Everything', '*Follows + lists', '+']), JSON.stringify(await chips()));
// (the chat home no longer lists the feed with its summary: its editor shows the pack)
await chip('Pack feed'); await sleep(800);
await page.click('[aria-label="Feed options"]'); await sleep(300);
@@ -199,7 +199,7 @@ try {
await page.click('[aria-label="Feed options"]'); await sleep(300);
check('the menu offers Delete feed beside Edit', await page.evaluate(() => { const b = [...document.querySelectorAll('.msg-sheet button')].map((x) => x.textContent); return b.some((x) => /edit feed/i.test(x)) && b.some((x) => /delete feed/i.test(x)); }));
await page.evaluate(() => [...document.querySelectorAll('.msg-sheet button')].find((b) => /delete feed/i.test(b.textContent)).click()); await sleep(1000);
- check('deleting it from the menu lands back on Following', JSON.stringify(await chips()) === JSON.stringify(['*Following', 'Conversations', 'Popular', '#gardenstr', 'Pack feed', 'Everything', 'Follows + lists', '+']), JSON.stringify(await chips()));
+ check('deleting it from the menu lands back on Following', JSON.stringify(await chips()) === JSON.stringify(['*Following', 'Popular', '#gardenstr', 'Pack feed', 'Everything', 'Follows + lists', '+']), JSON.stringify(await chips()));
check('no page errors', errs.length === 0, errs.slice(0, 2).join(' | '));
} finally { await browser.close(); server.stop(true); }
console.log(ok ? '\n✅ feeds: Following is one of many' : '\n❌ failed');