SCM title menu Create Pull Request action is unavailable when in a Remote window
- Extension version: v0.51.2022090109
- VSCode Version: 1.71-insider
- OS: Windows 11
Steps to Reproduce:
- Open a GitHub codespace and go to the SCM view
- :bug: the Create Pull Request button is not available. I have hit this in WSL and in a GitHub codespace so far so I suspect it is generic to all Remote-* windows in VS Code
From inspecting context keys, it looks like something is off with the scmProviderRootUri value in this when clause https://github.com/microsoft/vscode-pull-request-github/blob/57dd87743f1caa943ef5e65bfc0d6dcf101a0ee6/package.json#L1601-L1605
Its value is a vscode-remote URI but the github.reposNotInReviewMode has file URIs.

@lszomoru the issue appears to be that I am comparing the URI that the extension host understands (file://workspaces/vscode) with the URI that the renderer/local extension host understands (vscode-remote://codespaces...). I'm getting the file URI using the rootUri API from the git extension. That one should be a file URI ✅
The difficulty comes when comparing it to scmProviderRootUri. scmProviderRootUri is set in the renderer, and as such has a vscode-remote URI. Who is expected to be using this URI? Is it components running in the remote extension host or the renderer/local extension host?
If the answer is both, then I don't know how we can fix this.
This is a frequent papercut for me in Codespaces, my personal feeling is that scmProviderRootUri should transform outgoing URIs, i.e. vscode-remote should become file://, since non-resolver extensions like GHPRI should not need to know about vscode-remote. If we are worried about breaking existing consumers of this context key, could we consider introducing a new one @lszomoru?
@lszomoru should scmProviderRootUri transform the URI or should a new context value be introduced?
@lszomoru would you consider adding another context value?
I am fine with transforming the URI, but I also want to hear from @joaomoreno as he has the full context of this particular context key.
@lszomoru proposed that if I stored github.reposNotInReviewMode as a uri instead of a string this would just work. I've tested this out with the test resolver, and it seems to work great!
Mahmood amin ok
Mahmood amin ok