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: guard peekMemory, expand submodule regex, prevent double-submit, fix stale state in stats update
Adam Eivy420b4a52c187
diff --git a/client/src/components/QuickBrainCapture.jsx b/client/src/components/QuickBrainCapture.jsxindex 9413ac543c..bd854fd5f1 100644--- a/client/src/components/QuickBrainCapture.jsx+++ b/client/src/components/QuickBrainCapture.jsx@@ -9,6 +9,7 @@ const DOMAIN_PATTERN = /^\S+\.\S+$/;export default function QuickBrainCapture() {const [input, setInput] = useState('');+ const [submitting, setSubmitting] = useState(false);const isUrl = useMemo(() => {const trimmed = input.trim();@@ -19,8 +20,10 @@ export default function QuickBrainCapture() {const handleSubmit = async (e) => {e?.preventDefault();const text = input.trim();- if (!text) return;+ if (!text || submitting) return;+ // Guard against rapid double-submit+ setSubmitting(true);// Clear input immediately so user can keep typingsetInput('');@@ -49,6 +52,7 @@ export default function QuickBrainCapture() {toast.success(result.message || 'Thought captured');}}+ setSubmitting(false);};return (diff --git a/client/src/components/cos/tabs/MemoryTab.jsx b/client/src/components/cos/tabs/MemoryTab.jsxindex 705f565fff..8c5e089481 100644--- a/client/src/components/cos/tabs/MemoryTab.jsx+++ b/client/src/components/cos/tabs/MemoryTab.jsx@@ -84,11 +84,15 @@ export default function MemoryTab({ apps = [] }) {if (!result) return;toast.success(`Memory ${label}`);setPendingMemories(prev => prev.filter(m => m.id !== id));- setStats(prev => prev ? { ...prev, pendingApproval: Math.max(0, (prev.pendingApproval || 0) - 1), ...updateStats } : prev);+ setStats(prev => prev ? {+ ...prev,+ pendingApproval: Math.max(0, (prev.pendingApproval || 0) - 1),+ ...(updateStats ? updateStats(prev) : {})+ } : prev);};- const handleApprove = (id) => handleMemoryAction(id, api.approveMemory, 'approved', { active: (stats?.active || 0) + 1 });- const handleReject = (id) => handleMemoryAction(id, api.rejectMemory, 'rejected', {});+ const handleApprove = (id) => handleMemoryAction(id, api.approveMemory, 'approved', (prev) => ({ active: (prev.active || 0) + 1 }));+ const handleReject = (id) => handleMemoryAction(id, api.rejectMemory, 'rejected', () => ({}));useEffect(() => {fetchData();diff --git a/server/services/git.js b/server/services/git.jsindex 3ff16d9d80..744f710688 100644--- a/server/services/git.js+++ b/server/services/git.js@@ -909,7 +909,7 @@ export async function getGitInfo(dir) {};}-const SUBMODULE_STATUS_RE = /^([+ -])([0-9a-f]+)\s+(\S+)/;+const SUBMODULE_STATUS_RE = /^([+ \-U])([0-9a-f]+)\s+(\S+)/;function parseSubmoduleStatusLine(line) {const match = line.match(SUBMODULE_STATUS_RE);diff --git a/server/services/telegram.js b/server/services/telegram.jsindex 90d40ad257..4e6e0901c0 100644--- a/server/services/telegram.js+++ b/server/services/telegram.js@@ -381,7 +381,7 @@ async function forwardNotification(notification) {const isMemoryApproval = notification.type === NOTIFICATION_TYPES.MEMORY_APPROVAL && notification.metadata?.memoryId;if (isMemoryApproval) {- const memory = await peekMemory(notification.metadata.memoryId);+ const memory = await peekMemory(notification.metadata.memoryId).catch(() => null);const fullContent = memory?.summary || memory?.content || notification.description || '';if (fullContent) lines.push(escapeHtml(fullContent));opts.reply_markup = JSON.stringify({