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

fix(apps): detect app icon during creation so new apps show icons immediately

Adam Eivy28c33aa38e83
diff --git a/server/routes/apps.js b/server/routes/apps.js
index 686bbd1913..7d4d61383d 100644
--- a/server/routes/apps.js
+++ b/server/routes/apps.js
@@ -211,6 +211,13 @@ router.get('/:id/icon', loadApp, asyncHandler(async (req, res) => {
// POST /api/apps - Create new app
router.post('/', asyncHandler(async (req, res, next) => {
const data = validateRequest(appSchema, req.body);
+
+ // Detect app icon before creation to avoid a double write
+ if (data.repoPath) {
+ const detectedIcon = await detectAppIcon(data.repoPath, data.type);
+ if (detectedIcon) data.appIconPath = detectedIcon;
+ }
+
const app = await appsService.createApp(data);
res.status(201).json(app);
}));
diff --git a/server/services/apps.js b/server/services/apps.js
index 90f5fcce4c..78a1c2aa6a 100644
--- a/server/services/apps.js
+++ b/server/services/apps.js
@@ -196,6 +196,7 @@ export async function createApp(appData) {
pm2ProcessNames: appData.pm2ProcessNames || [appData.name.toLowerCase().replace(/\s+/g, '-')],
envFile: appData.envFile || '.env',
icon: appData.icon || null,
+ appIconPath: appData.appIconPath || null,
editorCommand: appData.editorCommand || 'code .',
archived: false,
jira: appData.jira || null,