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 NaN urgency, correct recommendation fields, deep clone defaults
Adam Eivydd8287a41be7
diff --git a/client/src/components/digital-twin/tabs/IdentityTab.jsx b/client/src/components/digital-twin/tabs/IdentityTab.jsxindex dbab320e16..a5a6389803 100644--- a/client/src/components/digital-twin/tabs/IdentityTab.jsx+++ b/client/src/components/digital-twin/tabs/IdentityTab.jsx@@ -230,10 +230,10 @@ export default function IdentityTab({ onRefresh }) {{chronotype.recommendations && (<div className="space-y-1">- {chronotype.recommendations.deepWork && (+ {(chronotype.recommendations.peakFocusStart || chronotype.recommendations.peakFocusEnd) && (<div className="flex items-center gap-2 text-xs text-gray-400"><Zap className="w-3 h-3 text-yellow-400" />- Deep work: {chronotype.recommendations.deepWork}+ Peak focus: {chronotype.recommendations.peakFocusStart}–{chronotype.recommendations.peakFocusEnd}</div>)}{chronotype.recommendations.caffeineCutoff && (diff --git a/package-lock.json b/package-lock.jsonindex df66408777..060f0c42f1 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "portos",- "version": "1.8.2",+ "version": "1.8.3","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "portos",- "version": "1.8.2",+ "version": "1.8.3","license": "MIT","dependencies": {"express": "^4.21.2",diff --git a/package.json b/package.jsonindex 3ed477602c..15730a7ad6 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "portos",- "version": "1.8.2",+ "version": "1.8.3","private": true,"description": "Local dev machine App OS portal","author": "Adam Eivy (@antic|@atomantic)",diff --git a/server/services/identity.js b/server/services/identity.jsindex 2fe1d70566..f4ffe604fd 100644--- a/server/services/identity.js+++ b/server/services/identity.js@@ -153,8 +153,8 @@ async function ensureIdentityDir() {async function loadJSON(filePath, defaultVal) {const raw = await readFile(filePath, 'utf-8').catch(() => null);- if (!raw) return { ...defaultVal };- return safeJSONParse(raw, { ...defaultVal });+ if (!raw) return structuredClone(defaultVal);+ return safeJSONParse(raw, structuredClone(defaultVal));}async function saveJSON(filePath, data) {@@ -332,6 +332,8 @@ export function computeGoalUrgency(goal, timeHorizons) {const horizonYears = horizonMap[goal.horizon] ?? 5;const yearsRemaining = timeHorizons.yearsRemaining;+ if (horizonYears <= 0 || yearsRemaining <= 0) return 1;+// Urgency: higher when horizon approaches or exceeds remaining years// 0 = plenty of time, 1 = urgentconst rawUrgency = 1 - Math.min(1, yearsRemaining / (horizonYears * 2));