microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.65k stars 28.69k forks source link

An extension quick pick can break quick open #221789

Closed alexr00 closed 2 months ago

alexr00 commented 2 months ago

This seems to require that an extension quick pick is filtered before the nodes are displayed. It can be reproduced with GHPR:

  1. Install GHPR
  2. Open a repo where there are lots of branches, such as microsoft/vscode
  3. "Create Pull Request"
  4. You need to the right timing here so do the following in quick succession:
    • Click the "base" branch the create view
    • Start typing something that will match to a node once it loads, like "release"
    • Hit enter to select one of the "release" branches
  5. 🐛 Nothing will seem to happen. The quick pick selection will not be taken.
  6. esc out and do ctrl+p to open quick open. Type a file name and enter. 🐛 the file will not open

Stack trace from step 4:

ERR TreeError [QuickInput] Tree element not found: [object Object]: Error: TreeError [QuickInput] Tree element not found: [object Object]
    at ObjectTreeModel.getNode (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/browser/ui/tree/objectTreeModel.js:196:23)
    at vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/browser/ui/tree/abstractTree.js:2204:60
    at Array.map (<anonymous>)
    at vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/browser/ui/tree/abstractTree.js:2204:40
    at EventBufferer.bufferEvents (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/common/event.js:1329:23)
    at WorkbenchObjectTree.setFocus (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/browser/ui/tree/abstractTree.js:2203:32)
    at QuickInputTree.setFocusedElements (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/platform/quickinput/browser/quickInputTree.js:898:24)
    at QuickPick.update (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/platform/quickinput/browser/quickInput.js:838:30)
    at set activeItems (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/platform/quickinput/browser/quickInput.js:537:18)
    at MainThreadQuickOpen.$createOrUpdate (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/api/browser/mainThreadQuickOpen.js:164:34)
    at RPCProtocol._doInvokeHandler (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/services/extensions/common/rpcProtocol.js:409:27)
    at RPCProtocol._invokeHandler (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/services/extensions/common/rpcProtocol.js:394:45)
    at RPCProtocol._receiveRequest (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/services/extensions/common/rpcProtocol.js:335:32)
    at RPCProtocol._receiveOneMessage (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/services/extensions/common/rpcProtocol.js:262:26)
    at UniqueContainer.value (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/services/extensions/common/rpcProtocol.js:141:67)
    at Emitter._deliver (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/common/event.js:956:26)
    at Emitter.fire (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/common/event.js:985:22)
    at BufferedEmitter.fire (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/base/parts/ipc/common/ipc.net.js:486:35)
    at port.onmessage (vscode-file://vscode-app/c:/Users/alros/repos/Microsoft/vscode-2/out/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.js:296:39)
alexr00 commented 2 months ago

@TylerLeonhardt this is the weird behavior that I mentioned a couple months ago but couldn't get a good repro of, but now it's pretty consistent. I also didn't realize that it broke quick open before.

ulugbekna commented 2 months ago

I also observe a stale tree within the quick-pick for picking a branch which gets updated late:

https://github.com/user-attachments/assets/c4e4ccbd-a909-47ff-8e5a-bf4f37747f73

TylerLeonhardt commented 2 months ago

/duplicate https://github.com/microsoft/vscode/issues/219946 fixed tomorrow

VSCodeTriageBot commented 2 months ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

alexr00 commented 2 months ago

I can still repro on the insiders from today (89690b9d76a88fab676d26651134a1ffa4562732).

TylerLeonhardt commented 2 months ago

I can repro! And I can repro in stable so this doesn't appear to be a regression this month, but still should try to fix.

alexr00 commented 2 months ago

Thank you for the fix!