Skip to content

[Bug]: Picking a changed file resets selection in an earlier diff for the same PR #39170

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. On an Android phone emulator, open a GitHub pull request with at least two changed files and a published, current inline discussion on the first file.
  2. Tap the first file under Changed files on the Overview tab.
  3. Long-press a code line near the discussion to select it.
  4. Tap the existing discussion row under the code.
  5. Tap View file diff in Discussion.
  6. Tap Changed files in the bottom toolbar of this Changes screen.
  7. Pick the second file.
  8. Tap Back to return to Discussion.
  9. Tap Back to return to the original Changes screen.
  10. Open Diff options.

Expected behavior

The original diff retains the selected line and still offers Copy line.

Actual behavior

The original diff loses its selected line and Copy line is gone. The original diff can also move to the second file.

Selected line in the first file

Diff options after returning from Discussion

Second file on the original Changes screen

Replay of the diff and discussion steps

Impact

Minor bug or occasional failure. This affects reviewers who use the file picker after opening another diff from an inline discussion and then return to their original diff.

Version or commit

main at b0e469ceb9. The cause is at apps/mobile/src/features/pull-requests/pullRequestFileJump.ts:15.

Environment

Pixel_9_API_37, Android 17.0, Android Emulator on Linux x64.

Logs or stack traces

Commands that reproduce it on the device
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e6 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device fill @e5 '#39118' --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device record start --scope device /home/t3/.t3/worktrees/t3code/t3-20e7d4be-52d971cbb21c25d2/captures/replay.mp4
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e26 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e56 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e36
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device scroll down 0.52
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device scroll down 0.21
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device longpress 390 1512 700
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device screenshot /home/t3/.t3/worktrees/t3code/t3-20e7d4be-52d971cbb21c25d2/captures/selected-line.png
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press 604 1753 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e8 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e14 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e32 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e3 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e3 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device press @e6 --settle
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device snapshot -i
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device screenshot /home/t3/.t3/worktrees/t3code/t3-20e7d4be-52d971cbb21c25d2/captures/diff-options-after-return.png
/home/t3/.t3/userdata/device/targets/t3-e823b002997f8719de6a9f44/agent-device record stop

Workaround

No response

Activity

  1. added
    vouch:trusted
    on Nov 19, 2026
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

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions