From 2d50f4ef15e64bd888d02b046a6699a725fbcef9 Mon Sep 17 00:00:00 2001 From: bkellam Date: Thu, 27 Nov 2025 14:22:34 -0800 Subject: [PATCH 1/2] fix --- packages/web/src/features/search/fileSourceApi.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/web/src/features/search/fileSourceApi.ts b/packages/web/src/features/search/fileSourceApi.ts index 15cb93c3..3ea4aa73 100644 --- a/packages/web/src/features/search/fileSourceApi.ts +++ b/packages/web/src/features/search/fileSourceApi.ts @@ -6,6 +6,7 @@ import { search } from "./searchApi"; import { sew } from "@/actions"; import { withOptionalAuthV2 } from "@/withAuthV2"; import { QueryIR } from './ir'; + // @todo (bkellam) #574 : We should really be using `git show :` to fetch file contents here. // This will allow us to support permalinks to files at a specific revision that may not be indexed // by zoekt. We should also refactor this out of the /search folder. @@ -21,12 +22,12 @@ export const getFileSource = async ({ fileName, repository, branch }: FileSource }, }, { - regexp: { - regexp: fileName, + substring: { + pattern: fileName, case_sensitive: true, file_name: true, - content: false - }, + content: false, + } }, ...(branch ? [{ branch: { From b231707923c542af91f748d46ab46791eed4c1d4 Mon Sep 17 00:00:00 2001 From: bkellam Date: Thu, 27 Nov 2025 14:23:54 -0800 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a213565c..50e8ccf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed issue where single quotes could not be used in search queries. [#629](https://github.com/sourcebot-dev/sourcebot/pull/629) +- Fixed issue where files with special characters would fail to load. [#636](https://github.com/sourcebot-dev/sourcebot/issues/636) ## [4.10.0] - 2025-11-24