Add path autocomplete + folder picker to add-project flow#29
Merged
Conversation
The add-project / scan-directory path input was a blind free-text field. Replace it with a live directory-completion dropdown (Tab → common prefix, ↑/↓ to pick, Enter drills in or commits) plus a native "Browse…" folder picker, seeded with ~/ as the base directory. Backend: port the directory-listing logic from claude-commander's path_completer.rs into a stateless complete_path command; unify tilde expansion into one helper and apply it to add_project too. Add the tauri-plugin-dialog plugin for the native picker. Frontend: rework renderTopInput with the dropdown, debounced completion, keyboard handling, and the Browse button. Add fakes + an iwft scenario. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The add-project / scan-directory path input was a blind free-text field. This makes it a live path autocomplete with a native folder picker, seeded with
~/as the base directory.How
Backend (
src-tauri/)projects.rs— new statelesscomplete_path(partial) -> Vec<String>command, with directory-listing logic ported from claude-commander's (private)tui/path_completer.rs. Unified tilde handling into oneexpand_tilde/unexpand_tildehelper (removed the oldshellexpand_tilde) and applied it toadd_project. Added 5 unit tests.main.rs— registeredcomplete_path; addedtauri_plugin_dialog::init().Cargo.toml/capabilities/default.json—tauri-plugin-dialog+dialog:allow-open;tempfiledev-dep.Frontend (
src/)main.tsrenderTopInput— dropdown, debouncedcomplete_path, keyboard handling, and the Browse button.style.css— dropdown + button styling (existing theme tokens).help.ts+README.md— documented the new keys.Tests
TauriSimulator—complete_path/add_project/scan_directory/dialog fakes driven by a seededdirslist (no real filesystem).SidebarPageObject— path-input POM helpers.addProject.iwft.ts— 5 scenarios (filter, Tab, drill-in, commit, Browse).Verification
typecheck ✓ ·
cargo fmt/clippyclean ✓ · 5 backend tests ✓ · 49 Vitest ✓ · 68 iwft ✓ (incl. 5 new)Notes
complete_pathis synchronous — oneread_dirat a 100ms debounce is negligible on the main thread.~form when typed (matches the TUI).🤖 Generated with Claude Code