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
- 33ad4bd5Merge commit 'f57f64f'mre
- 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
- f57f64f0mission 046: report, LOGmre
- 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- efe1b485mission 046: re-vendor Hybriel master 60b2817b (integration 8, #203): plugins mpackdb + web (bin/ git-ignored: hybriel, libhlrt.a, hlc.o, hlrt/ from native/zig-out)mre
- 53099ffbmission 046: person page reads a slim per-title credit row cache (no whole-record fetch per credit); gate tests/person-lookup.mjsmre
- 9b3828aemission 046a: report, LOGmre
- 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
- ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
- 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
- e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre
- 31dcf2admission 045: report, LOGmre
- 9c3971d0tests/persons-skip-count.hlmre
- 4d72e365mission 045mre
- b9cae4c9slices: skip and count non-row values from range(); merge persons pass falls back to iterate; guard testmre
- 3db7dc31merge w44-jobs-slices into w43-trkmemmre
- 593dab6fmission 043: report, LOGmre
- 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
- 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
- 23375c58mission 044: report, LOG, STATUSmre