Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments for PR are in the wrong spot on the main page. #13683

Closed
1 of 6 tasks
iarepandemonium opened this issue Nov 23, 2020 · 3 comments · Fixed by #14002
Closed
1 of 6 tasks

Comments for PR are in the wrong spot on the main page. #13683

iarepandemonium opened this issue Nov 23, 2020 · 3 comments · Fixed by #14002
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@iarepandemonium
Copy link

iarepandemonium commented Nov 23, 2020

  • Gitea version (or commit ref): Gitea Version: 1.14.0+dev-208-g6280af032
  • Git version: 2.29.0
  • Operating system: linux 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

When the page is shown, the comments are in the wrong location. On the main page they are in the wrong spot, but where i commented on them in the actual diff its in the right spot.

Screenshots

image

image

@6543 6543 added type/bug topic/ui Change the appearance of the Gitea UI labels Nov 23, 2020
@afocus
Copy link

afocus commented Nov 25, 2020

1.13 has the same problem

@jpraet
Copy link
Member

jpraet commented Dec 3, 2020

Also running into this issue after upgrading to 1.13.0. On the conversation overview page some comments are in the wrong location, or have no code context showing at all. On the actual files diff page the comments are on the correct locations.

I can't reproduce my particular example on https://try.gitea.io because it is happening for a file larger than 1000 lines (I have custom value for MAX_GIT_DIFF_LINES = 10000).

@jpraet
Copy link
Member

jpraet commented Dec 5, 2020

It's not just a UI bug, the diff snippet that is listed on the overview page for these review comments is also incorrect in the database.

I think it may be related to this PR: https://github.com/go-gitea/gitea/pull/13448/files#diff-db20b9154b0af934aaf3b3fea8463c4e597562b7f75aa0ae70164fc55383454dR178

The GetRepoRawDiffForFile used to be called with the headCommitID, now it is called with the commitID from the blame for the commented line.

lafriks pushed a commit that referenced this issue Dec 16, 2020
Fixes #13683.

The diff snippet that provides context for a code review comment on the pull request timeline page used to be calculated based on the headCommitID. But in 1.13, with PR #13448, this changed to the commitID from the blame for the commented line, which seems to cause these incorrect review comment diff snippets.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants