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
address review: fix text answer schema, comparison, and memory-fill-blank routing
Adam Eivy9e6c53aae468
diff --git a/client/src/components/meatspace/post/PostDrillRunner.jsx b/client/src/components/meatspace/post/PostDrillRunner.jsxindex 16d0640d59..159b782d36 100644--- a/client/src/components/meatspace/post/PostDrillRunner.jsx+++ b/client/src/components/meatspace/post/PostDrillRunner.jsx@@ -92,7 +92,9 @@ export default function PostDrillRunner({ session }) {if (state !== 'drilling' || !currentDrill) return null;const question = currentDrill.questions[currentQuestionIndex];- const isTextDrill = MEMORY_DRILL_TYPES.includes(currentDrill.type);+ const isTextDrill =+ MEMORY_DRILL_TYPES.includes(currentDrill.type) &&+ currentDrill.type !== 'memory-fill-blank';const timePct = timeLimitMs > 0 ? (timeLeft / timeLimitMs) * 100 : 0;const progressPct = totalQuestions > 0 ? ((currentQuestionIndex + 1) / totalQuestions) * 100 : 0;diff --git a/client/src/hooks/usePostSession.js b/client/src/hooks/usePostSession.jsindex d04c3f52f6..04e0c573cf 100644--- a/client/src/hooks/usePostSession.js+++ b/client/src/hooks/usePostSession.js@@ -128,14 +128,14 @@ export function usePostSession() {const q = currentDrill.questions?.[currentQuestionIndex];if (!q) return;const responseMs = Date.now() - questionStartRef.current;- const isTextAnswer = typeof q.expected === 'string' && isNaN(Number(q.expected));+ const isTextAnswer = typeof q.expected === 'string';// For estimation drills, check within tolerancelet correct;let answered;if (isTextAnswer) {answered = value;- correct = value !== null && value.toLowerCase().trim() === q.expected.toLowerCase().trim();+ correct = value !== null && String(value).toLowerCase().trim() === String(q.expected).toLowerCase().trim();} else if (currentDrill.type === 'estimation') {answered = value === null ? null : Number(value);const tolerance = (currentDrill.config?.tolerancePct || 10) / 100;diff --git a/server/lib/postValidation.js b/server/lib/postValidation.jsindex ac06088f39..a2376de24c 100644--- a/server/lib/postValidation.js+++ b/server/lib/postValidation.js@@ -11,8 +11,8 @@ export const postTagsSchema = z.record(z.string().max(200));// expected and correct are optional — the server recomputes both via scoreDrillconst questionResultSchema = z.object({prompt: z.string(),- expected: z.number().optional(),- answered: z.number().nullable(),+ expected: z.union([z.number(), z.string()]).optional(),+ answered: z.union([z.number(), z.string()]).nullable(),correct: z.boolean().optional(),responseMs: z.number().min(0)});