Skip to content

fix(server): list dotfiles when the workspace root fills the entry cap#38

Merged
DanielGGordon merged 1 commit into
mainfrom
t3code/issue-37-fix
Jul 15, 2026
Merged

fix(server): list dotfiles when the workspace root fills the entry cap#38
DanielGGordon merged 1 commit into
mainfrom
t3code/issue-37-fix

Conversation

@DanielGGordon

Copy link
Copy Markdown
Owner

Problem

Fixes #37 — no dotfiles are listed in the file explorer when the root is set to ~/.

552e133d3 added dotfile support via a filesystem walk (supplementDotfiles) that supplements the native finder's results (the native finder honors gitignore and hides dotfiles). That walk was gated on the combined entry count staying under the 25k cap:

while (queueIndex < queue.length && entryByPath.size < WORKSPACE_INDEX_MAX_ENTRIES)

entryByPath was seeded with the native finder's results. For a large tree like the home directory (30k+ files on a typical dev machine, over the WORKSPACE_INDEX_MAX_ENTRIES = 25_000 cap), the native scan alone fills entryByPath to the cap, so the supplement loop body never runs and zero dotfiles get added. Normal project roots stay under the cap, which is why the bug only showed up in ~/.

Fix

  • supplementDotfiles now tracks only its newly discovered dotfile entries against its own budget. The finder results are used solely for dedup and to seed which directories to scan — they no longer count against the cap.
  • list inserts the discovered dotfiles first, then fills the remaining budget with native entries, so a large native tree can no longer starve dotfile discovery.

Testing

  • New regression test fills the native results to the cap and asserts a real dotfile still surfaces. Confirmed it fails when the starvation condition is reintroduced.
  • All 45 workspace tests pass; tsgo typecheck and lint clean.

🤖 Generated with Claude Code

The file explorer's dotfile supplement walk was gated on the combined
entry count (native finder results + discovered dotfiles) staying under
WORKSPACE_INDEX_MAX_ENTRIES. When the root is a large tree such as the
home directory, the native (gitignore-filtered) scan alone reaches the
25k cap, so the supplement loop never ran and no dotfiles were listed.

- supplementDotfiles now tracks only its newly discovered entries against
  its own budget; the finder results are used solely for dedup and to
  seed the directories to scan, not counted against the cap.
- list() inserts the discovered dotfiles first, then fills the remaining
  budget with native entries, so a large native tree can no longer starve
  dotfile discovery.

Adds a regression test that fills the native results to the cap and
asserts a real dotfile still surfaces.

Fixes #37

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DanielGGordon DanielGGordon merged commit bd5da29 into main Jul 15, 2026
5 of 9 checks passed
@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: No dotfiles listed when in home dir

1 participant