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
fix(browser): default downloads to OS-native ~/Downloads
Adam Eivy6503aea41645
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 6d68ed225b..13119c18e7 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -3,3 +3,7 @@## Added- **Dismissible AI Recommendations on the Learning tab.** Each recommendation in the Chief of Staff Learning Analytics panel now has an X to dismiss it. Dismissals persist to `data/cos/dismissed-recommendations.json` and are filtered out of future loads. For count-based alerts (e.g., "unknown errors occurred 74 times"), the dismissal records the count snapshot and only re-surfaces if the count grows materially worse (≥1.5× and at least +20). Rate-based recommendations stay dismissed until restored. A "Show dismissed" expander lets you restore individual entries or clear them all.++## Changed++- **Browser downloads default to `~/Downloads`.** The CDP browser previously sent downloads to `data/browser-downloads/` inside the project; it now writes to the OS-native user Downloads directory (`~/Downloads` on macOS/Linux, `C:\Users\<u>\Downloads` on Windows) via `os.homedir()`. Both the keep-alive `Browser.setDownloadBehavior` call in `browser/server.js` and `PATHS.browserDownloads` in `server/lib/fileUtils.js` were updated so the Browser page UI's listing/delete operations stay in sync with where Chrome actually writes. Existing installs without an explicit `downloadDir` in `data/browser-config.json` pick up the new location automatically; users who want the old behavior can pin it by setting `downloadDir` in that config file.diff --git a/browser/server.js b/browser/server.jsindex 12a835da1c..f76e31ba44 100644--- a/browser/server.js+++ b/browser/server.js@@ -1,15 +1,15 @@import { spawn } from 'child_process';import { createServer } from 'http';import { readFile, mkdir } from 'fs/promises';-import { resolve, dirname } from 'path';+import { resolve, dirname, join } from 'path';import { fileURLToPath } from 'url';-import { platform } from 'os';+import { platform, homedir } from 'os';const __dirname = dirname(fileURLToPath(import.meta.url));const PROJECT_ROOT = resolve(__dirname, '..');const CONFIG_FILE = resolve(PROJECT_ROOT, 'data', 'browser-config.json');const DEFAULT_PROFILE_DIR = resolve(PROJECT_ROOT, 'data', 'browser-profile');-const DEFAULT_DOWNLOAD_DIR = resolve(PROJECT_ROOT, 'data', 'browser-downloads');+const DEFAULT_DOWNLOAD_DIR = join(homedir(), 'Downloads');const CDP_PORT = parseInt(process.env.CDP_PORT || '5556', 10);const HEALTH_PORT = parseInt(process.env.PORT || '5557', 10);diff --git a/server/lib/fileUtils.js b/server/lib/fileUtils.jsindex 09b5e55896..eec8223245 100644--- a/server/lib/fileUtils.js+++ b/server/lib/fileUtils.js@@ -11,6 +11,7 @@ import { promisify } from 'util';import { randomUUID } from 'crypto';import { join, dirname } from 'path';import { fileURLToPath } from 'url';+import { homedir } from 'os';const execFileAsync = promisify(execFile);const IS_WIN = process.platform === 'win32';@@ -50,7 +51,7 @@ export const PATHS = {worktrees: join(__lib_dirname, '../../data/cos/worktrees'),repos: join(__lib_dirname, '../../data/repos'),browserProfile: join(__lib_dirname, '../../data/browser-profile'),- browserDownloads: join(__lib_dirname, '../../data/browser-downloads'),+ browserDownloads: join(homedir(), 'Downloads'),digests: join(__lib_dirname, '../../data/cos/digests'),promptSkills: join(__lib_dirname, '../../data/prompts/skills'),promptSkillsJobs: join(__lib_dirname, '../../data/prompts/skills/jobs'),