personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

convey/health: migrate retry-import to wave 0 primitives (wave 2)

Move retry-import to apiJson and surface row-local errors.
Keep the retry button enabled again after failures and drop the special not-implemented branch.

+19 -10
+19 -10
apps/health/workspace.html
··· 1741 1741 if (!btn) return; 1742 1742 const importId = btn.dataset.importId; 1743 1743 if (!importId) return; 1744 + const card = btn.closest('[data-key]'); 1745 + const errorEl = card?.querySelector('.activity-card-error'); 1744 1746 btn.disabled = true; 1745 1747 btn.textContent = 'Retrying...'; 1746 - fetch('/app/health/api/retry-import', { 1748 + window.apiJson('/app/health/api/retry-import', { 1747 1749 method: 'POST', 1748 1750 headers: { 'Content-Type': 'application/json' }, 1749 1751 body: JSON.stringify({ import_id: importId }) 1750 1752 }) 1751 - .then(r => r.json()) 1752 - .then(data => { 1753 - btn.textContent = data.status === 'not_implemented' ? 'Not yet available' : 'Retry sent'; 1754 - btn.style.color = '#9ca3af'; 1755 - }) 1756 - .catch(() => { 1757 - btn.textContent = 'Retry failed'; 1758 - btn.style.color = '#dc2626'; 1759 - }); 1753 + .then(() => { 1754 + btn.textContent = 'Retry sent'; 1755 + btn.style.color = '#9ca3af'; 1756 + if (errorEl) { 1757 + errorEl.textContent = ''; 1758 + } 1759 + }) 1760 + .catch((err) => { 1761 + window.logError(err, { context: 'health: retry-import failed' }); 1762 + btn.disabled = false; 1763 + btn.textContent = 'Retry'; 1764 + btn.style.color = ''; 1765 + if (errorEl) { 1766 + errorEl.textContent = err.serverMessage || 'Retry failed'; 1767 + } 1768 + }); 1760 1769 }); 1761 1770 1762 1771 // Client-side elapsed time updater