Skip to content

The agent that grows with you

feat(desktop): let the show-ignored toggle reveal hygiene dirs the transports keep

Brooklyn Nicholsonb8885eb492ab
diff --git a/apps/desktop/src/lib/excluded-paths.ts b/apps/desktop/src/lib/excluded-paths.ts
index ed21988a1e9..f91a8d2b414 100644
--- a/apps/desktop/src/lib/excluded-paths.ts
+++ b/apps/desktop/src/lib/excluded-paths.ts
@@ -39,6 +39,51 @@ export const ALWAYS_EXCLUDED = new Set([
'Thumbs.db'
])
+// #55169: the file tree's "Show gitignored files" toggle is an explicit user
+// request for the whole project, but it could never reveal entries this set
+// drops unconditionally — deny-by-default .gitignore layouts rely on names
+// like `out/` or `vendor/` for real build output, and users could not browse
+// them even with the eye toggle on. Names here stay hidden even when the
+// project opted in; they are the noise the transports strip as well
+// (FS_READDIR_HIDDEN in electron/fs-read-dir.ts, _FS_READDIR_HIDDEN in
+// hermes_cli/web_routers/files.py), so the toggle's reveal floor must not go
+// below what either transport can return. Keep the two transport sets in sync
+// with this floor: a name only ever filtered by ALWAYS_EXCLUDED (out, vendor,
+// coverage, .DS_Store, …) belongs here so a synced project can reveal it; the
+// names both transports strip (.git internals, dep/build/cache dirs) do not.
+export const SHOW_IGNORED_EXCLUDED = new Set([
+ '.git',
+ '.hg',
+ '.svn',
+ 'node_modules',
+ 'bower_components',
+ '.venv',
+ 'venv',
+ '__pycache__',
+ '.mypy_cache',
+ '.pytest_cache',
+ '.ruff_cache',
+ '.tox',
+ '.gradle',
+ '.idea',
+ 'dist',
+ 'build',
+ 'target',
+ 'Pods',
+ '.next',
+ '.nuxt',
+ '.svelte-kit',
+ '.output',
+ '.turbo',
+ '.parcel-cache',
+ '.cache',
+ '.terraform',
+ '.expo',
+ '.angular',
+ '.DS_Store',
+ 'Thumbs.db'
+])
+
// True when any segment of a relative path is excluded (review rows like
// `node_modules/.bin/foo` or a bare `.DS_Store`). Handles `/` and `\`.
export const isExcludedPath = (relPath: string): boolean => relPath.split(/[/\\]/).some(seg => ALWAYS_EXCLUDED.has(seg))