aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-14 22:36:58 -0700
committerAdam Soltys <[email protected]>2026-11-14 22:36:58 -0700
commit1424cc46382266a51123a8425424f3c8cb943e8e (patch)
treee2b21346781566709e7d0e9c6800b6f812661ce7 /tools
parent933e85020c2cc56b511ff47a73943c92ea1d044a (diff)
downloadcoinosv3-1424cc46382266a51123a8425424f3c8cb943e8e.tar.gz
coinosv3-1424cc46382266a51123a8425424f3c8cb943e8e.zip
A reply, zap or reaction is about the moment of a clip only when you say so. "i zapped and commented on a post from helen yrmom and didn't intend to tie it to the video timestamp but i guess it did by default. maybe we can revisit the ui/flow there so it doesn't do that by default?" (Adam, 2026-11-14). Anything done to a post whose clip had played took the clip's current time: the reply opened as "Comment at 0:12" (an × to drop it), and a zap's or reaction's sheet had nothing showing it at all. Now the time is offered as a toggle, off until tapped — "⏱ About 0:12 in the clip", ✓ when on — in the reply box, the reaction sheet, and both zap sheets (Ark and Lightning); a one-tap zap, which has no sheet, is never tied. Ticked, it goes out as before (the media tag, "[0:12]" before a comment, its mark on the clip's bar). media-moments-feed-test ticks the toggle where it used to rely on the default and checks it starts off; media-timeline, features-smoke and the zap tests pass
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
Diffstat (limited to 'tools')
-rw-r--r--tools/media-moments-feed-test.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/media-moments-feed-test.js b/tools/media-moments-feed-test.js
index 5b4c8fb..00baf9c 100644
--- a/tools/media-moments-feed-test.js
+++ b/tools/media-moments-feed-test.js
@@ -140,7 +140,10 @@ try {
check('no "at this time" buttons', await page.evaluate(() => !document.body.innerText.includes('at this time')));
await act('.note-audio', 'Like');
await page.waitForSelector('.msg-sheet');
- await page.evaluate(() => document.querySelector('.msg-sheet button').click());
+ // the moment is offered, not taken (Adam, 2026-11-14): tick it to tie the reaction to 0:05
+ check('the reaction sheet offers the moment, off', await page.evaluate(() => { const b = document.querySelector('.msg-sheet .moment-toggle'); return !!b && b.getAttribute('aria-pressed') === 'false' && b.textContent.includes('0:05'); }));
+ await page.click('.msg-sheet .moment-toggle');
+ await page.evaluate(() => document.querySelector('.msg-sheet button:not(.moment-toggle)').click());
await sleep(400);
const reaction = await page.evaluate(() => window.__relayGuard.events.find(e => e.kind === 7 && e.tags.some(t => t[0] === 'media')));
check('reaction is signed with the selected file and position', reaction?.tags.some(t => t[0] === 'media' && t[2] === '5'));
@@ -149,7 +152,9 @@ try {
await page.screenshot({ path: '/tmp/media-timeline-playing.png' });
await act('.note-audio', 'Reply');
await page.waitForSelector('.thread-reply-input');
- check('timestamp is visible in the reply composer', (await page.evaluate(() => document.body.innerText)).includes('Comment at 0:05'));
+ check('the reply composer offers the moment, off', await page.evaluate(() => { const b = document.querySelector('.thread-reply .moment-toggle'); return !!b && b.getAttribute('aria-pressed') === 'false' && b.textContent.includes('0:05'); }));
+ await page.click('.thread-reply .moment-toggle');
+ check('…tapped, it is on', await page.evaluate(() => document.querySelector('.thread-reply .moment-toggle').getAttribute('aria-pressed') === 'true'));
await page.evaluate(() => { const input = document.querySelector('.thread-reply-input'); input.value = 'Great moment'; input.dispatchEvent(new Event('input', { bubbles: true })); });
await page.click('.thread-reply-send');
await sleep(500);
@@ -169,7 +174,8 @@ try {
await sleep(150);
await page.evaluate(() => document.querySelector('.media-pager .mp-cur .mp-like').click());
await page.waitForSelector('.msg-sheet');
- await page.evaluate(() => document.querySelector('.msg-sheet button').click());
+ await page.evaluate(() => document.querySelector('.msg-sheet .moment-toggle').click());
+ await page.evaluate(() => document.querySelector('.msg-sheet button:not(.moment-toggle)').click());
await sleep(300);
check('video reaction carries the video URL and selected second', await page.evaluate(() => window.__relayGuard.events.some(e => e.kind === 7 && e.tags.some(t => t[0] === 'media' && t[1].endsWith('.mp4') && t[2] === '1'))));
check('...and shows over the pager\'s seek bar', await page.waitForFunction(() => !!document.querySelector('.media-pager .mp-cur .mp-seek .mp-mark'), { timeout: 3000 }).then(() => true, () => false));