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

Function viewTexts

graph-ui/tools/handtest-fixes-chat.mjs:805–816  ·  view source on GitHub ↗
(page, label, shots)

Source from the content-addressed store, hash-verified

803/** What the Galaxy draws: its headline names the indexed node count, which differs per project, while the stage text has no paths. */
804const galaxyGraph = (page) => page.evaluate(() => ({ headline: globalThis.__atlasGalaxy?.headline ?? '', nodes: globalThis.__atlasGalaxy?.nodes ?? 0, target: globalThis.__atlasGalaxy?.lastTargetQn ?? '' }));
805async function viewTexts(page, label, shots) {
806 const texts = {};
807 let galaxy;
808 for (const item of K24_VIEWS) {
809 await showView(page, item);
810 texts[item.id] = await settledStage(page, item.workspace === 'galaxy' ? 45000 : 30000);
811 if (item.workspace === 'galaxy') { await galaxyReady(page); galaxy = await galaxyGraph(page); }
812 if (item.workspace === 'system') texts[item.id] += `\n${await page.locator('select option[value="project"]').first().innerText().catch(() => '')}`;
813 if (shots) await shot(page, 'K24', `${label}-${item.id}`, `${label}: ${item.id} after the switch.`);
814 }
815 return { texts, galaxy };
816}
817/** The same graph as the fresh Galaxy of the project: headline, node count and no selection carried over. */
818const sameGraph = (seen, fresh) => Boolean(seen && fresh) && seen.headline === fresh.headline && seen.nodes === fresh.nodes && seen.target === fresh.target;
819/** Requests sent once the address named `shown` that name `project` (URL parameter or JSON argument);

Callers 1

k24Function · 0.85

Calls 5

showViewFunction · 0.85
settledStageFunction · 0.85
galaxyGraphFunction · 0.85
galaxyReadyFunction · 0.70
shotFunction · 0.70

Tested by

no test coverage detected