Skip to content

Up arrow at the top of History list sends us to a random commit #2763

Closed

Description

@snicolet

Description

When the history is long, highlighting the last commit (the most recent one) at the top of the history list and then typing the "up" arrow sends us to a random commit in the list, sometimes years ago.

Version

GitHub Desktop version: [0.9.1]

OS version: [Mac OS X 10.9.5]

Steps to Reproduce

  1. Launch GitHub Desktop
  2. Switch to a branch with a long history (for instance the master branch of an active project)
  3. Click on the History panel to show the history of the last commits
  4. Click on the most recent commit, or navigate to it with up/down arrow keys
  5. Once the most recent commit is highlighted at the top of the list, type the "up" arrow key

Expected behavior: The list should not change and the most recent commit should stay highlighted

Actual behavior: The list jumps to a random commit, sometimes years ago

Reproduces how often: 100%

Logs

2017-09-18.desktop.production.log.txt

Activity

  1. tierninho commented on Sep 18, 2017

    @tierninho
    Contributor

    @snicolet The up arrow cycles you to the bottom of the history list as it is an endless loop. All commits are in chronological order.

    Similarly, hitting the down arrow on the last commit will bring you to the latest commit.

    Perhaps @desktop/design has some new thoughts on the matter.

  2. shiftkey commented on Sep 18, 2017

    @shiftkey
    Member

    Cross-referencing the earlier report on this: #2479

  3. snicolet commented on Sep 18, 2017

    @snicolet
    Author

    @tierninho Nope, in my case the up arrow does not cycle me to the bottom of the history list, but jumps to a random commit N somewhere in the middle of the list (it changes every time). This means that I can not undo the effect of the up arrow with a subsequent down arrow, as the down arrow just brings me to commit (N+1).

    In fact, anyway, I think the list should not change when we are on top of the list and we hit up.

    PS: this is with an history of 4135 commits for the chess program project https://github.com/official-stockfish/Stockfish

  4. added
    bug
    on Sep 18, 2017
  5. tierninho commented on Sep 18, 2017

    @tierninho
    Contributor

    @snicolet Thanks for the clarity. I was able to reproduce the error on your repo, however I do have a temporary "fix" as well.

    Looks like the all commits in the History need to be loaded first, and then the functionality works as intended. This means scrolling to the bottom of the 4,135 commits, then attempting the up arrow.

    Due to the long list of commits, upon first opening the History tab, it appears there is a limited load of commits that prevents Desktop from jumping to the true first commit.

  6. joshaber commented on Sep 18, 2017

    @joshaber
    Contributor

    Yeah, this is a weird bit of behavior caused by the way keyboard navigation wraps around. We should disable it.

  7. shiftkey commented on Sep 18, 2017

    @shiftkey
    Member

    There be dragons here, as we found out in #2539 when we took a shot at this.

  8. shiftkey commented on Sep 20, 2017

    @shiftkey
    Member

    #2479 is marked as future-proposal, so I'm going to close this out as a duplicate.

    Feel free to add any other feedback to that issue.

  9. locked as resolved and limited conversation to collaborators on Jul 20, 2018
  10. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions