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

Function readability

graph-ui/tools/smoke-w12.mjs:3215–3242  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

3213 };
3214
3215 const readability = async (name) => {
3216 await closeTooltips(page);
3217 const top = await measureReadability(page, READABILITY_EXCLUSIONS);
3218 const scrolled = await scrollRegionsToEnd(page, READABILITY_EXCLUSIONS);
3219 await page.waitForTimeout(200);
3220 const bottom = await measureReadability(page, READABILITY_EXCLUSIONS);
3221 await resetScroll(page, READABILITY_EXCLUSIONS);
3222 const overlaps = [...top.overlaps, ...bottom.overlaps];
3223 const clipped = [...top.clipped, ...bottom.clipped];
3224 return {
3225 name,
3226 scrolledRegions: scrolled.length,
3227 candidates: { top: top.candidates, bottom: bottom.candidates },
3228 overlaps: overlaps.length,
3229 clipped: clipped.length,
3230 cutWithoutHint: clipped.filter((entry) => entry.kind === 'cut-without-hint').length,
3231 detail: {
3232 overlaps: overlaps.slice(0, 12).map((entry) => ({
3233 a: entry.a.path, b: entry.b.path,
3234 text: `${entry.a.text} / ${entry.b.text}`.slice(0, 200),
3235 })),
3236 clipped: clipped.slice(0, 12).map((entry) => ({
3237 kind: entry.kind, path: entry.element.path,
3238 text: String(entry.element.text).slice(0, 200),
3239 })),
3240 },
3241 };
3242 };
3243
3244 // ------------------------------------------------ 5a. Die Zustaende
3245 for (const state of wantedStates) {

Callers 1

runStateFunction · 0.70

Calls 4

closeTooltipsFunction · 0.90
measureReadabilityFunction · 0.90
scrollRegionsToEndFunction · 0.90
resetScrollFunction · 0.90

Tested by

no test coverage detected