Skip to content

fix(conversation): improve workspace search#594

Open
CottChen wants to merge 4 commits into
iOfficeAI:mainfrom
CottChen:fix/project-changes-scroll-search
Open

fix(conversation): improve workspace search#594
CottChen wants to merge 4 commits into
iOfficeAI:mainfrom
CottChen:fix/project-changes-scroll-search

Conversation

@CottChen

@CottChen CottChen commented Jul 8, 2026

Copy link
Copy Markdown

Description

Companion backend changes for iOfficeAI/AionUi#3539.

This PR improves workspace search used by the project panel:

  • Search files recursively instead of only direct children.
  • Use ignore::WalkBuilder so .gitignore and git excludes are respected.
  • Skip expensive directories by default, including .git, node_modules, target, and dist.
  • Still allow searching inside an ignored or normally skipped directory when that directory is selected explicitly as the search root.
  • Add search modes: all, name, and content.
  • Return match metadata so the frontend can prioritize filename matches and show file/content-block counts.

Why

The AionUi project panel now exposes scoped search, search modes, and search result counts. Those UI behaviors depend on the backend returning recursive, mode-aware search results with match-kind metadata. The default pruning avoids accidentally walking dependency/build directories while keeping explicit scoped searches possible.

Tradeoffs

The search remains bounded by the existing result limit and is optimized for interactive project-panel usage rather than full indexing. This keeps the implementation simple and avoids background index state, at the cost of doing a fresh walk per query.

Local Checks

  • cargo fmt --all --check
  • cargo test -p aionui-conversation browse_workspace_search_
  • cargo clippy -p aionui-conversation -- -D warnings

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