Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(digital-twin): track list-based enrichment items in questionsAnswered

Adam Eivy8b9b379f50b5
diff --git a/client/src/components/digital-twin/tabs/EnrichTab.jsx b/client/src/components/digital-twin/tabs/EnrichTab.jsx
index 305705f8de..6120838d53 100644
--- a/client/src/components/digital-twin/tabs/EnrichTab.jsx
+++ b/client/src/components/digital-twin/tabs/EnrichTab.jsx
@@ -477,7 +477,7 @@ export default function EnrichTab({ onRefresh }) {
<div className="flex items-center justify-between text-xs">
<span className="text-gray-500">
- {catProgress?.answered || 0} questions answered
+ {catProgress?.answered || 0} {catProgress?.listBased ? 'items added' : 'questions answered'}
</span>
<span className={isComplete ? 'text-green-400' : 'text-gray-500'}>
{catProgress?.percentage || 0}%
diff --git a/server/services/digital-twin.js b/server/services/digital-twin.js
index 71dc3609b7..b5f61f471d 100644
--- a/server/services/digital-twin.js
+++ b/server/services/digital-twin.js
@@ -1138,11 +1138,13 @@ export async function getEnrichmentProgress() {
const progress = {};
for (const cat of categories) {
+ const config = ENRICHMENT_CATEGORIES[cat];
const answered = meta.enrichment.questionsAnswered?.[cat] || 0;
- const baseQuestions = ENRICHMENT_CATEGORIES[cat].questions.length;
+ const baseQuestions = config.questions.length;
progress[cat] = {
answered,
baseQuestions,
+ listBased: !!config.listBased,
completed: meta.enrichment.completedCategories.includes(cat),
percentage: Math.min(100, Math.round((answered / baseQuestions) * 100))
};
@@ -1293,6 +1295,11 @@ export async function saveEnrichmentListDocument(category, content, items) {
meta.enrichment.listItems = {};
}
meta.enrichment.listItems[category] = items;
+
+ // Track items as answered questions so progress displays correctly
+ if (!meta.enrichment.questionsAnswered) meta.enrichment.questionsAnswered = {};
+ meta.enrichment.questionsAnswered[category] = items.length;
+
meta.enrichment.lastSession = now();
// Ensure document is in meta