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: catch dataPath() data dirs in the CATEGORIES coverage guard (#3285)
[._.]/ Adam Eivyb992b3b4958e
diff --git a/server/services/dataManager.categories.test.js b/server/services/dataManager.categories.test.jsindex 81381cc5ba..15f79143b7 100644--- a/server/services/dataManager.categories.test.js+++ b/server/services/dataManager.categories.test.js@@ -13,8 +13,9 @@** 1. `PATHS` in lib/fileUtils.js — every value under `PATHS.data`.* 2. `DEFAULT_EXCLUDES` in services/backup.js — anchored rsync filter paths.- * 3. Source scan of server/ + scripts/ for the two ways a data dir is spelled- * outside PATHS: `join(PATHS.data, 'name')` and `join(root, 'data', 'name')`.+ * 3. Source scan of server/ + scripts/ for the ways a data dir is spelled+ * outside PATHS: `dataPath('name')`, `join(PATHS.data, 'name')`,+ * `` `${PATHS.data}/name` ``, and `join(root, 'data', 'name')`.* 4. `data.reference/` — dirs seeded into `data/` on first install.*/@@ -28,8 +29,11 @@ import { CATEGORIES, UNKNOWN_CATEGORY_DESCRIPTION } from './dataManager.js';// A path segment that is a file, not a directory (`settings.json`, `TASKS.md`).const isFileSegment = (segment) => segment.includes('.');-// `join(PATHS.data, 'name')` / `` `${PATHS.data}/name` `` / `join(x, 'data', 'name')`+// Every spelling of "a path under data/" that appears in the codebase. Missing+// one means a whole family of directories escapes the guard — `dataPath('x')`+// was the gap that let `data/spotify` and `data/youtube` slip through.const DATA_DIR_PATTERNS = [+ /\bdataPath\(\s*'([a-z0-9._-]+)'/g,/PATHS\.data,\s*'([a-z0-9._-]+)'/g,/\$\{PATHS\.data\}\/([a-z0-9._-]+)/g,/,\s*'data',\s*'([a-z0-9._-]+)'/gdiff --git a/server/services/dataManager.js b/server/services/dataManager.jsindex e34e9ac68a..b1662b0975 100644--- a/server/services/dataManager.js+++ b/server/services/dataManager.js@@ -30,6 +30,8 @@ export const CATEGORIES = {'avatar': { label: 'Avatar', description: 'Uploaded avatar images', archivable: true, deletable: false },'backup': { label: 'Backups', description: 'Data backup archives', archivable: false, deletable: true },'brain': { label: 'Brain', description: 'Brain items and sync log', archivable: true, deletable: false },+ // Legacy location — current installs download to ~/Downloads (PATHS.browserDownloads),+ // but installs that predate that move still carry the dir, and backup still excludes it.'browser-downloads': { label: 'Browser Downloads', description: 'Files the agent browser downloaded — re-downloadable, safe to purge', archivable: false, deletable: true },'browser-profile': { label: 'Browser Profile', description: 'Chrome/Chromium browser data', archivable: false, deletable: true },'calendar': { label: 'Calendar', description: 'Calendar sync data', archivable: true, deletable: false },@@ -77,6 +79,7 @@ export const CATEGORIES = {'screenshots': { label: 'Screenshots', description: 'Task-related screenshots', archivable: true, deletable: true },'settings': { label: 'Settings', description: 'Per-feature settings files', archivable: true, deletable: false },'sharing': { label: 'Peer Sync State', description: 'Peer-sync bookkeeping — purging forces a full resync and can resurrect deleted records', archivable: true, deletable: false },+ 'spotify': { label: 'Spotify Sync', description: 'Machine-local Spotify sync cursor and cache — purging resets the cursor and can leave a gap in imported history', archivable: true, deletable: false },'sprites': { label: 'Sprites', description: 'Sprite reference art, walk frames, and runtime atlases — the only copy of the generated art; records live in Postgres', archivable: false, deletable: false },'story-builder': { label: 'Story Builder', description: 'Story Builder project records', archivable: true, deletable: false },'telegram': { label: 'Telegram', description: 'Telegram bot data', archivable: true, deletable: true },@@ -88,7 +91,8 @@ export const CATEGORIES = {'uploads': { label: 'Uploads', description: 'Files uploaded through the UI and referenced by records', archivable: true, deletable: false },'video-thumbnails': { label: 'Video Thumbnails', description: 'JPEG thumbnails for generated videos', archivable: false, deletable: true },'videos': { label: 'Videos', description: 'Locally generated videos', archivable: true, deletable: true },- 'writers-room': { label: 'Writers Room', description: 'Writers Room works and story bibles', archivable: true, deletable: false }+ 'writers-room': { label: 'Writers Room', description: 'Writers Room works and story bibles', archivable: true, deletable: false },+ 'youtube': { label: 'YouTube Sync', description: 'Machine-local YouTube sync state — purging resets the cursor and can leave a gap in imported history', archivable: true, deletable: false }};// Shown for a directory with no CATEGORIES entry. Phrased as an outcome ("we