Skip to content

Incorrect viewed files counter in huge PRs #35803

@didim99

Description

@didim99

Description

If you have a huge PR that contains large number of files, more than default limit of review page (e.g. for projects based on Unity 3D game engine), file counter of viewed files on "Files" page shows incorrect value on page load. For example, if you have limit per page is 100 files and you marked 118 of 130 files from PR as viewed then reloaded code review page, the file counter tells you "88/130" instead of "118/130" because remaining 30 files is not loaded to page (you need to click "load more" button to see the actual number of files).

This behaviour is very confusing when you reviewing a huge PRs!

Steps to reproduce:

  1. Login to demo.gitea.com
  2. Open this PR in my test repo: https://demo.gitea.com/didim99/test/pulls/4/files
  3. Click "load more" to see all files
  4. Mark some random files as viewed
  5. Reload page

Gitea Version

1.26.0+dev-91-g39c08ce4c1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Before "load more":
Image

After "load more":
Image

Git Version

Not matters

Operating System

Not matters

How are you running Gitea?

Using demo.gitea.com

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions