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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: skip button on Quick Enrich now advances to a different question
Adam Eivy6b547c8b9036
diff --git a/.changelog/v0.11.x.md b/.changelog/v0.11.x.mdindex f3d5c605d5..652c8c02c0 100644--- a/.changelog/v0.11.x.md+++ b/.changelog/v0.11.x.md@@ -93,6 +93,11 @@ This release focuses on security improvements, bug fixes for the AI runner syste- **Immediate Task Blocking**: Both `terminateAgent()` and `killAgent()` in direct mode now immediately update the task to `blocked` with `user-terminated` category, matching the runner mode behavior. Previously, task blocking was deferred to the close handler, creating a window where server restarts could cause requeue- **Orphan Handler Guard**: `handleOrphanedTask()` now skips tasks already marked as `user-terminated`, preventing any residual requeue path+### Quick Enrich Skip Returns Same Question+- **Skip now advances to a different question**: Clicking "Skip" on Quick Enrich prompts (both in the overview banner and the full EnrichTab) previously returned the exact same question, because question selection was deterministic based on `questionsAnswered` count which skip didn't increment+- **Client tracks skipped indices**: Both NextActionBanner and EnrichTab now maintain a `skippedIndices` list for the current session, passing it to the server so it can serve the next non-skipped question+- **Works for all question types**: Predefined questions skip by index, scale questions skip by negative-offset convention, and AI-generated questions already vary via temperature+### Digital Twin Personality Trait Confidence Display & Recalculation- **Low confidence bars now grey instead of red**: Personality trait bars with low confidence (<60%) now display as grey rather than red, avoiding the false impression of errors when data is simply unverified or sparse- **Confidence recalculates after trait analysis**: Running "Analyze Traits" or processing an AI interview assessment now automatically recalculates confidence scores, so the displayed confidence reflects the latest data instead of remaining stale from a previous manual calculationdiff --git a/client/src/components/digital-twin/NextActionBanner.jsx b/client/src/components/digital-twin/NextActionBanner.jsxindex 5dd2f7f6f2..48ecce86e6 100644--- a/client/src/components/digital-twin/NextActionBanner.jsx+++ b/client/src/components/digital-twin/NextActionBanner.jsx@@ -40,6 +40,7 @@ export default function NextActionBanner({ gaps, status, traits, onRefresh }) {const [scaleValue, setScaleValue] = useState(null);const [loading, setLoading] = useState(false);const [submitting, setSubmitting] = useState(false);+ const [skippedIndices, setSkippedIndices] = useState([]);const hasTraits = traits && Object.keys(traits).length > 0;const hasEnrichment = (status?.enrichmentProgress?.completedCategories || 0) > 0;@@ -52,13 +53,14 @@ export default function NextActionBanner({ gaps, status, traits, onRefresh }) {// Load a question for the top gap's category (only for Q&A categories)useEffect(() => {if (topCategory && !isListBased) {+ setSkippedIndices([]);loadQuestion(topCategory);}}, [topCategory, isListBased]);- const loadQuestion = async (category) => {+ const loadQuestion = async (category, skipList = []) => {setLoading(true);- const q = await api.getSoulEnrichQuestion(category).catch(() => null);+ const q = await api.getSoulEnrichQuestion(category, undefined, undefined, skipList.length ? skipList : undefined).catch(() => null);setQuestion(q);setAnswer('');setScaleValue(null);@@ -93,13 +95,18 @@ export default function NextActionBanner({ gaps, status, traits, onRefresh }) {toast.success(isScale ? 'Rating saved' : 'Answer saved');setAnswer('');setScaleValue(null);+ setSkippedIndices([]);onRefresh?.();await loadQuestion(topCategory);setSubmitting(false);};const handleSkip = () => {- if (topCategory) loadQuestion(topCategory);+ if (!topCategory || !question) return;+ const idx = question.questionType === 'scale' ? -(question.scaleIndex + 1) : question.questionIndex;+ const nextSkipped = idx != null ? [...skippedIndices, idx] : skippedIndices;+ setSkippedIndices(nextSkipped);+ loadQuestion(topCategory, nextSkipped);};const handleKeyDown = (e) => {diff --git a/client/src/components/digital-twin/tabs/EnrichTab.jsx b/client/src/components/digital-twin/tabs/EnrichTab.jsxindex 9ee42776d6..78fe959003 100644--- a/client/src/components/digital-twin/tabs/EnrichTab.jsx+++ b/client/src/components/digital-twin/tabs/EnrichTab.jsx@@ -33,6 +33,7 @@ export default function EnrichTab({ onRefresh }) {const [scaleValue, setScaleValue] = useState(null);const [submitting, setSubmitting] = useState(false);const [loadingQuestion, setLoadingQuestion] = useState(false);+ const [skippedIndices, setSkippedIndices] = useState([]);// Writing sample analysisconst [showWritingAnalysis, setShowWritingAnalysis] = useState(false);@@ -157,9 +158,9 @@ export default function EnrichTab({ onRefresh }) {}};- const loadQuestion = async (categoryId) => {+ const loadQuestion = async (categoryId, skipList = []) => {setLoadingQuestion(true);- const question = await api.getSoulEnrichQuestion(categoryId);+ const question = await api.getSoulEnrichQuestion(categoryId, undefined, undefined, skipList.length ? skipList : undefined);setCurrentQuestion(question);setAnswer('');setScaleValue(null);@@ -198,6 +199,7 @@ export default function EnrichTab({ onRefresh }) {await api.submitSoulEnrichAnswer(payload);toast.success(isScale ? 'Rating saved' : 'Answer saved');+ setSkippedIndices([]);await loadData();// Load next question@@ -207,7 +209,10 @@ export default function EnrichTab({ onRefresh }) {};const skipQuestion = async () => {- await loadQuestion(activeCategory);+ const idx = currentQuestion?.questionType === 'scale' ? -(currentQuestion.scaleIndex + 1) : currentQuestion?.questionIndex;+ const nextSkipped = idx != null ? [...skippedIndices, idx] : skippedIndices;+ setSkippedIndices(nextSkipped);+ await loadQuestion(activeCategory, nextSkipped);};const exitCategory = () => {@@ -215,6 +220,7 @@ export default function EnrichTab({ onRefresh }) {setCurrentQuestion(null);setAnswer('');setScaleValue(null);+ setSkippedIndices([]);};if (loading) {diff --git a/client/src/services/api.js b/client/src/services/api.jsindex 361840f44d..0a03a13e8f 100644--- a/client/src/services/api.js+++ b/client/src/services/api.js@@ -739,9 +739,9 @@ export const getDigitalTwinEnrichCategories = () => request('/digital-twin/enricexport const getSoulEnrichCategories = getDigitalTwinEnrichCategories;export const getDigitalTwinEnrichProgress = () => request('/digital-twin/enrich/progress');export const getSoulEnrichProgress = getDigitalTwinEnrichProgress;-export const getDigitalTwinEnrichQuestion = (category, providerOverride, modelOverride) => request('/digital-twin/enrich/question', {+export const getDigitalTwinEnrichQuestion = (category, providerOverride, modelOverride, skipIndices) => request('/digital-twin/enrich/question', {method: 'POST',- body: JSON.stringify({ category, providerOverride, modelOverride })+ body: JSON.stringify({ category, providerOverride, modelOverride, ...(skipIndices?.length ? { skipIndices } : {}) })});export const getSoulEnrichQuestion = getDigitalTwinEnrichQuestion;export const submitDigitalTwinEnrichAnswer = (data) => request('/digital-twin/enrich/answer', {@@ -825,6 +825,13 @@ export const saveDigitalTwinImport = (source, suggestedDoc) => request('/digitalbody: JSON.stringify({ source, suggestedDoc })});+// Digital Twin - Assessment Analyzer+export const analyzeAssessment = (content, providerId, model) =>+ request('/digital-twin/interview/analyze', {+ method: 'POST',+ body: JSON.stringify({ content, providerId, model })+ });+// Digital Twin - Social Accountsexport const getSocialAccounts = (params = {}) => {const qs = new URLSearchParams(params).toString();diff --git a/server/lib/digitalTwinValidation.js b/server/lib/digitalTwinValidation.jsindex 73b36d93f4..b5418653ef 100644--- a/server/lib/digitalTwinValidation.js+++ b/server/lib/digitalTwinValidation.js@@ -206,7 +206,8 @@ export const runMultiTestsInputSchema = z.object({export const enrichmentQuestionInputSchema = z.object({category: enrichmentCategoryEnum,providerOverride: z.string().optional(),- modelOverride: z.string().optional()+ modelOverride: z.string().optional(),+ skipIndices: z.array(z.number().int().min(0)).optional()});// Enrichment answer inputdiff --git a/server/routes/digital-twin.js b/server/routes/digital-twin.jsindex 6ddac66b9c..69b485a02f 100644--- a/server/routes/digital-twin.js+++ b/server/routes/digital-twin.js@@ -32,7 +32,8 @@ import {analyzeTraitsInputSchema,updateTraitsInputSchema,calculateConfidenceInputSchema,- importDataInputSchema+ importDataInputSchema,+ analyzeAssessmentInputSchema} from '../lib/digitalTwinValidation.js';const router = Router();@@ -250,8 +251,8 @@ router.post('/enrich/question', asyncHandler(async (req, res) => {});}- const { category, providerOverride, modelOverride } = validation.data;- const question = await digitalTwinService.generateEnrichmentQuestion(category, providerOverride, modelOverride);+ const { category, providerOverride, modelOverride, skipIndices } = validation.data;+ const question = await digitalTwinService.generateEnrichmentQuestion(category, providerOverride, modelOverride, skipIndices);res.json(question);}));@@ -549,6 +550,37 @@ router.get('/gaps', asyncHandler(async (req, res) => {res.json({ gaps });}));+// =============================================================================+// ASSESSMENT ANALYZER+// =============================================================================++/**+ * POST /api/digital-twin/interview/analyze+ * Analyze a pasted personality assessment and update twin profile+ */+router.post('/interview/analyze', asyncHandler(async (req, res) => {+ const validation = validate(analyzeAssessmentInputSchema, req.body);+ if (!validation.success) {+ throw new ServerError('Validation failed', {+ status: 400,+ code: 'VALIDATION_ERROR',+ context: { details: validation.errors }+ });+ }++ const { content, providerId, model } = validation.data;+ const result = await digitalTwinService.analyzeAssessment(content, providerId, model);++ if (result.error) {+ throw new ServerError(result.error, {+ status: 400,+ code: 'ANALYSIS_ERROR'+ });+ }++ res.json(result);+}));+// =============================================================================// EXTERNAL DATA IMPORT (Phase 4)// =============================================================================diff --git a/server/services/digital-twin.js b/server/services/digital-twin.jsindex 4d380c6bee..4513ace9e9 100644--- a/server/services/digital-twin.js+++ b/server/services/digital-twin.js@@ -880,7 +880,7 @@ export function getEnrichmentCategories() {}));}-export async function generateEnrichmentQuestion(category, providerOverride, modelOverride) {+export async function generateEnrichmentQuestion(category, providerOverride, modelOverride, skipIndices = []) {const config = ENRICHMENT_CATEGORIES[category];if (!config) {throw new Error(`Unknown enrichment category: ${category}`);@@ -888,25 +888,36 @@ export async function generateEnrichmentQuestion(category, providerOverride, modconst meta = await loadMeta();const questionsAnswered = meta.enrichment.questionsAnswered?.[category] || 0;+ const skipped = new Set(skipIndices);// Use predefined questions firstif (questionsAnswered < config.questions.length) {- return {- questionId: generateId(),- category,- question: config.questions[questionsAnswered],- isGenerated: false,- questionNumber: questionsAnswered + 1,- totalQuestions: config.questions.length- };+ // Find the next non-skipped predefined question+ let idx = questionsAnswered;+ while (idx < config.questions.length && skipped.has(idx)) idx++;+ if (idx < config.questions.length) {+ return {+ questionId: generateId(),+ category,+ question: config.questions[idx],+ questionIndex: idx,+ isGenerated: false,+ questionNumber: questionsAnswered + 1,+ totalQuestions: config.questions.length+ };+ }+ // All remaining predefined questions were skipped — fall through to scale/AI}// Serve unanswered scale questions for this categoryconst answered = meta.enrichment.scaleQuestionsAnswered || {};const categoryScaleQuestions = SCALE_QUESTIONS.filter(q => q.category === category);const unanswered = categoryScaleQuestions.filter(q => !(q.id in answered));- if (unanswered.length > 0) {- const sq = unanswered[0];+ // Filter out skipped scale questions (stored as negative indices: -(scaleIndex+1))+ const available = unanswered.filter((_, i) => !skipped.has(-(i + 1)));+ if (available.length > 0) {+ const sq = available[0];+ const scaleIndex = unanswered.indexOf(sq);return {questionId: generateId(),category,@@ -915,6 +926,7 @@ export async function generateEnrichmentQuestion(category, providerOverride, modlabels: sq.labels,dimension: sq.dimension,scaleQuestionId: sq.id,+ scaleIndex,isGenerated: false,questionNumber: questionsAnswered + 1,totalQuestions: config.questions.length + categoryScaleQuestions.length