MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / readability

Function readability

graph-ui/tools/smoke-w8.mjs:580–607  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

578 await mkdir(OUT_DIR, { recursive: true });
579
580 const readability = async (name) => {
581 const top = await measureReadability(page, READABILITY_EXCLUSIONS);
582 const scrolled = await scrollRegionsToEnd(page, READABILITY_EXCLUSIONS);
583 await page.waitForTimeout(200);
584 const bottom = await measureReadability(page, READABILITY_EXCLUSIONS);
585 await resetScroll(page, READABILITY_EXCLUSIONS);
586 const clipped = [...top.clipped, ...bottom.clipped];
587 const entry = {
588 name,
589 scrolledRegions: scrolled.length,
590 overlaps: top.overlaps.length + bottom.overlaps.length,
591 clipped: clipped.length,
592 cutWithoutHint: clipped.filter((item) => item.kind === 'cut-without-hint').length,
593 top: { candidates: top.candidates, overlaps: top.overlaps, clipped: top.clipped },
594 bottom: {
595 candidates: bottom.candidates,
596 overlaps: bottom.overlaps,
597 clipped: bottom.clipped,
598 },
599 };
600 extras.readability.push(entry);
601 report.overlapViolations += entry.overlaps;
602 report.clippingViolations += entry.clipped;
603 report.cutWithoutHint += entry.cutWithoutHint;
604 log(`Lesbarkeit ${name}: ${entry.overlaps} Ueberlagerungen, `
605 + `${entry.clipped} Beschneidungen (davon ${entry.cutWithoutHint} ohne Hinweis)`);
606 return entry;
607 };
608
609 // ------------------------------- 6a. Ruhezustand: eingeklappt (AC4)
610 await openApp(page, origin);

Callers 1

mainFunction · 0.70

Calls 5

measureReadabilityFunction · 0.90
scrollRegionsToEndFunction · 0.90
resetScrollFunction · 0.90
logFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected