fix: show dotfolders (.claude, .codex) in raw/sources listings and ingest#494
Merged
nashsu merged 1 commit intoJun 28, 2026
Merged
Conversation
list_directory unconditionally skipped every dot-prefixed entry, so a user who placed .claude / .codex folders under raw/sources saw nothing in the Sources tab and the ingest folder-walk couldn't pick them up either (it routes through the same listing). Add an opt-in include_hidden flag instead of relaxing the filter globally — a blanket unhide would leak .llm-wiki, .git, and secrets like .env into every tree and the ingest candidate set. - fs.rs: shared `entry_is_visible(name, include_hidden)` predicate; `list_directory(path, include_hidden?)` (defaults false → every existing caller unchanged), threaded through build_tree recursion. - TS listDirectory gains an optional `includeHidden` arg. Passed true only on the raw/sources content paths: Sources tab, knowledge tree, chat source cache, and the folder-import ingest walk. - sources-view's own filterTree no longer drops all dot entries — it now hides only ingest noise (.cache, .DS_Store), keeping user dotfolders visible. - Rust test: build_tree hides dots by default (incl. .env) and includes them (with children) when asked. Note: scheduled-import's auto-watch walk still hides dots (an automatic importer shouldn't pull .git from a watched folder); revisit if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
list_directoryunconditionally skips every dot-prefixed entry. If a user puts a dotfolder underraw/sources—.claude,.codex, a.githubexport, etc. — it's invisible in the Sources tab, and the folder-import ingest walk (which routes through the same listing) can't pick its files up either. The files are on disk, but the app behaves as if they aren't there.Approach
Add an opt-in
include_hiddenflag rather than relaxing the filter globally. A blanket unhide would leak.llm-wiki,.git, and secrets like.envinto every tree and into the ingest candidate set —raw/sourcesis the one place dotfolders are deliberate content, so only that area opts in.Changes
fs.rs: sharedentry_is_visible(name, include_hidden)predicate;list_directory(path, include_hidden?)— defaults tofalse, so every existing caller is unchanged — threaded through thebuild_treerecursion.listDirectorygains an optionalincludeHiddenarg, passedtrueonly on theraw/sourcescontent paths: the Sources tab, the knowledge tree, the chat source cache, and the folder-import ingest walk.sources-view'sfilterTreeno longer drops all dot entries — it now hides only ingest noise (.cache,.DS_Store), keeping user dotfolders visible.build_treehides dot entries by default (including.env) and includes them, with children, when asked.Out of scope
The scheduled-import auto-watch walk still hides dots — an automatic importer shouldn't pull
.gitfrom a watched folder. Easy to revisit if there's demand.