Repository navigation
fix(runtime): search workspace files across directory levels - #241
Merged
Merged
Conversation
Contributor
|
pkg-pr-new preview for commit npx --yes https://pkg.pr.new/zcode-app-cli@c2d3a14This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ononly searched the current directory, so files such asFirst_folder/one.pyandSecond_folder/one.pynever 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:localandbun scripts/check-runtime.ts: passed against ZCode 3.16.3 / runtime 0.17.0.bun run typecheckandgit 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.