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

address review: grammar fix for singular task, validate enabled/intervalMs types

Adam Eivy163414b92e88
diff --git a/client/src/components/cos/ActionableInsightsBanner.jsx b/client/src/components/cos/ActionableInsightsBanner.jsx
index 4949c9f817..e2c290d7af 100644
--- a/client/src/components/cos/ActionableInsightsBanner.jsx
+++ b/client/src/components/cos/ActionableInsightsBanner.jsx
@@ -114,7 +114,7 @@ export default function ActionableInsightsBanner({ onTaskUnblocked }) {
...insight,
tasks: remaining,
count: remaining.length,
- title: `${remaining.length} blocked task${remaining.length !== 1 ? 's' : ''} need attention`,
+ title: `${remaining.length} blocked task${remaining.length !== 1 ? 's' : ''} need${remaining.length === 1 ? 's' : ''} attention`,
description: firstTask?.description || insight.description
};
}).filter(Boolean)
diff --git a/server/routes/apps.js b/server/routes/apps.js
index c1f8ec5dcf..8e3328810a 100644
--- a/server/routes/apps.js
+++ b/server/routes/apps.js
@@ -258,6 +258,9 @@ router.get('/:id/task-types', loadApp, asyncHandler(async (req, res) => {
// PUT /api/apps/:id/task-types/:taskType - Update a task type override for an app
router.put('/:id/task-types/:taskType', asyncHandler(async (req, res) => {
const { enabled, interval, taskMetadata } = req.body;
+ if (enabled !== undefined && typeof enabled !== 'boolean') {
+ throw new ServerError('enabled must be a boolean', { status: 400, code: 'VALIDATION_ERROR' });
+ }
if (typeof enabled !== 'boolean' && interval === undefined && taskMetadata === undefined) {
throw new ServerError('enabled (boolean), interval (string|null), or taskMetadata (object|null) required', { status: 400, code: 'VALIDATION_ERROR' });
}
diff --git a/server/routes/cos.js b/server/routes/cos.js
index 1bd6d312e6..e7e7dbbbac 100644
--- a/server/routes/cos.js
+++ b/server/routes/cos.js
@@ -73,6 +73,12 @@ function pickScheduleSettings(body) {
for (const key of SCHEDULE_FIELDS) {
if (body[key] !== undefined) settings[key] = body[key];
}
+ if (settings.enabled !== undefined && typeof settings.enabled !== 'boolean') {
+ throw new ServerError('enabled must be a boolean', { status: 400, code: 'VALIDATION_ERROR' });
+ }
+ if (settings.intervalMs !== undefined && (typeof settings.intervalMs !== 'number' || settings.intervalMs < 0)) {
+ throw new ServerError('intervalMs must be a non-negative number', { status: 400, code: 'VALIDATION_ERROR' });
+ }
if (settings.taskMetadata !== undefined && settings.taskMetadata !== null) {
if (typeof settings.taskMetadata !== 'object' || Array.isArray(settings.taskMetadata)) {
throw new ServerError('taskMetadata must be an object or null', { status: 400, code: 'VALIDATION_ERROR' });