fix(dashboard): avoid node-only ui imports in browser

This commit is contained in:
vincez-hms-coder
2026-04-27 08:56:52 -04:00
parent 58c07867e3
commit 1745cfc6d7
11 changed files with 103 additions and 38 deletions

View File

@@ -0,0 +1,15 @@
"""Static dashboard tests for browser-safe @nous-research/ui imports."""
from pathlib import Path
WEB_SRC = Path(__file__).resolve().parents[2] / "web" / "src"
def test_dashboard_does_not_import_nous_ui_root_barrel():
offenders = []
for path in WEB_SRC.rglob("*.tsx"):
content = path.read_text(encoding="utf-8")
if 'from "@nous-research/ui"' in content or "from '@nous-research/ui'" in content:
offenders.append(str(path.relative_to(WEB_SRC)))
assert offenders == []