sourcegraph / sourcegraph-public-snapshot

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

Chrome browser extension asks to grant permissions on all domains #15531

Open AlicjaSuska opened 4 years ago

AlicjaSuska commented 4 years ago

Current behavior

Chrome browser extension displays 'Grant permissions' alert and adds red alert dot to the icon on all the domains.

Screenshot 2020-11-06 at 15 29 16rome

Screenshot 2020-11-06 at 15 29 29

Desired behavior It should:

Screenshot 2020-11-06 at 15 32 31
github-actions[bot] commented 4 years ago

Heads up @joelkw @felixfbecker @jeanduplessis - the "team/web" label was applied to this issue.

felixfbecker commented 4 years ago

@AlicjaSuska we cannot know whether the active page is a supported code host without having permissions for it (otherwise the permissions system wouldn't make sense). So this is working as expected and the best we can do :) With that in mind, do you still see something we should change here?

AlicjaSuska commented 4 years ago

Thank you for the details @felixfbecker.

felixfbecker commented 4 years ago

I'm not sure if I understand your point correctly. We already know the domain as we display it in the 'Grant permissions' alert. Could we compare it to the list of supported code hosts and change the alert content for the pages that are not the code hosts? Asking people to grant permissions for not supported pages is quite misleading, I would love it to behave differently than it is now.

A customer can deploy their code host under any URL, so we can't determine that a page is not a code host just because it's not one of the known cloud code hosts (github.com, gitlab.com).

if it's still impossible and we have to keep the current behavior: after granting the permissions, we should display a 'not working on this domain' alert. Currently, we do not display any alerts.

I like this idea, we can detect whether the page is not a supported code host once we have permissions (although this is maybe more of an edge case). Is there a design for this?

github-actions[bot] commented 3 years ago

Heads up @joelkw @felixfbecker - the "team/extensibility" label was applied to this issue.