@@ -549,9 +599,16 @@
// Resize graph when becoming visible again
network.redraw();
network.fit();
+ loadGraph();
} else if (tabId === 'activity-tab') {
const feed = document.getElementById('activity-feed');
feed.scrollTop = feed.scrollHeight;
+ } else if (tabId === 'task-tab') {
+ loadTasks();
+ } else if (tabId === 'sticky-tab') {
+ loadStickyNotes();
+ } else {
+ loadAllExtras();
}
}
@@ -986,6 +1043,82 @@
}
}
+ async function loadGenericList(endpoint, containerId, formatter) {
+ try {
+ const res = await fetch(endpoint);
+ const data = await res.json();
+ const container = document.getElementById(containerId);
+ if (!container) return;
+
+ if (!data || data.length === 0) {
+ container.innerHTML = '
No items recorded.
';
+ return;
+ }
+
+ container.innerHTML = data.map(item => {
+ const date = item.timestamp ? new Date(item.timestamp * 1000).toLocaleString() : '';
+ return `
+
${date}
+ ${formatter(item)}
+
`;
+ }).join('');
+ } catch (err) {
+ console.error(`Failed to load ${endpoint}`, err);
+ }
+ }
+
+ function loadAllExtras() {
+ loadGenericList('/api/tech_debts', 'techdebt-container', item => `
+
${item.title}
+
${item.description}
+
+ Severity: ${item.severity || 'Medium'}
+ Status: ${item.status || 'open'}
+
+ `);
+
+ loadGenericList('/api/error_fixes', 'errorfixes-container', item => `
+
${item.error_message || 'Error'}
+
Fix: ${item.fix_description || ''}
+
Files: ${(item.files_changed || []).join(', ')}
+ `);
+
+ loadGenericList('/api/adrs', 'adrs-container', item => `
+
${item.title}
+
Context: ${item.context || ''}
+
Decision: ${item.decision || ''}
+
Consequences: ${item.consequences || ''}
+ `);
+
+ loadGenericList('/api/context_workspaces', 'workspaces-container', item => `
+
${item.name}
+
${item.description || ''}
+
${(item.paths || []).join(', ')}
+ `);
+
+ loadGenericList('/api/handoff_memos', 'memos-container', item => `
+
Memo from ${item.author || 'System'}
+
${item.content || item.summary || ''}
+ `);
+
+ loadGenericList('/api/snippets', 'snippets-container', item => `
+
${item.description || 'Snippet'}
+
Language: ${item.language || 'txt'} | Tags: ${(item.tags || []).join(', ')}
+
${item.content || item.code || ''}
+ `);
+
+ loadGenericList('/api/pr_checklists', 'pr-container', item => `
+
${item.name || 'Checklist'}
+
+ ${(item.items || []).map(i => {
+ const check = i.is_completed ? '☑' : '☐';
+ const strike = i.is_completed ? 'text-decoration:line-through; color:var(--text-secondary);' : '';
+ return `- ${check} ${i.description}
`;
+ }).join('')}
+
+ `);
+ }
+
async function loadVersion() {
try {
const res = await fetch('/api/version');
@@ -1005,6 +1138,7 @@
loadTasks();
loadStickyNotes();
loadActivityHistory();
+ loadAllExtras();
setupWS();
// Listen to theme toggle changes to update graph font colors
@@ -1015,6 +1149,7 @@
loadGraph();
loadTasks();
loadStickyNotes();
+ loadAllExtras();
}, 5000);