sourcebot icon indicating copy to clipboard operation
sourcebot copied to clipboard

[FR] Add ability to filter by branch or tag in left side panel in search view

Open abraverm opened this issue 10 months ago • 8 comments

Some repositories might have more than one branch or tag that matches the query, it would be helpful to filter the results by branches and tags.

abraverm avatar Jan 21 '26 14:01 abraverm

Hey @abraverm you should be able to filter by branch or tag using this syntax: https://docs.sourcebot.dev/docs/features/search/multi-branch-indexing#search-syntax

Was there something else that you were looking to do that isn't supported?

msukkari avatar Jan 21 '26 17:01 msukkari

I meant the filters to be available on the left panel, like with the repositories and languages.

abraverm avatar Jan 21 '26 17:01 abraverm

makes sense thanks! revised the title

msukkari avatar Jan 21 '26 18:01 msukkari

Thinking out loud: IIRC, zoekt's default behaviour is to search across all branches, but we (add a filter prior to submitting the search) to restrict the search to HEAD. We could remove this restriction and perform the filtering after the search results have been returned, but I'd like to know what the performance impact would be if we are always search across all branches.

brendan-kellam avatar Jan 21 '26 20:01 brendan-kellam

I guess the default restriction is ok, but I recommend for Sourcebot to append it to the query itself so it won't feel like a bug, and maybe add it as a Sourcebot setting. I can imagine people prefering one way or the other to be the default.

abraverm avatar Jan 21 '26 22:01 abraverm

@msukkari Mind if i take this on?

CyberT17 avatar Jan 22 '26 14:01 CyberT17

@CyberT17 sure! Let us know if you have questions

msukkari avatar Jan 22 '26 17:01 msukkari

@msukkari as cyber seems inactive , can i take this on as my first issue in the repository , i am planning to be here for a while and contribute

winshaurya avatar Apr 06 '26 14:04 winshaurya