Skip to content

Files nested deeper than 8 levels were invisible to the whole app - #65

Merged
Seungpyo1007 merged 1 commit into
developfrom
fix/deep-folders-invisible
Aug 5, 2026
Merged

Files nested deeper than 8 levels were invisible to the whole app#65
Seungpyo1007 merged 1 commit into
developfrom
fix/deep-folders-invisible

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

The bug

MAX_DEPTH was 8. Every discovery path in the app — the file tree, search, and replace-all — walks with that limit, so a file nested deeper than 8 levels appeared in none of them. There was no way to find it from inside the app.

That depth is not exotic: packages/app/src/features/x/components/y/z.ts is already 8.

Verified in the real app — a file at depth 10 was simply absent from readTree.

The fix

Depth is now 16. IGNORE_DIRS already excludes node_modules and friends, and the tree is separately bounded by MAX_ENTRIES (4000), so the extra cost is a handful of readdir calls.

And when a limit is genuinely hit, it no longer passes as an answer:

  • Search returns deepSkipped when it stopped at the depth limit. Before, that case was indistinguishable from "no matches" — and search is what people (and the model) use as evidence that something is not there. The panel shows "일부 미탐색" with a tooltip; the agent gets the same sentence.
  • list_files never told the model that the tree was truncated, even though the sidebar says so on screen. So files that were merely never walked read back as "does not exist" — and the model would go create one that was already there.

Verification

Real-app probe (CDP), 5/5:

  • depth-10 file now appears in readTree and is found by searchFiles (a/b/c/d/e/f/g/h/i/j/buried.ts),
  • that depth no longer flags truncation,
  • burying a file at depth 20 does flag deepSkipped instead of silently returning nothing.

972 unit tests passing. npm run typecheck clean. main.cjs line endings unchanged (1893 CRLF / 0 LF).

MAX_DEPTH 가 8 이었다. packages/app/src/features/x/components/y/z.ts 정도면
벌써 8 이고, 그보다 깊은 파일은 트리에도 검색에도 치환에도 나타나지 않았다 —
앱 안에서 찾을 방법이 없었다는 뜻이다. 실제로 깊이 10 에 파일을 묻어 두고
readTree 를 불러 확인했다.

16 으로 올린다. node_modules 류는 IGNORE_DIRS 로 이미 빠지고 트리는
MAX_ENTRIES(4000) 로 따로 묶여 있으므로, 깊이를 올려도 비용은 디렉터리 읽기
몇 번이다.

그리고 상한을 정말 넘겼을 때 조용하지 않게 한다.

- 검색은 깊이 때문에 안 걸어 본 곳이 있으면 deepSkipped 로 알린다. 예전엔
  그냥 결과 0 이었다 — 검색은 "여기 없다" 의 근거로 쓰이는데, 안 찾아본 것과
  없는 것이 같은 답으로 나오고 있었다. 패널에 "일부 미탐색" 을 띄우고,
  에이전트에게도 같은 말을 붙인다.
- list_files 는 트리가 잘렸다는 사실(ws.truncated)을 모델에게 말하지 않고
  있었다. 화면에는 "항목이 많아 일부만 표시합니다" 라고 적어 두면서.
  그래서 없는 게 아니라 안 걸어 본 파일을 "없다" 로 읽곤 했다.

실제 앱 검증 5/5 — 깊이 10 파일이 트리와 검색 양쪽에 나오고, 깊이 20 을
묻으면 그때는 미탐색이라고 답한다. 단위 972개 통과.
@Seungpyo1007 Seungpyo1007 added this to the v0.3 (2026-09-30) milestone Aug 5, 2026
@Seungpyo1007 Seungpyo1007 added the bug Something isn't working label Aug 5, 2026
@Seungpyo1007 Seungpyo1007 self-assigned this Aug 5, 2026
@Seungpyo1007
Seungpyo1007 merged commit 271f415 into develop Aug 5, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the fix/deep-folders-invisible branch August 5, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant