| 60 | // --------------------------------------------------------------------------- |
| 61 | |
| 62 | const Matrix = () => { |
| 63 | const [manifest, setManifest] = useState<Manifest | null>(null); |
| 64 | const [error, setError] = useState<string | null>(null); |
| 65 | useEffect(() => { |
| 66 | fetch("manifest.json") |
| 67 | .then((r) => r.json()) |
| 68 | .then(setManifest) |
| 69 | .catch((e) => setError(String(e))); |
| 70 | }, []); |
| 71 | |
| 72 | if (error) return <div className="page error-text">failed to load manifest.json: {error}</div>; |
| 73 | if (!manifest) return <div className="page dim">loading…</div>; |
| 74 | |
| 75 | const targets = [...new Set(manifest.runs.map((r) => r.target))].sort(); |
| 76 | const scenarios = [ |
| 77 | ...new Set([...manifest.runs, ...manifest.skips].map((r) => r.scenario)), |
| 78 | ].sort(); |
| 79 | const runFor = (scenario: string, target: string) => |
| 80 | manifest.runs |
| 81 | .filter((r) => r.scenario === scenario && r.target === target) |
| 82 | .sort((a, b) => (b.endedAt ?? 0) - (a.endedAt ?? 0))[0]; |
| 83 | const skipFor = (scenario: string, target: string) => |
| 84 | manifest.skips.find((s) => s.scenario === scenario && s.target === target); |
| 85 | |
| 86 | return ( |
| 87 | <div className="page"> |
| 88 | <h1>Executor e2e — every scenario, on every deployment</h1> |
| 89 | <p className="hint"> |
| 90 | Click a result for that run's artifacts (Playwright trace, video, screenshots, failure |
| 91 | output). “—” = capability not on that target. |
| 92 | </p> |
| 93 | <table> |
| 94 | <thead> |
| 95 | <tr> |
| 96 | <th>scenario</th> |
| 97 | {targets.map((t) => ( |
| 98 | <th key={t}>{t}</th> |
| 99 | ))} |
| 100 | </tr> |
| 101 | </thead> |
| 102 | <tbody> |
| 103 | {scenarios.map((scenario) => ( |
| 104 | <tr key={scenario}> |
| 105 | <td>{scenario}</td> |
| 106 | {targets.map((target) => { |
| 107 | const run = runFor(scenario, target); |
| 108 | if (run) { |
| 109 | return ( |
| 110 | <td key={target}> |
| 111 | <a |
| 112 | className={`watch ${run.ok ? "ok" : "no"}`} |
| 113 | href={`#/${run.target}/${run.slug}`} |
| 114 | > |
| 115 | {run.ok ? "✓ passed" : "✗ FAILED"} |
| 116 | {run.durationMs != null && ( |
| 117 | <span className="d"> {(run.durationMs / 1000).toFixed(1)}s</span> |
| 118 | )} |
| 119 | </a> |