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: abort worktree cleanup on dirty state, add focus-visible to avatar button
Adam Eivyd147f637daf4
diff --git a/client/src/pages/CharacterSheet.jsx b/client/src/pages/CharacterSheet.jsxindex b23254490d..7ab41a6f33 100644--- a/client/src/pages/CharacterSheet.jsx+++ b/client/src/pages/CharacterSheet.jsx@@ -316,7 +316,7 @@ export default function CharacterSheet() {<buttononClick={handleGenerateAvatar}disabled={generatingAvatar}- className="absolute inset-0 flex items-center justify-center bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity disabled:opacity-0"+ className="absolute inset-0 flex items-center justify-center bg-black/60 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity disabled:opacity-0"title="Generate avatar"aria-label="Generate avatar">diff --git a/server/services/worktreeManager.js b/server/services/worktreeManager.jsindex 28902d1c76..fa917d3c51 100644--- a/server/services/worktreeManager.js+++ b/server/services/worktreeManager.js@@ -112,32 +112,14 @@ export async function removeWorktree(agentId, sourceWorkspace, branchName, optioreturn { merged: false, removed: true, uncommittedSaved: false };}- // Safety check: detect uncommitted changes before removing the worktree- let uncommittedSaved = false;+ // Safety check: abort removal when uncommitted changes are detected.+ // Auto-committing dirty state is unreliable — if merge is false the commit+ // would be dangling (branch gets deleted), and if merge is true it could+ // merge partial/WIP changes. Preserve the worktree so the caller can handle.const dirtyFiles = (await execGit(['status', '--porcelain'], worktreePath).catch(() => '')).trim();if (dirtyFiles) {- console.log(`🌳 Worktree for ${agentId} has uncommitted changes — committing before cleanup`);- let addOk = true;- await execGit(['add', '-A'], worktreePath).catch(err => {- addOk = false;- console.log(`⚠️ git add failed in worktree ${agentId}: ${err.message}`);- });- if (addOk) {- await execGit(- ['commit', '-m', `chore: save uncommitted agent work (auto-committed during worktree cleanup)\n\nAgent ${agentId} had uncommitted changes that would have been lost during worktree removal.`],- worktreePath- ).then(() => {- uncommittedSaved = true;- console.log(`🌳 Auto-committed uncommitted changes for ${agentId}`);- }).catch(err => {- console.log(`⚠️ Auto-commit failed for worktree ${agentId}: ${err.message}`);- });- }- // If we couldn't save the dirty files, abort removal to prevent data loss- if (!uncommittedSaved) {- console.log(`⚠️ Preserving worktree for ${agentId} — uncommitted changes could not be saved`);- return { merged: false, removed: false, uncommittedSaved: false };- }+ console.log(`⚠️ Preserving worktree for ${agentId} — uncommitted changes detected, aborting cleanup to avoid data loss`);+ return { merged: false, removed: false, uncommittedSaved: false };}let merged = false;@@ -183,9 +165,9 @@ export async function removeWorktree(agentId, sourceWorkspace, branchName, optioconsole.log(`⚠️ Branch delete failed for ${branchName}: ${err.message}`);});- console.log(`🌳 Removed worktree for ${agentId}${merged ? ' (merged)' : ''}${uncommittedSaved ? ' (auto-committed)' : ''}`);+ console.log(`🌳 Removed worktree for ${agentId}${merged ? ' (merged)' : ''}`);- return { merged, removed: true, uncommittedSaved };+ return { merged, removed: true, uncommittedSaved: false };}/**