Skip to content

Bug: Keybindings not working #3190

Closed

Description

Issue Type: Bug

I'm trying out the keybindings provided by the extension but it's not working.

I have tried GitHub Pull Requests: Copy Commit Hash which gives the error:
Cannot read property 'sha' of undefined when used.

And also GitHub Pull Requests: Mark File As Viewed which gives the error:
Marked file as viewed failed: TypeError: Cannot read property 'pullRequest' of undefined

Nor sure if I'm doing anything wrong here but shouldn't it just work after being assinge a key combination?

Extension version: 0.34.0
VS Code version: Code 1.63.0 (7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e, 2021-12-07T06:26:56.179Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.71GB (15.49GB free)
Process Argv --crash-reporter-id 009e0e6a-4a53-4bdb-9f46-6e92241da487
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.60.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
Memory (System) 15.63GB (12.20GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.60.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
Memory (System) 15.63GB (12.20GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30384386
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsaa593cf:30376535
pythonvs932:30410667
vscop804:30404766
vs360cf:30404996
vsrem710:30405998
vscexrecpromp3c:30407761

Activity

  1. changed the title [-]Keybindings not working[/-] [+]Bug: Keybindings not working[/+] on Dec 14, 2021
  2. alexr00 commented on Dec 15, 2021

    @alexr00
    Member

    GitHub Pull Requests: Copy Commit Hash only works when you have a commit selected in the "Changes In Pull Request" view (it is hidden from the command palette because of this).

    GitHub Pull Requests: Mark File As Viewed is similar. It only works when you have a file selected in the "Changes in Pull Request" view (it is also hidden from the command palette). However, this one I could see being useful if you want to mark the currently open file as viewed so I will call this a feature request.

    In general, if a command is hidden from the command palette and the command is not specifically listed in documentation as being available from everywhere, then it may behave poorly when used in a keybinding.

  3. added
    feature-request
    on Dec 15, 2021
  4. lagerholm commented on Dec 15, 2021

    @lagerholm
    Author

    Thanks for the clarification. The Copy Commit Hash was a bad example. Seem totally logical that it works like that.

    Regarding the Mark File As Viewed I can't get it to work even though I have the file selected. It still gives the error. Maybe this is a bug?

    Or is it not this you mean with

    file selected in the "Changes in Pull Request" view

    image

  5. alexr00 commented on Dec 20, 2021

    @alexr00
    Member

    For Mark File As Viewed, you must still execute the command through the tree view and not with a keybinding. The feature request is to enable marking the file as viewed with a keybinding.

  6. added a commit that references this issue on Oct 19, 2022
    f2a4d76
  7. added a commit that references this issue on Oct 19, 2022
    c33456c
  8. alexr00 commented on Oct 24, 2022

    @alexr00
    Member

    To verify:

    • Set a keyboard shortcut for pr.markFileAsViewed
    • Open a pull request in VS Code
    • Open a file that included in the pull request
    • Execute your keyboard shortcut and verify that the file is marked as viewed. The file should also be closed.
  9. added
    verification-needed
    on Oct 24, 2022
  10. rzhao271 commented on Oct 25, 2022

    @rzhao271
    Contributor

    For microsoft/vscode#164641, when I go into review mode and use the keybind on the insertResource.ts file, the file is marked as viewed, but the directory is not marked as viewed. If I use my mouse, then both are marked as viewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions