Skip to content

fix(files): skip QA copies, task worktrees and .astro in @ file search - #179

Merged
touch2be merged 1 commit into
akemmanuel:masterfrom
touch2be:fix/file-search-skip-transient-dirs
Oct 25, 2026
Merged

touch2be merged 1 commit into
akemmanuel:masterfrom
touch2be:fix/file-search-skip-transient-dirs

Conversation

@touch2be

Copy link
Copy Markdown
Collaborator

Problem

The @ file mention search skips only .git, node_modules and dist. On a hosted Astro Project, generated copies filled the result limit before the real files:

  • .opengui-qa held QA baseline copies (9.8 GiB in one Project).
  • .opengui-worktrees held task worktrees.
  • .astro is Astro's build cache.

Users typing @foto.jpg saw only copies. An exact filename query took more than 30 s.

Change

server/services/file-search.ts also skips .astro, .opengui-qa and .opengui-worktrees, at any depth. .opengui-uploads (and .opengui-images) stay searchable, even when Git ignores them.

This change has been running in production on a patched 0.6.3 Host since 2026-10-16:

  • A broad jpg query takes ~0.8 s.
  • An exact image query takes ~0.6 s and returns no temporary copies.

Tests

New server/services/file-search.test.ts (3 tests). Two of them fail on master:

  • Copies do not crowd out real files: QA, worktree and .astro copies no longer fill maxResults ahead of real Project images.
  • Uploads stay searchable: uploaded originals in a Git-ignored .opengui-uploads are still found.
  • Nested folders are pruned: these folders are skipped below the Project root too.

Results:

  • pnpm run check and pnpm run slop-check pass.
  • pnpm run test: 1,621 of 1,622 tests pass. The one failure, strip-types-runtime.test.ts, took 16 s against its 15 s timeout under full parallel load and passes on its own.

For review

.opengui-qa and .opengui-worktrees are folder conventions of a managed Host deployment, not core OpenGUI. If you'd rather not hardcode them, an alternative is a configurable skip list, or respecting .gitignore with an exception for .opengui-uploads.

🤖 Generated with Claude Code

File mentions searched every directory except .git, node_modules and
dist. On a hosted Astro Project, `.opengui-qa` held 9.8 GiB of baseline
copies: they filled the result limit before the real files, and an exact
image query took over 30 s.

Skip `.astro`, `.opengui-qa` and `.opengui-worktrees` as well, at any
depth. `.opengui-uploads` stays searchable even when Git ignores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@touch2be
touch2be merged commit 296525f into akemmanuel:master Oct 25, 2026
2 checks passed
@touch2be touch2be mentioned this pull request Oct 25, 2026
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.

1 participant