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: address release review — null guards, dead code removal, input sanitization
Adam Eivy569e55c668f8
diff --git a/client/src/components/cos/ActionableInsightsBanner.jsx b/client/src/components/cos/ActionableInsightsBanner.jsxindex cc2e4d26be..99e84bd803 100644--- a/client/src/components/cos/ActionableInsightsBanner.jsx+++ b/client/src/components/cos/ActionableInsightsBanner.jsx@@ -117,7 +117,7 @@ export default function ActionableInsightsBanner({ onTaskUnblocked }) {onTaskUnblocked?.(taskId);};- if (loading || !data) {+ if (loading || !data?.insights) {return null;}diff --git a/client/src/components/cos/tabs/ScheduleTab.jsx b/client/src/components/cos/tabs/ScheduleTab.jsxindex ea9f38be9f..1056b6b2d9 100644--- a/client/src/components/cos/tabs/ScheduleTab.jsx+++ b/client/src/components/cos/tabs/ScheduleTab.jsx@@ -822,13 +822,7 @@ export default function ScheduleTab({ apps }) {}};- // Backward-compat aliases used in child components- const handleUpdateSelfImprovement = handleUpdateTask;- const handleUpdateAppImprovement = handleUpdateTask;- const handleTriggerSelfImprovement = (taskType) => handleTriggerTask(taskType);const handleTriggerAppImprovement = (taskType, appId) => handleTriggerTask(taskType, appId);- const handleResetSelfImprovement = handleResetTask;- const handleResetAppImprovement = handleResetTask;const handleUpdateAppOverride = async (appId, taskType, { enabled, interval, taskMetadata }) => {const result = await api.updateAppTaskTypeOverride(appId, taskType, { enabled, interval, taskMetadata }).catch(err => {diff --git a/client/src/components/meatspace/post/PostDrillRunner.jsx b/client/src/components/meatspace/post/PostDrillRunner.jsxindex 16d0640d59..3a5dc14c9c 100644--- a/client/src/components/meatspace/post/PostDrillRunner.jsx+++ b/client/src/components/meatspace/post/PostDrillRunner.jsx@@ -91,7 +91,7 @@ export default function PostDrillRunner({ session }) {if (state !== 'drilling' || !currentDrill) return null;- const question = currentDrill.questions[currentQuestionIndex];+ const question = currentDrill.questions?.[currentQuestionIndex];const isTextDrill = MEMORY_DRILL_TYPES.includes(currentDrill.type);const timePct = timeLimitMs > 0 ? (timeLeft / timeLimitMs) * 100 : 0;const progressPct = totalQuestions > 0 ? ((currentQuestionIndex + 1) / totalQuestions) * 100 : 0;diff --git a/server/routes/cos.js b/server/routes/cos.jsindex 79c4941204..088f70fcf3 100644--- a/server/routes/cos.js+++ b/server/routes/cos.js@@ -18,7 +18,7 @@ import * as goalProgress from '../services/goalProgress.js';import * as decisionLog from '../services/decisionLog.js';import { reinitialize as reinitializeEmbeddings } from '../services/memoryEmbeddings.js';import { asyncHandler, ServerError } from '../lib/errorHandler.js';-import { validateRequest } from '../lib/validation.js';+import { validateRequest, sanitizeTaskMetadata } from '../lib/validation.js';import { z } from 'zod';const router = Router();@@ -73,6 +73,9 @@ function pickScheduleSettings(body) {for (const key of SCHEDULE_FIELDS) {if (body[key] !== undefined) settings[key] = body[key];}+ if (settings.taskMetadata) {+ settings.taskMetadata = sanitizeTaskMetadata(settings.taskMetadata);+ }return settings;}@@ -890,7 +893,12 @@ router.post('/jobs', asyncHandler(async (req, res) => {// PUT /api/cos/jobs/:id - Update a jobrouter.put('/jobs/:id', asyncHandler(async (req, res) => {- const job = await autonomousJobs.updateJob(req.params.id, req.body);+ const { name, description, category, type, interval, intervalMs, scheduledTime,+ enabled, priority, autonomyLevel, promptTemplate, command, triggerAction } = req.body;+ const job = await autonomousJobs.updateJob(req.params.id, {+ name, description, category, type, interval, intervalMs, scheduledTime,+ enabled, priority, autonomyLevel, promptTemplate, command, triggerAction+ });if (!job) {throw new ServerError('Job not found', { status: 404, code: 'NOT_FOUND' });}@@ -1016,7 +1024,10 @@ router.post('/templates/:id/use', asyncHandler(async (req, res) => {// PUT /api/cos/templates/:id - Update a templaterouter.put('/templates/:id', asyncHandler(async (req, res) => {- const result = await taskTemplates.updateTemplate(req.params.id, req.body);+ const { name, icon, description, context, category, provider, model, app } = req.body;+ const result = await taskTemplates.updateTemplate(req.params.id, {+ name, icon, description, context, category, provider, model, app+ });if (result.error) {throw new ServerError(result.error, { status: 400, code: 'BAD_REQUEST' });}