Skip to content

Fix opening, revealing, and displaying indexed folders in root search - #1124

Merged
Xoshbin merged 3 commits into
Xoshbin:mainfrom
YsielX:fix/windows-indexed-folder-actions
Nov 25, 2026
Merged

Xoshbin merged 3 commits into
Xoshbin:mainfrom
YsielX:fix/windows-indexed-folder-actions

Conversation

@YsielX

@YsielX YsielX commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Searching for a folder under an indexed Windows drive could return the right result, but pressing Enter or choosing Reveal in Finder failed. The row could also show an empty icon tile.

Local search results now open using the launcher's own file actions, and paths rebuilt from a drive root keep a single separator. On Windows, Show in File Explorer opens the parent folder with the result selected. Both indexed results and exact paths display a folder or file glyph until a native icon is available.

The third commit addresses a separate icon case. A folder named archive.pdf and a document named manual.pdf can now display their respective native icons.

Affected areas

  • Launcher UI / UX
  • SDK / Extensions
  • Rust Backend / Platform
  • Docs / Tooling / Other

Manual smoke test & Validation

  • Manually tested the Windows development build. The folder icon was visible in root search, Enter opened the folder, and Show in File Explorer selected it in its parent.
  • On Windows, ran the native search and opener code against a Steam library folder. Verified that Explorer opened the folder, then selected it in its parent after Reveal. Windows returned a 32×32 folder icon.
  • 84 focused Rust tests and 95 frontend tests passed. Svelte type checking reported zero errors. Full local CI stopped at the workspace-wide Prettier check.

AI usage

  • AI tools helped produce this change.
  • I ran the asyar-contribution skill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.

Boundaries

  • User-facing menu text uses existing translations.
  • Published third-party extension contracts and permission checks are preserved.
  • Search typing and window reveal do not wait for native icon extraction.
  • Full local CI passes.

Summary by CodeRabbit

  • Bug Fixes
    • File and folder search results now display more appropriate icons, including folder icons for directory results.
    • File icons load more reliably across platforms, and folders and files with similar paths receive the correct icons.
    • Reveal actions now use labels that better match the current platform.
    • Paths created from filesystem roots now avoid duplicate separators and can be found correctly.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Xoshbin/asyar
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 8a73623
  • Layers: Repository YAML
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ab703f56-1bea-47bf-aaec-e94155d790e1
Commits

Reviewing files that changed from the base of the PR and between 484231f and c17d35a.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The changes update filesystem-root path materialization, file-search result icons and reveal actions, and root-row icon loading. Tests cover path lookup, result metadata and icons, platform-specific action labels, and direct icon requests.

Changes

Indexed Path Materialization

Layer / File(s) Summary
Materialize filesystem-root paths
asyar-launcher/src-tauri/src/file_index/index.rs
Path materialization avoids adding a separator when the accumulated path already ends with one. A test checks root-child materialization and lookup on Windows and non-Windows platforms.

File Search Results and Actions

Layer / File(s) Summary
Build and map file-search result icons
asyar-launcher/src-tauri/src/search_engine/file_search_inline.rs, asyar-launcher/src-tauri/src/search_engine/file_search_path.rs, asyar-launcher/src/lib/searchResultMapper.ts, asyar-launcher/src/lib/searchResultMapper.test.ts
Inline and exact-path results use a folder glyph for directories and omit the extension ID. File results without an explicit icon resolve to icon:file-text. Tests check these result values.
Select file actions by platform
asyar-launcher/src/built-in-features/file-search/fileActions.ts, asyar-launcher/src/built-in-features/file-search/fileActions.test.ts
Local-file detection excludes results with an extension ID. Reveal titles vary by host platform, and the reveal description uses the clipboard translation key. A test checks the Windows title and description.

Root-Row Icon Loading

Layer / File(s) Summary
Request and cache root-row icons
asyar-launcher/src/lib/launcher/rootFileIcons.svelte.ts, asyar-launcher/src/lib/launcher/rootFileIcons.test.ts
The cache removes thumbnail loading and requests icons directly for rows with paths. It skips requests on platform other, stores successful icon URLs, and ignores rejected requests. Tests cover missing paths and distinct icons for paths with the same suffix.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • Xoshbin/asyar#964: Defines the ResolvedIcon and frontend icon contracts used by the folder-row glyphs and file-result icon mapping.

Suggested labels: bug

Suggested reviewers: xoshbin, bennocrafter

Merge Risk: Minimal · previous review 48423

The change fixes opening and revealing indexed folders on Windows and adds fallback icons. No concrete merge-blocking defect remains after review.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix, the three affected behaviors (opening, revealing, and displaying indexed folders), and the scope (root search). The changeset covers each of these: materialize_path separator …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the fix, the three affected behaviors (opening, revealing, and displaying indexed folders), and the scope (root search). The changeset covers each of these: materialize_path separator handling for opening, file actions and the Windows reveal label for revealing, and folder_icon for display. The title is specific and does not use vague terms.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Xoshbin/asyar
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 8a73623
  • Layers: Repository YAML
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9071b35e-9f6d-46e7-bfae-c91bbeafb239
Commits

Reviewing files that changed from the base of the PR and between 8a73623 and 484231f.

Files selected for processing: 9

  • asyar-launcher/src-tauri/src/file_index/index.rs
  • asyar-launcher/src-tauri/src/search_engine/file_search_inline.rs
  • asyar-launcher/src-tauri/src/search_engine/file_search_path.rs
  • asyar-launcher/src/built-in-features/file-search/fileActions.test.ts
  • asyar-launcher/src/built-in-features/file-search/fileActions.ts
  • asyar-launcher/src/lib/launcher/rootFileIcons.svelte.ts
  • asyar-launcher/src/lib/launcher/rootFileIcons.test.ts
  • asyar-launcher/src/lib/searchResultMapper.test.ts
  • asyar-launcher/src/lib/searchResultMapper.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@YsielX
YsielX force-pushed the fix/windows-indexed-folder-actions branch from 484231f to c17d35a Compare November 24, 2026 15:57
@Xoshbin
Xoshbin merged commit dfc267c into Xoshbin:main Nov 25, 2026
14 of 16 checks passed
@Xoshbin

Xoshbin commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Thanks a lot for fixing this, @YsielX! I really appreciate the attention to detail on the Windows folder paths, icons, and reveal labels. Merged!

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.

2 participants