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: filter remote branches to origin-only and fix global fetch mock isolation
Adam Eivyd4542037d250
diff --git a/server/services/git.js b/server/services/git.jsindex e128801d91..9e454eb753 100644--- a/server/services/git.js+++ b/server/services/git.js@@ -631,10 +631,12 @@ export async function getRemoteBranches(dir) {const remoteBranches = result.stdout.trim().split('\n').filter(Boolean).map(line => {const [fullRef, date, author] = line.split('|');+ // Only include refs from origin remote+ if (!fullRef.startsWith('origin/')) return null;// Strip "origin/" prefixconst name = fullRef.replace(/^origin\//, '');// Skip HEAD pointer and refs without a branch name (bare remote name)- if (name === 'HEAD' || fullRef.includes('HEAD') || !fullRef.includes('/')) return null;+ if (name === 'HEAD' || fullRef.includes('HEAD') || !name) return null;return {name,fullRef,diff --git a/server/services/syncOrchestrator.test.js b/server/services/syncOrchestrator.test.jsindex 4a45b655b7..38236ef213 100644--- a/server/services/syncOrchestrator.test.js+++ b/server/services/syncOrchestrator.test.js@@ -41,9 +41,7 @@ import { applyRemoteChanges as applyMemoryChanges } from './memorySync.js';import { instanceEvents } from './instanceEvents.js';import { syncWithPeer, syncAllPeers, initSyncOrchestrator, stopSyncOrchestrator } from './syncOrchestrator.js';-// Mock global fetchconst mockFetch = vi.fn();-global.fetch = mockFetch;describe('syncOrchestrator', () => {const mockPeer = {@@ -59,11 +57,13 @@ describe('syncOrchestrator', () => {vi.clearAllMocks();vi.useFakeTimers();mockFetch.mockReset();+ vi.stubGlobal('fetch', mockFetch);});afterEach(() => {stopSyncOrchestrator();vi.useRealTimers();+ vi.unstubAllGlobals();});describe('syncWithPeer', () => {