Skip to content

fix(runtime): search workspace files across directory levels - #241

Merged
kingsword09 merged 1 commit into
mainfrom
fix/runtime-workspace-file-search
Oct 27, 2026
Merged

kingsword09 merged 1 commit into
mainfrom
fix/runtime-workspace-file-search

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

@on only searched the current directory, so files such as First_folder/one.py and Second_folder/one.py never appeared without typing their parent paths. Extend the native runtime provider to search all workspace directory levels for unqualified names, ranking exact names before prefix and substring matches and retaining the best requested results.

Keep empty-token and explicit-path completion on the native provider. Recursive searches use the runtime filesystem port and existing directory/hidden-entry exclusions, skip symlinks, forward cancellation, tolerate unreadable subdirectories, and bound concurrent reads and retained matches. Register this as a required, verified, idempotent runtime sync patch and document the behavior.

Closes #240.

Validation with Bun 1.4.1 and Node 26.4.0:

  • bun run test:unit: 914 passed, 2 skipped, 0 failed.
  • bun test test/runtime/workspace-paths.test.ts: passed against the rebuilt official runtime and native filesystem adapter. The same test reproduced the missing nested files before the patch.
  • bun run sync:local and bun scripts/check-runtime.ts: passed against ZCode 3.16.3 / runtime 0.17.0.
  • bun run typecheck and git diff --check: passed.

Real-filesystem regressions cover duplicate names, result limits across traversal batches, deep and Unicode paths, spaces, exclusions, symlinks, cancellation, and new or removed files. TUI integration verifies selection inserts the complete relative path.

@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit c2d3a149a067b8330422b0be2bb903b5896925d2.

npx --yes https://pkg.pr.new/zcode-app-cli@c2d3a14

Full repository URL

This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with /pkg-pr-new.

Workflow logs

@kingsword09
kingsword09 merged commit 6dfe51e into main Oct 27, 2026
5 checks passed
@kingsword09
kingsword09 deleted the fix/runtime-workspace-file-search branch October 27, 2026 00:39
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.

Full file search

1 participant