[id].astro (1501B)
1 --- 2 import Base from "../../layouts/Base.astro"; 3 import { loadAllRuns, getAxisValues } from "../../lib/data"; 4 import CellDetail from "../../components/CellDetail"; 5 6 export function getStaticPaths() { 7 const runs = loadAllRuns(); 8 const axisValues = getAxisValues(runs); 9 10 // Group runs by cell_id 11 const cells = new Map(); 12 for (const run of runs) { 13 const id = run.meta.cell_id; 14 if (!cells.has(id)) cells.set(id, []); 15 cells.get(id).push(run); 16 } 17 18 return [...cells.entries()].map(([cellId, cellRuns]) => ({ 19 params: { id: cellId }, 20 props: { cellRuns, axisValues }, 21 })); 22 } 23 24 const { cellRuns, axisValues } = Astro.props; 25 const firstRun = cellRuns[0]; 26 const configSummary = `${firstRun.meta.model} / ${firstRun.meta.prompt_style} / ${firstRun.meta.language}`; 27 --- 28 29 <Base title={`${firstRun.meta.task} - ${configSummary}`}> 30 <div style="margin-bottom: 16px;"> 31 <a href="/" style="font-size: 0.875rem;">Back to Grid</a> 32 </div> 33 <div style="display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px;"> 34 <h1 style="font-size: 1.5rem;">{firstRun.meta.task}</h1> 35 <span style="color: var(--text-muted); font-size: 0.875rem;">{cellRuns.length} runs</span> 36 </div> 37 <p style="color: var(--text-muted); margin-bottom: 24px; font-size: 0.8rem;"> 38 {configSummary} 39 </p> 40 41 <CellDetail client:load runs={cellRuns} axisValues={axisValues} /> 42 </Base> 43 44 <style> 45 :global(.container) { 46 max-width: none !important; 47 padding: 0 32px !important; 48 } 49 </style>