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 Copilot review feedback on PR #98
Adam Eivyb5d8691bb75a
diff --git a/client/src/components/instances/PeerAppsList.jsx b/client/src/components/instances/PeerAppsList.jsxindex 2e20d01e5e..652c1c72b6 100644--- a/client/src/components/instances/PeerAppsList.jsx+++ b/client/src/components/instances/PeerAppsList.jsx@@ -10,7 +10,7 @@ export default function PeerAppsList({ apps, peerAddress }) {<div className="space-y-1">{apps.map(app => (<div key={app.id} className="flex items-center gap-2 text-xs">- <AppIcon icon={app.icon || 'package'} appId={app.id} hasAppIcon={!!app.appIconPath} size={14} className="text-gray-400 shrink-0" />+ <AppIcon icon={app.icon || 'package'} size={14} className="text-gray-400 shrink-0" />{app.uiPort && app.overallStatus === 'online' ? (<ahref={`http://${peerAddress}:${app.uiPort}`}diff --git a/server/services/appIconDetect.js b/server/services/appIconDetect.jsindex b33bdb68ee..5faa0cef50 100644--- a/server/services/appIconDetect.js+++ b/server/services/appIconDetect.js@@ -1,6 +1,7 @@import { existsSync } from 'fs';import { readFile, readdir } from 'fs/promises';import { join, extname } from 'path';+import { safeJSONParse } from '../lib/fileUtils.js';/*** Well-known icon paths to check, ordered by priority.@@ -98,7 +99,7 @@ async function findXcodeAppIcon(repoPath) {if (existsSync(contentsPath)) {const contents = await readFile(contentsPath, 'utf-8').catch(() => null);if (contents) {- const parsed = JSON.parse(contents).images || [];+ const parsed = safeJSONParse(contents, {})?.images || [];// Find the largest icon by parsing size (prefer 1024x1024, then smaller)let bestIcon = null;let bestSize = 0;diff --git a/server/services/goalCalendarScheduler.js b/server/services/goalCalendarScheduler.jsindex 193844523b..025f647a0c 100644--- a/server/services/goalCalendarScheduler.js+++ b/server/services/goalCalendarScheduler.js@@ -2,7 +2,7 @@ import { google } from 'googleapis';import { writeFile } from 'fs/promises';import { v4 as uuidv4 } from 'uuid';import { join } from 'path';-import { PATHS, readJSONFile } from '../lib/fileUtils.js';+import { PATHS, readJSONFile, ensureDir } from '../lib/fileUtils.js';import { ServerError } from '../lib/errorHandler.js';import { getAuthenticatedClient, needsScopeUpgrade, getTokens } from './googleAuth.js';@@ -33,6 +33,7 @@ async function loadGoals() {}async function saveGoals(data) {+ await ensureDir(PATHS.digitalTwin);await writeFile(GOALS_FILE, JSON.stringify(data, null, 2));}diff --git a/server/services/goalCheckIn.js b/server/services/goalCheckIn.jsindex 941ba6b655..f5ecbc179f 100644--- a/server/services/goalCheckIn.js+++ b/server/services/goalCheckIn.js@@ -1,7 +1,7 @@import { writeFile } from 'fs/promises';import { join } from 'path';import { v4 as uuidv4 } from 'uuid';-import { PATHS, readJSONFile } from '../lib/fileUtils.js';+import { PATHS, readJSONFile, ensureDir } from '../lib/fileUtils.js';import { callProviderAISimple, parseLLMJSON } from '../lib/aiProvider.js';import { addNotification, NOTIFICATION_TYPES } from './notifications.js';@@ -113,6 +113,7 @@ export async function runGoalCheckIn() {}goals.updatedAt = now;+ await ensureDir(PATHS.digitalTwin);await writeFile(GOALS_FILE, JSON.stringify(goals, null, 2));// Send Telegram notificationdiff --git a/server/services/googleAuth.js b/server/services/googleAuth.jsindex 4664d6c3d8..797eda68be 100644--- a/server/services/googleAuth.js+++ b/server/services/googleAuth.js@@ -10,7 +10,7 @@ const SCOPES = ['https://www.googleapis.com/auth/calendar','https://www.googleapis.com/auth/gmail.modify'];-export const OAUTH_REDIRECT_URI = `http://${process.env.HOST || 'localhost'}:${process.env.PORT || 5555}/api/calendar/google/oauth/callback`;+export const OAUTH_REDIRECT_URI = `http://${process.env.PUBLIC_HOST || 'localhost'}:${process.env.PORT || 5555}/api/calendar/google/oauth/callback`;let oAuth2Client = null;