Skip to content

new-or-deleted-file breaks due to a missing pull request files-changed sidebar #6741

Closed as not planned

Description

@voidedstarlight

Description

In pull requests where there is only one changed file, such as https://github.com/refined-github/sandbox/pull/4/files, the changed-files sidebar is not loaded, causing new-or-deleted-file to raise the error Could not find the file sidebar, is the sidebar loaded?.

The error can be silenced by changing line 10 of the source to exit when the sidebar is not present on any page:

-if (!list && pageDetect.isCommit()) {
+if (!list) {

How to replicate the issue + URL

  1. Navigate to the files-changed view of a pull request with one changed file, such as https://github.com/refined-github/sandbox/pull/71/files
  2. The error occurs
     

The missing sidebar and the error in the console

Image

Extension version

23.11.15

Browser(s) used

All supported browsers

Activity

  1. fregante commented on Jun 18, 2023

    @fregante
    Member

    Thanks for the report. Last related change:

    The feature used to have a piece of code that triggered the loading of the sidebar, maybe we should restore it.

  2. changed the title [-]The files-changed sidebar does not exist in certain pull-requests, breaking `new-or-deleted-file`[/-] [+]`new-or-deleted-file` breaks due to a missing pull request files-changed sidebar[/+] on Jun 19, 2023
  3. added
    small
    on Nov 7, 2023
  4. fregante commented on Oct 15, 2024

    @fregante
    Member

    Follows https://github.com/refined-github/refined-github/pull/6702/files#r1211780853

    I tried using the API. Example:

    {
      repository(owner: "refined-github", name: "sandbox") {
        pullRequest(number: 71) {
          files(first: 100) {
            nodes {
              path
              changeType
            }
          }
        }
      }
    }
    {
      "data": {
        "repository": {
          "pullRequest": {
            "files": {
              "nodes": [
                {
                  "path": "5854",
                  "changeType": "DELETED"
                },
                {
                  "path": "6678",
                  "changeType": "ADDED"
                },
                {
                  "path": "README.md",
                  "changeType": "MODIFIED"
                },
                {
                  "path": "renamed and edited.file.md",
                  "changeType": "RENAMED"
                }
              ]
            }
          }
        }
      }
    }

    https://docs.github.com/en/graphql/overview/explorer

    However this doesn't seem to be possible for commits :(((((

    {
      repository(owner: "refined-github", name: "sandbox") {
        object(expression: "a00694ff7370d46b5f6d723a0b39141903dae45a") {
          ... on Commit {
            files { # doesn't exist
              path
              status
            }
          }
        }
      }
    }
  5. removed
    small
    on Nov 9, 2024
  6. fregante commented on Nov 18, 2024

    @fregante
    Member

    Let's just use the API and drop support for the commits. It's just not worth it and a new view is coming soon/ish

  7. SunsetTechuila commented on Nov 14, 2025

    @SunsetTechuila
    Contributor

    In pull requests where there is only one changed file, such as refined-github/sandbox#4 (files), the changed-files sidebar is not loaded

    Not true for the new view

  8. fregante commented on Mar 7, 2026

    @fregante
    Member

    So this issue can be closed?

  9. SunsetTechuila commented on Mar 7, 2026

    @SunsetTechuila
    Contributor

    I think so

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions