程序员阿江(Relakkes) 276b67083a Align file mention search with CLI path display
Desktop search results were visually misleading when many directories shared the same basename, because the UI emphasized the basename and the server ranking allowed deep basename matches to outrank direct path-prefix matches. This makes search rows show the insertable relative path and ranks direct path-prefix matches before unrelated same-name directories.

Constraint: Desktop @ file suggestions should match the CLI mental model for path search.

Rejected: Keep basename plus parent-path rows | it hides the distinction between src/, src/hooks/, and desktop/src in the primary text.

Confidence: high

Scope-risk: narrow

Directive: Preserve path-prefix ranking ahead of basename-only matches for directory searches.

Tested: bun test src/server/__tests__/filesystem.test.ts

Tested: cd desktop && bun run test -- FileSearchMenu.test.tsx ChatInput.test.tsx

Tested: bun run check:server

Tested: bun run check:desktop
2026-05-13 10:38:14 +08:00
..
2026-03-31 01:55:58 -07:00