diff --git a/network-poc/static/index.html b/network-poc/static/index.html
index 00a3fa5..de17040 100644
--- a/network-poc/static/index.html
+++ b/network-poc/static/index.html
@@ -2191,7 +2191,7 @@ IMPORTANT: Include get_db() dependency for FastAPI` },
// Globaali storage projektikorttien tiedostoille (välttää JSON data-attribuuttien ongelmat)
const projectFiles = {};
- function renderProjectCard(files, projectName) {
+ function renderProjectCard(files, projectName, reportUrl) {
const fileEntries = Object.entries(files);
if (fileEntries.length === 0) return;
@@ -2219,6 +2219,7 @@ IMPORTANT: Include get_db() dependency for FastAPI` },
+ ${reportUrl ? `📄 Raportti` : ''}
${tabsHtml}
@@ -2736,8 +2737,83 @@ ${fixableFiles}`;
pipelineStep('coder', 'Korjaukset', 'done', 'Korjaukset generoitu', fixedCode);
}
+ // Generoidaan projektin dokumentaatio HTML-raporttina
+ const reportHtml = generateProjectReport(task, generatedFiles, pipelineSteps, staticIssues);
+ const reportBlob = new Blob([reportHtml], { type: 'text/html' });
+ const reportUrl = URL.createObjectURL(reportBlob);
+
termLog(`\n━━━ Pipeline valmis (${Object.keys(generatedFiles).length} tiedostoa) ━━━`);
- renderProjectCard(generatedFiles, task);
+ termLog(` 📄 Avaa projektiraportti`);
+ renderProjectCard(generatedFiles, task, reportUrl);
+ }
+
+ function generateProjectReport(task, files, steps, staticIssues) {
+ const fileEntries = Object.entries(files);
+ const agentNames = { manager: 'Manageri', coder: 'Koodari', tester: 'DevOps', qa: 'QA', data: 'Data' };
+ const agentColors = { manager: '#d29922', coder: '#3fb950', tester: '#58a6ff', qa: '#a371f7', data: '#d2a8ff' };
+
+ const stepsHtml = steps.map((s, i) => {
+ const color = agentColors[s.agent] || '#8b949e';
+ const icon = s.status === 'done' ? '✓' : '◷';
+ const outputPreview = (s.output || '').substring(0, 500);
+ return `
+
+
+ ${icon} ${agentNames[s.agent] || s.agent} — ${s.label}
+ Vaihe ${i + 1}
+
+ ${s.input ? `
Prompti
${s.input.replace(/` : ''}
+ ${outputPreview ? `
${outputPreview.replace(/` : ''}
+ `;
+ }).join('');
+
+ const filesHtml = fileEntries.map(([name, content]) => `
+
+
${name}
+
${(content || '').replace(/
+ `).join('');
+
+ const staticHtml = (staticIssues || []).length > 0
+ ? `
+
Staattinen analyysi (${staticIssues.length} huomautusta)
+
${staticIssues.map(i => `- ${i}
`).join('')}
+
`
+ : '✓ Staattinen analyysi: ei huomautuksia
';
+
+ return `
+
+
+
+
+Kipinä Raportti — ${task}
+
+
+
+🔥 Kipinä Projektiraportti
+${task} — ${new Date().toLocaleString('fi-FI')} — ${fileEntries.length} tiedostoa, ${steps.length} vaihetta
+
+📋 Pipeline-vaiheet
+${stepsHtml}
+
+🔍 Staattinen analyysi
+${staticHtml}
+
+📁 Tiedostot
+${filesHtml}
+
+
+Generoitu Kipinä Agentic Playground v0.2.2 — kipina.studio
+`;
}
// Yksinkertainen pipeline (vanha: manageri → koodari → testaaja)