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

Function readability

graph-ui/tools/smoke-w9.mjs:751–771  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

749 await mkdir(OUT_DIR, { recursive: true });
750
751 const readability = async (name) => {
752 const top = await measureReadability(page, READABILITY_EXCLUSIONS);
753 const scrolled = await scrollRegionsToEnd(page, READABILITY_EXCLUSIONS);
754 await page.waitForTimeout(200);
755 const bottom = await measureReadability(page, READABILITY_EXCLUSIONS);
756 await resetScroll(page, READABILITY_EXCLUSIONS);
757 extras.readability.push({
758 name,
759 scrolledRegions: scrolled.length,
760 top: { candidates: top.candidates, overlaps: top.overlaps, clipped: top.clipped },
761 bottom: {
762 candidates: bottom.candidates,
763 overlaps: bottom.overlaps,
764 clipped: bottom.clipped,
765 },
766 });
767 report.overlapViolations += top.overlaps.length + bottom.overlaps.length;
768 report.clippingViolations += top.clipped.length + bottom.clipped.length;
769 report.cutWithoutHint += [...top.clipped, ...bottom.clipped]
770 .filter((entry) => entry.kind === 'cut-without-hint').length;
771 };
772
773 await openApp(page, origin);
774

Callers 1

mainFunction · 0.70

Calls 4

measureReadabilityFunction · 0.90
scrollRegionsToEndFunction · 0.90
resetScrollFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected