tracker
All repositories: gitoria
4.1 KB
// tests/realdata-063.mjs — tracker#29 (mission 063), NOT the gate: on a COPY of live storage/ (STATUS.md has the procedure),// signed in (cookie from .scratch/real-sid) at 390 + 1280: how the checks LOOK on /my/unwatched, a show page (REAL_SHOW) and// /my/movies — per page the count of checks by class and by on-screen look (computed circle fill/stroke, check stroke), and// the screenshot pixel inside the first disc. Then ONE click on /my/unwatched's first check (on the COPY): the row leaves the// list, also after a reload. Screenshots → $REAL_OUT. Env: REAL_PORT (8730), REAL_CHROME (8731), REAL_SHOW (/shows/Foundation).import { writeFileSync, readFileSync, mkdirSync } from 'node:fs';import { launchBrowser } from './cdp.mjs';process.env.HL_CHROME ||= '/opt/google/chrome/chrome';const BASE = `http://127.0.0.1:${process.env.REAL_PORT || 8730}`, OUT = process.env.REAL_OUT || '/tmp/w063/real';const SID = readFileSync('.scratch/real-sid', 'utf8').trim();const SHOW = process.env.REAL_SHOW || '/shows/Foundation';mkdirSync(OUT, { recursive: true });const browser = await launchBrowser({ debugPortRange: [Number(process.env.REAL_CHROME || 8731), Number(process.env.REAL_CHROME || 8731)] });const page = await browser.newPage();const ev = (e) => page.evaluate(e);const hydrated = () => page.waitFor('!!window.__hl && window.__hl.socket && window.__hl.socket.readyState === 1 && document.readyState === "complete"', { timeout: 60000, label: 'hydrated' });const shot = async (n) => writeFileSync(`${OUT}/${n}.png`, Buffer.from((await page.send('Page.captureScreenshot', { format: 'png' })).data, 'base64'));const load = async (path) => { const t = Date.now(); await page.goto(BASE + path, { timeout: 60000 }); await hydrated(); return Date.now() - t; };const looks = () => ev(`JSON.stringify((() => { const cnt = {}; for (const b of document.querySelectorAll('.checkicon')) {const c = getComputedStyle(b.querySelector('circle')), p = getComputedStyle(b.querySelector('path'));const k = b.getAttribute('class') + ' fill=' + c.fill + ' stroke=' + c.stroke + ' mark=' + p.stroke; cnt[k] = (cnt[k] || 0) + 1; } return cnt; })())`);await page.send('Network.setCookie', { name: 'trackersid', value: SID, url: BASE });const out = [];for (const [w, h, mobile] of [[390, 844, true], [1280, 900, false]]) {await page.send('Emulation.setDeviceMetricsOverride', { width: w, height: h, deviceScaleFactor: mobile ? 2 : 1, mobile });for (const [name, path] of [['my-unwatched', '/my/unwatched'], ['show', SHOW], ['my-movies', '/my/movies']]) {const ms = await load(path);await page.send('Input.dispatchMouseEvent', { type: 'mouseMoved', x: 0, y: 0 });if (name === 'show') await ev(`document.querySelector('show-seasons') && document.querySelector('show-seasons').scrollIntoView()`);await page.waitFor(`Array.from(document.querySelectorAll('img')).filter(i => { const r = i.getBoundingClientRect(); return r.top < innerHeight && r.bottom > 0 }).every(i => i.complete)`, { timeout: 10000, label: 'images' }).catch(() => {});await shot(`${name}-${w}`);out.push(`${w} ${path} (${ms} ms): ${await looks()}`);}}// one click on the copy: the first row leaves the list, also after a reloadawait load('/my/unwatched');const first = await ev(`document.querySelector('unwatched-row button.checkicon').value`);const n0 = await ev(`document.querySelectorAll('unwatched-row').length`);const t = Date.now();await page.click('unwatched-row button.checkicon');await page.waitFor(`!document.querySelector('unwatched-row button.checkicon[value="${first}"]')`, { timeout: 30000, label: 'row gone' });const clickMs = Date.now() - t;const n1 = await ev(`document.querySelectorAll('unwatched-row').length`);await load('/my/unwatched');const gone = await ev(`!document.querySelector('unwatched-row button.checkicon[value="${first}"]')`);out.push(`click on /my/unwatched ${first}: ${n0} rows → ${n1} after ${clickMs} ms; after a reload still gone: ${gone}, ${await ev(`document.querySelectorAll('unwatched-row').length`)} rows`);console.log(out.join('\n'));console.log('problems', JSON.stringify(page.problems ? page.problems() : []));await browser.close();
Branches
Latest commits
- 6c1936f9log+status: GC planmre
- 2846a840log: m569 result, GC hypothesismre
- b24cd2d5log: Anton on hl:fetch, mission 569mre
- 7d42cac1log+status: SL1 measured, fetch stalls remainmre
- 8e5f2ceflog: SL1 deployedmre
- 29f34212log: SL1 deploy startedmre
- 529dd741Merge sl1-slices: slice details repair and person fill (SL1)mre
- 8a83316blog: SL1 result, session drain slowermre
- 35e93e8dSL1: slice the details repair and person fill: catalog lists changed in place, 40 ms fill steps, people created in steps, writes one table per tickmre
- 72c9119flog+status: SL1 startedmre
- d74620fcmission SL1: slice repair and person fillmre
- 5d542d73log+status: ST1 resultmre
- 3945eb81ST1: stall diagnosis reportmre
- 404733aclog: ST1 startedmre
- 3e3d5a55mission ST1: stall diagnosismre
- 9c3180eblog+status: RV28d measured after deploymre
- fdf10b1alog: RV28d deployed on day38bmre
- 320005e9log: RV28d merged, deploy runningmre
- a8fef27dRV28d: reportmre
- 2bae8373RV28d: re-vendor Hybriel set day38b (source 1e554d75, bin 5ff2a46d)mre