This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Blob keyboard navigation: Only load when code intelligence is available#43458
Merged
Conversation
umpox
commented
Oct 26, 2022
| - gitserver-1 | ||
| - searcher | ||
| - web | ||
| - oss-web |
Contributor
Author
There was a problem hiding this comment.
For some reason sg start oss loads web instead of oss-web. This feels incorrect, as it means lots of things just break currently (e.g. code intelligence menus load and just error). LMK if anyone knows if this change isn't OK
Contributor
There was a problem hiding this comment.
I ran into this same issue yesterday and made this same change in #43450
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 54292da and 1561d32 or learn more. Open explanation
|
keegancsmith
approved these changes
Oct 26, 2022
keegancsmith
left a comment
Member
There was a problem hiding this comment.
Didnt review the code but tested locally and it works
BolajiOlajide
pushed a commit
that referenced
this pull request
Oct 27, 2022
sqs
referenced
this pull request
Oct 28, 2022
Fixes:
```
TypeError: Cannot read properties of undefined (reading 'fields')
at API.hasStencils (api.ts:579:84)
```
Related to https://github.com/sourcegraph/sourcegraph/pull/43458, but that did not fully fix the issue (seemingly because the GitBlobLSIFData type is not even introspectible on OSS because LSIF is not available in OSS).
BolajiOlajide
pushed a commit
that referenced
this pull request
Oct 28, 2022
sqs
referenced
this pull request
Oct 28, 2022
* fix error in OSS build when hovering tokens
Fixes:
```
TypeError: Cannot read properties of undefined (reading 'fields')
at API.hasStencils (api.ts:579:84)
```
Related to https://github.com/sourcegraph/sourcegraph/pull/43458, but that did not fully fix the issue (seemingly because the GitBlobLSIFData type is not even introspectible on OSS because LSIF is not available in OSS).
* remove/unexport local defs
* move useCodeIntel hook to /enterprise/ tree
* move legacy codeintel to enterprise
The search-based code intelligence is an enterprise-only feature. This change clarifies it by showing a nicer message instead of an error if it's attempted to be used in the OSS build. It also cleans up how the enabled-or-not flag is determined in code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Code intelligence is not enabled in our OSS application. This change ensures that we do not attempt to query for
stencildata for the OSS product, which caused an error.I've also split this out into its own query. I think this is required anyway as I've noticed that
stencilcan sometimes hang sometimes (when code intelligence is still being processed?). Keyboard navigation shouldn't ever block the first render of the blob, so it makes more sense to have this as a separate query.Test plan
Tested locally, in the OSS product and in enterprise