xinetzone/SpecWeave / .agents/skills/dashboard-page
Dashboard Page
UnverifiedUse when the user wants to create a stable local/offline ECharts dashboard with KPI panels, time controls, auditable source modals, and optional daily data snapshots produced by automations.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.2 KB |
| assets/dashboard_runtime.js | script | 8.6 KB |
| assets/dashboard_template.py | script | 42.7 KB |
| assets/echarts.min.js | script | 1006.7 KB |
| references/dashboard-structure.md | markdown | 2.5 KB |
| references/data-and-automation.md | markdown | 3.2 KB |
| references/output-layout.md | markdown | 2.2 KB |
| references/visual-interactions.md | markdown | 7.3 KB |
| scripts/validate-echarts-dashboard.mjs | script | 3.0 KB |
scripts/validate-echarts-dashboard.mjs
View on GitHub#!/usr/bin/env node
import fs from "node:fs";
import path from "node:path";
const file = process.argv[2];
if (!file) {
console.error("Usage: node validate-echarts-dashboard.mjs path/to/dashboard.html");
process.exit(2);
}
const html = fs.readFileSync(file, "utf8");
const visible = html.split('<div id="modalBackdrop"', 1)[0];
const checks = [];
function count(pattern) {
const matches = html.match(pattern);
return matches ? matches.length : 0;
}
function visibleCount(pattern) {
const matches = visible.match(pattern);
return matches ? matches.length : 0;
}
function check(condition, message) {
checks.push({ ok: Boolean(condition), message });
}
const dashboardShells = visibleCount(/<main class="dashboard-shell"/g);
const kpiTiles = visibleCount(/<section class="kpi-tile"/g);
const chartPanels = visibleCount(/<section class="dashboard-panel chart-panel"/g);
const tablePanels = visibleCount(/<section class="dashboard-panel table-panel"/g);
const chartDivs = visibleCount(/<div class="chart" id="[^"]+"/g);
const chartFactories = count(/const chartFactories\s*=/g);
const runtimeCalls = count(/setupDashboardRuntime\s*\(/g);
check(html.includes("data-range-preset"), "has segmented time presets");
check(html.includes("rangeStart") && html.includes("rangeEnd"), "has explicit date range inputs");
check(html.includes("activeRangeLabel"), "has active range label");
check(html.includes("dataFreshness"), "has data freshness indicator");
check(html.includes("modalBackdrop"), "has Data Source modal");
check(runtimeCalls >= 1, "calls setupDashboardRuntime");
check(chartFactories >= 1, "declares chartFactories");
check(dashboardShells === 1, "has one dashboard shell");
check(kpiTiles >= 1, "has at least one KPI tile");
check(chartPanels >= 1, "has at least one chart panel");
check(chartDivs >= chartPanels, "chart panels have chart containers");
check(tablePanels >= 0, "table panel count is valid");
check(!html.includes("<nav class=\"toc-rail\""), "does not use report TOC rail");
check(!html.includes("<article class=\"report-card\""), "does not use report-card feed markup");
check(!html.includes("<header class=\"report-title\""), "does not use document report title header");
check(html.includes("View Data Source"), "has View Data Source action");
check(html.includes("toggleEdit"), "has Edit chart action");
check(!html.includes("toISOString().slice(0, 10)"), "does not format business dates through UTC");
check(!html.includes("[TITLE]"), "does not contain [TITLE] placeholder");
check(!html.includes("TODO"), "does not contain TODO placeholder");
check(html.startsWith("<!-- Generated by Trae Work -->\n"), "starts with Trae rendering comment");
const failed = checks.filter((item) => !item.ok);
for (const item of checks) {
const prefix = item.ok ? "ok" : "fail";
console.log(`${prefix} - ${item.message}`);
}
console.log(
`summary - ${path.basename(file)}: ${kpiTiles} KPI tiles, ${chartPanels} chart panels, ${tablePanels} table panels`
);
if (failed.length) {
process.exit(1);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |