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: normalize tags on create, update reparented children timestamps, validate tab param, fix title, remove unused prop
Adam Eivyb4168e3e7ee8
diff --git a/client/src/components/goals/GoalsListView.jsx b/client/src/components/goals/GoalsListView.jsxindex 930bdd3662..f0e184d4ac 100644--- a/client/src/components/goals/GoalsListView.jsx+++ b/client/src/components/goals/GoalsListView.jsx@@ -11,7 +11,7 @@ function urgencyIndicator(urgency) {return <div className={`w-2 h-2 rounded-full ${color}`} title={`${Math.round(urgency * 100)}% urgency`} />;}-function GoalRow({ goal, depth, expandedIds, onToggle, onSelect, selectedId, allGoals, onAddChild }) {+function GoalRow({ goal, depth, expandedIds, onToggle, onSelect, selectedId, onAddChild }) {const cat = CATEGORY_CONFIG[goal.category] || CATEGORY_CONFIG.mastery;const CatIcon = cat.icon;const expanded = expandedIds.has(goal.id);@@ -84,7 +84,6 @@ function GoalRow({ goal, depth, expandedIds, onToggle, onSelect, selectedId, allonToggle={onToggle}onSelect={onSelect}selectedId={selectedId}- allGoals={allGoals}onAddChild={onAddChild}/>))}diff --git a/client/src/pages/Goals.jsx b/client/src/pages/Goals.jsxindex b5b093a8cf..896f9badab 100644--- a/client/src/pages/Goals.jsx+++ b/client/src/pages/Goals.jsx@@ -10,8 +10,11 @@ const TABS = [{ id: 'list', label: 'List', icon: List }];+const VALID_TABS = new Set(TABS.map(t => t.id));+export default function Goals() {- const { tab = 'tree' } = useParams();+ const { tab: rawTab } = useParams();+ const tab = VALID_TABS.has(rawTab) ? rawTab : 'tree';const navigate = useNavigate();const [data, setData] = useState(null);const [loading, setLoading] = useState(true);@@ -34,7 +37,7 @@ export default function Goals() {<div className="flex items-center justify-between px-6 py-4 border-b border-port-border bg-port-card"><div className="flex items-center gap-3"><Target className="w-6 h-6 text-port-accent" />- <h1 className="text-xl font-semibold text-white">Goal Tree</h1>+ <h1 className="text-xl font-semibold text-white">Goals</h1>{data && (<span className="text-sm text-gray-500">{data.flat?.length || 0} goalsdiff --git a/server/lib/identityValidation.js b/server/lib/identityValidation.jsindex 0496bf7ddc..4f1e463427 100644--- a/server/lib/identityValidation.js+++ b/server/lib/identityValidation.js@@ -53,7 +53,7 @@ export const createGoalInputSchema = z.object({description: z.string().max(2000).optional(),horizon: goalHorizonEnum.optional().default('5-year'),category: goalCategoryEnum.optional().default('mastery'),- parentId: z.string().nullable().optional().default(null),+ parentId: z.string().min(1).nullable().optional().default(null),tags: z.array(z.string().min(1).max(50)).max(20).optional().default([])});@@ -63,7 +63,7 @@ export const updateGoalInputSchema = z.object({horizon: goalHorizonEnum.optional(),category: goalCategoryEnum.optional(),status: goalStatusEnum.optional(),- parentId: z.string().nullable().optional(),+ parentId: z.string().min(1).nullable().optional(),tags: z.array(z.string().min(1).max(50)).max(20).optional()});diff --git a/server/services/identity.js b/server/services/identity.jsindex 7bd8e5054b..f25cabc0b8 100644--- a/server/services/identity.js+++ b/server/services/identity.js@@ -706,7 +706,7 @@ export async function createGoal({ title, description, horizon, category, parenthorizon: horizon || '5-year',category: category || 'mastery',parentId: parentId || null,- tags: tags || [],+ tags: [...new Set((tags || []).map(t => t.trim()).filter(Boolean))],urgency: null,status: 'active',milestones: [],@@ -785,9 +785,11 @@ export async function deleteGoal(goalId) {const deletedGoal = goals.goals[idx];// Orphan children: reparent to deleted goal's parent (or root)+ const now = new Date().toISOString();for (const goal of goals.goals) {if (goal.parentId === goalId) {goal.parentId = deletedGoal.parentId || null;+ goal.updatedAt = now;}}