sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.27k forks source link

Show the code host in the search results #31878

Open mike-r-mclaughlin opened 2 years ago

mike-r-mclaughlin commented 2 years ago

Feedback

When you have many code hosts, often of the same type (multiple GHE hosts and GH.com, for example), it's difficult to distinguish where the code lives from the search result without hovering over the link and looking at the result.

It would be great to provide a configuration to include that in the breadcrumb. Initially, we thought we could do it with the repositoryPathPattern in the code host configuration. But, that does not display in the search results.

Direct quote

while i was searching, it wasn’t readily obvious where the code lived - like, if it came from git.test vs Github, and if it was in git.test, which Org the code based was from. Can we please have the config option to add the code host in the breadcrumbs in the search results, ex: Git.test > gus/guscore > Jenginsfile in this case?

Customer

Customer Slack discussion

github-actions[bot] commented 2 years ago

Heads up @benvenker @lguychard - the "team/search-product" label was applied to this issue.

benvenker commented 2 years ago

Interesting idea. @limitedmage this sounds like it does fall on us, do you agree?

limitedmage commented 2 years ago

Yes, this is ours. Looks related to #20874. It requires some refactoring of the data the server returns, since the server does not return the full repo name for content results.

camdencheek commented 6 months ago

This is still an issue. We no longer use pre-formatted headers, and for code hosts that are unknown to us (i.e. not github.com, bitbucket.com, or gitlab.org), we do not even render a code host icon that can be hovered over.

Image

cc @taiyab for design