Skip to content

fix: show dotfolders (.claude, .codex) in raw/sources listings and ingest#494

Merged
nashsu merged 1 commit into
nashsu:mainfrom
AndrewDongminYoo:fix/show-dotfolders-in-sources
Jun 28, 2026
Merged

fix: show dotfolders (.claude, .codex) in raw/sources listings and ingest#494
nashsu merged 1 commit into
nashsu:mainfrom
AndrewDongminYoo:fix/show-dotfolders-in-sources

Conversation

@AndrewDongminYoo

Copy link
Copy Markdown
Contributor

Problem

list_directory unconditionally skips every dot-prefixed entry. If a user puts a dotfolder under raw/sources.claude, .codex, a .github export, 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_hidden flag rather than relaxing the filter globally. A blanket unhide would leak .llm-wiki, .git, and secrets like .env into every tree and into the ingest candidate set — raw/sources is the one place dotfolders are deliberate content, so only that area opts in.

Changes

  • fs.rs: shared entry_is_visible(name, include_hidden) predicate; list_directory(path, include_hidden?) — defaults to false, so every existing caller is unchanged — threaded through the build_tree recursion.
  • TS listDirectory gains an optional includeHidden arg, passed true only on the raw/sources content paths: the Sources tab, the knowledge tree, the chat source cache, and the folder-import ingest walk.
  • sources-view's filterTree no longer drops all dot entries — it now hides only ingest noise (.cache, .DS_Store), keeping user dotfolders visible.
  • Test: build_tree hides 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 .git from a watched folder. Easy to revisit if there's demand.

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.
@nashsu nashsu merged commit be7332a into nashsu:main Jun 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants