diff options
| -rw-r--r-- | src/features/messages.js | 7 | ||||
| -rw-r--r-- | tools/pager-ready-gate-test.js | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 017629f..82b1986 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -13194,9 +13194,14 @@ export function messagesFeature(ctx) { const slide = rowSlide(group); if (slide) { pagerShow(slide); pagerArrive(slide); } } + // Counted: every post the pager has found, the ones still waiting for + // their clip to be ready included — only those kept out for their shape + // aren't. Counting the carousel alone, a refresh showed "1 / 2" over a + // grid of a dozen clips, the total creeping up as clips warmed (Adam, + // 2026-10-17: "the total count persists"). function pagerPosition() { if (!pager) return; - const groups = pagerGroups(); + const groups = pagerGroups(true).filter((g) => !g.classList.contains('mp-off')); const slide = pager.cur || pager.anchor; const index = groups.indexOf(slide && slide.closest('.mp-group')); pager.el.querySelector('.mp-position').textContent = (index < 0 ? 0 : index + 1) + ' / ' + groups.length; diff --git a/tools/pager-ready-gate-test.js b/tools/pager-ready-gate-test.js index d6df826..4138e42 100644 --- a/tools/pager-ready-gate-test.js +++ b/tools/pager-ready-gate-test.js @@ -118,7 +118,7 @@ try { await sleep(300); const g = await groups(); check('…joining above the clip on screen without moving it', g.find((x) => x.cur)?.clip === 'tall3' && Math.abs(g.find((x) => x.cur).top) <= 1, JSON.stringify(g.map((x) => x.clip + ':' + x.top + (x.cur ? '*' : '')))); - check('…and the counter grew', (await counter()) !== n0, n0 + ' → ' + (await counter())); + check('…and the counter counted it all along (3 / 4 before and after)', n0 === '3 / 4' && (await counter()) === '3 / 4', n0 + ' → ' + (await counter())); await page.keyboard.press('ArrowUp'); check('a step back up lands on the one that joined', await waitFor(() => { const s = document.querySelector('.mp-slide.mp-cur'); return !!s && /tall2/.test(s.getAttribute('data-k')) && !s.querySelector('video').paused; }, null, 6000), String(await curClip())); |
