diff --git a/CHANGELOG.md b/CHANGELOG.md index ea80d6c5e..c89adf2ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Maintained the sidebar scroll position when navigating between chats instead of resetting to the top. [#1411](https://github.com/sourcebot-dev/sourcebot/pull/1411) - Upgraded `nodemailer` to `^9.0.1`. [#1356](https://github.com/sourcebot-dev/sourcebot/pull/1356) - Upgraded `@opentelemetry/core` to `^2.8.0`. [#1413](https://github.com/sourcebot-dev/sourcebot/pull/1413) +- Scoped browse file-search recents by revision so recently opened files no longer leak across branches. [#1417](https://github.com/sourcebot-dev/sourcebot/pull/1417) ## [5.0.4] - 2026-06-18 diff --git a/packages/web/src/app/(app)/browse/components/fileSearchCommandDialog.tsx b/packages/web/src/app/(app)/browse/components/fileSearchCommandDialog.tsx index ac743d231..27486f205 100644 --- a/packages/web/src/app/(app)/browse/components/fileSearchCommandDialog.tsx +++ b/packages/web/src/app/(app)/browse/components/fileSearchCommandDialog.tsx @@ -35,7 +35,7 @@ export const FileSearchCommandDialog = () => { const [searchQuery, setSearchQuery] = useState(''); const { navigateToPath } = useBrowseNavigation(); - const [recentlyOpened, setRecentlyOpened] = useLocalStorage(`recentlyOpenedFiles-${repoName}`, []); + const [recentlyOpened, setRecentlyOpened] = useLocalStorage(`recentlyOpenedFiles-${repoName}@${revisionName ?? 'HEAD'}`, []); useHotkeys("mod+p", (event) => { event.preventDefault();