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

Function viewOnlyControls

graph-ui/tools/smoke-w10.mjs:650–684  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

648
649/** Die Schalter, die keine Rechenzeit kosten und darum bleiben, wo sie sind. */
650const viewOnlyControls = (page) =>
651 page.evaluate(() => {
652 const box = (node) => {
653 if (node === null) {
654 return null;
655 }
656 const rect = node.getBoundingClientRect();
657 return { width: Math.round(rect.width), height: Math.round(rect.height) };
658 };
659 const legendToggle = document.querySelector('[data-testid="atlas-galaxy-legend-toggle"]');
660 return {
661 legendToggle: {
662 present: legendToggle !== null,
663 expanded: legendToggle?.getAttribute('aria-expanded') ?? '',
664 rect: box(legendToggle),
665 },
666 legendOpen: document.querySelector('[data-testid="atlas-galaxy-legend"]') !== null,
667 modeChips: [...document.querySelectorAll('[data-testid="atlas-graph-mode-chip"]')]
668 .map((node) => ({
669 mode: node.getAttribute('data-mode') ?? '',
670 active: node.getAttribute('data-active') ?? '',
671 rect: box(node),
672 })),
673 edgeFilters: [...document.querySelectorAll('[data-testid="atlas-galaxy-legend-swatch"]')]
674 .filter((node) => node.tagName === 'BUTTON')
675 .map((node) => node.getAttribute('data-type') ?? ''),
676 twinDepth: {
677 present: document.querySelector('[data-testid="atlas-twin-depth"]') !== null,
678 rect: box(document.querySelector('[data-testid="atlas-twin-depth"]')),
679 value: document.querySelector('[data-testid="atlas-twin-depth"]')?.value ?? '',
680 name: (document.querySelector('[data-testid="atlas-twin-depth-name"]')?.textContent ?? '')
681 .trim(),
682 },
683 };
684 });
685
686/** Wie das lokale Modell in der Statusleiste heisst. Wortgleich mit smoke-w7c. */
687const statusChip = (page) =>

Callers 1

mainFunction · 0.85

Calls 1

boxFunction · 0.70

Tested by

no test coverage detected