Skip to content

hackathon - search/notebook: basic end-to-end notebook result rendering

Administrator requested to merge notebooks-search-e2e-basic into notebooks-search

Created by: bobheadxi

This is a hackathon project, and is not being merged into main! See https://sourcegraph.com/notebooks/Tm90ZWJvb2s6NTE5

Implements end-to-end "rendering" of some stub Notebook results. For real results, see https://github.com/sourcegraph/sourcegraph/pull/33170

This was quite tedious - to define a new search thing, we have to:

  1. create a job
  2. create a match type
  3. create an event type + adapters
  4. copy the above to web app
  5. create custom UI (all the search results UI are very tightly coupled to the result type) to handle this result type, adding to the mess

I had to extend Match.Key with an identifier that's not a repository, and bypass the repository permissions filter here: notebooks-search...notebooks-search-e2e-basic?expand=1#diff-99275f59b8

image

Thought: A generic match + event type + UI for generic match types would be really nice IMO. Then the only custom stuff we need to create is a job to extend search with new backends, and everything else would ideally take care of itself. I suspect extending this to include notebook blocks, then batch changes, then etc. will not be very pretty

My first thought is that there seem to be roughly 2 categories:

  • "Entity" things (repos, commits, files, etc + notebooks)
  • "Content" things that fall under an entity (content, symbols, etc + notebook blocks)

Merge request reports

Loading