Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Added `isBranchFilteringEnabled` flag to `search_finished` PostHog event. [#781](https://github.com/sourcebot-dev/sourcebot/pull/781)

## [4.10.15] - 2026-01-22

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ export const SearchResultsPage = ({
])
}, [searchQuery, setSearchHistory]);

// Look for any files that are not on the default branch.
const isBranchFilteringEnabled = useMemo(() => {
return files.some((file) => {
return file.branches?.some((branch) => branch !== 'HEAD') ?? false;
});
}, [files]);

useEffect(() => {
if (isStreaming || !stats) {
return;
Expand Down Expand Up @@ -138,6 +145,7 @@ export const SearchResultsPage = ({
flushReason: stats.flushReason,
fileLanguages,
isSearchExhaustive: isExhaustive,
isBranchFilteringEnabled,
});
}, [
captureEvent,
Expand All @@ -147,6 +155,7 @@ export const SearchResultsPage = ({
stats,
timeToSearchCompletionMs,
timeToFirstSearchResultMs,
isBranchFilteringEnabled,
]);

const onLoadMoreResults = useCallback(() => {
Expand All @@ -157,13 +166,7 @@ export const SearchResultsPage = ({
router.push(url);
}, [maxMatchCount, router, searchQuery, domain]);

// Look for any files that are not on the default branch.
const isBranchFilteringEnabled = useMemo(() => {
return files.some((file) => {
return file.branches?.some((branch) => branch !== 'HEAD') ?? false;
});
}, [files]);


return (
<div className="flex flex-col h-screen overflow-clip">
{/* TopBar */}
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/lib/posthogEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export type PosthogEventMap = {
regexpsConsidered: number,
flushReason: string,
fileLanguages: string[],
isSearchExhaustive: boolean
isSearchExhaustive: boolean,
isBranchFilteringEnabled: boolean,
},
////////////////////////////////////////////////////////////////
wa_trial_nav_pressed: {},
Expand Down