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: atomicWrite auto-ensureDir + FieldLockToggle stopPropagation
[._.]/ Adam Eivyea12fd50ecb1
diff --git a/client/src/components/pipeline/ArcCanvas.jsx b/client/src/components/pipeline/ArcCanvas.jsxindex 465af0aba8..d21489202a 100644--- a/client/src/components/pipeline/ArcCanvas.jsx+++ b/client/src/components/pipeline/ArcCanvas.jsx@@ -572,7 +572,15 @@ function FieldLockToggle({ series, field, label, onSeriesUpdate }) {return (<buttontype="button"- onClick={() => toggle(locked)}+ onClick={(e) => {+ // Several callers render this button inside a <details><summary>...+ // tree (Summary, Protagonist arc). A click on the lock would otherwise+ // bubble to the summary and toggle the disclosure. Stop here so the+ // user only flips the lock.+ e.stopPropagation();+ e.preventDefault();+ toggle(locked);+ }}disabled={saving}aria-pressed={locked}title={lockeddiff --git a/server/lib/fileUtils.js b/server/lib/fileUtils.jsindex cab9ac7c0f..da067cd323 100644--- a/server/lib/fileUtils.js+++ b/server/lib/fileUtils.js@@ -133,6 +133,7 @@ export async function ensureDirs(dirs) {*/export async function atomicWrite(filePath, data) {const payload = typeof data === 'string' ? data : JSON.stringify(data, null, 2);+ await ensureDir(dirname(filePath));const tmp = `${filePath}.${process.pid}.${Date.now()}.${randomUUID()}.tmp`;await writeFile(tmp, payload);// Node's fs.rename uses MoveFileExW with MOVEFILE_REPLACE_EXISTING on Windows (atomicdiff --git a/server/services/claudeChangelog.js b/server/services/claudeChangelog.jsindex a0725fb560..72c7a71042 100644--- a/server/services/claudeChangelog.js+++ b/server/services/claudeChangelog.js@@ -8,7 +8,7 @@import { join } from 'path'import sax from 'sax'-import { atomicWrite, readJSONFile, PATHS, ensureDir } from '../lib/fileUtils.js'+import { atomicWrite, readJSONFile, PATHS } from '../lib/fileUtils.js'import { fetchWithTimeout } from '../lib/fetchWithTimeout.js'const FEED_URL = 'https://github.com/anthropics/claude-code/releases.atom'