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: guard a non-string forgeAccount in the app editor

Adam Eivy312fea3471a3
diff --git a/client/src/components/apps/EditAppDrawer.jsx b/client/src/components/apps/EditAppDrawer.jsx
index 4203aabdcb..6230da2a58 100644
--- a/client/src/components/apps/EditAppDrawer.jsx
+++ b/client/src/components/apps/EditAppDrawer.jsx
@@ -65,7 +65,10 @@ export default function EditAppDrawer({ app, onClose, onSave }) {
nativeLaunchProcessName: app.nativeLaunch?.processName || '',
editorCommand: app.editorCommand || 'code .',
workTracker: app.workTracker || 'auto',
- forgeAccount: app.forgeAccount || '',
+ // The registry is a hand-editable JSON file, so a non-string here is
+ // reachable; `.trim()` on the save path would throw and take the drawer with
+ // it. Mirrors the same type guard listForgePinnedApps applies server-side.
+ forgeAccount: typeof app.forgeAccount === 'string' ? app.forgeAccount : '',
defaultOpenPR: app.defaultOpenPR || false,
defaultPrCompletion: app.defaultPrCompletion || DEFAULT_PR_COMPLETION,
defaultUseWorktree: app.defaultUseWorktree || app.defaultOpenPR || false,