Can I access the review approval+reject+comment panel without waiting for a long diff to load? #3449

Closed
opened 2025-11-02 05:13:14 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @yanOnGithub on GitHub (Jun 10, 2019).

  • Gitea version (or commit ref): 1.8.2
  • Git version: 2.x
  • Operating system: windows 2012
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I often receive pull requests consist of 1000 lines changed scattered in 70 files. The diff takes a while to load. The approval+reject+comment panel is inaccessible before the diff is 100% loaded in the browser. I normally do code review with custom scripts outside Gitea.

Screenshots

Originally created by @yanOnGithub on GitHub (Jun 10, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8.2 - Git version: 2.x - Operating system: windows 2012 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description I often receive pull requests consist of 1000 lines changed scattered in 70 files. The diff takes a while to load. The approval+reject+comment panel is inaccessible before the diff is 100% loaded in the browser. I normally do code review with custom scripts outside Gitea. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/proposaltype/enhancement labels 2025-11-02 05:13:14 -06:00
Author
Owner

@yanOnGithub commented on GitHub (Jun 10, 2019):

If the gitea diff does not finish loading in a few minutes, I normally merge in CLI on client side, then push to the develop branch from CLI. The approval is bypassed. The PR is merged.

Rejection cannot be done in CLI.

@yanOnGithub commented on GitHub (Jun 10, 2019): If the gitea diff does not finish loading in a few minutes, I normally merge in CLI on client side, then push to the develop branch from CLI. The approval is bypassed. The PR is merged. Rejection cannot be done in CLI.
Author
Owner

@yanOnGithub commented on GitHub (Jun 11, 2019):

The diff may be 100 pages long. The html source is 170,000 lines long. The review button is still loading and inaccessible.
70 changed files with 5701 additions and 3125 deletions

Picture1

@yanOnGithub commented on GitHub (Jun 11, 2019): The diff may be 100 pages long. The html source is 170,000 lines long. The review button is still loading and inaccessible. 70 changed files with 5701 additions and 3125 deletions ![Picture1](https://user-images.githubusercontent.com/25423046/59236929-c3065d00-8c2a-11e9-91c2-dde7b12f3c07.png)
Author
Owner

@yanOnGithub commented on GitHub (Jun 26, 2019):

Reducing these numbers in the config file probably helps:

MAX_GIT_DIFF_LINES
MAX_GIT_DIFF_LINE_CHARACTERS
MAX_GIT_DIFF_FILES

@yanOnGithub commented on GitHub (Jun 26, 2019): Reducing these numbers in the config file probably helps: MAX_GIT_DIFF_LINES MAX_GIT_DIFF_LINE_CHARACTERS MAX_GIT_DIFF_FILES
Author
Owner

@zeripath commented on GitHub (Jun 26, 2019):

Hi @yanOnGithub I think we do need to look at this properly. I suspect that we need to make the diff page do some Ajax requests rather than do it all in one go.

@zeripath commented on GitHub (Jun 26, 2019): Hi @yanOnGithub I think we do need to look at this properly. I suspect that we need to make the diff page do some Ajax requests rather than do it all in one go.
Author
Owner

@yanOnGithub commented on GitHub (Jun 27, 2019):

I think @zeripath probably want to increase the capacity of the diff page. Consider something like midnight commander 2-panel interface. List of files on the left, and a diff of the selected file on the right. Consider supporting infinite scrolling on the diff panel. Humans TLDR and a way to locate something is needed.

3-panel design can be "directory tree" + "files in selected directory" + "diff of selected file"

Dumping the full diff of all changed files can overflow the browser. In the current design, some interactivity happens on each line. A large amount of DOM node or html source may be there to support the interactivity.

MAX_GIT_DIFF_LINES
MAX_GIT_DIFF_LINE_CHARACTERS
MAX_GIT_DIFF_FILES

Limiting these 3 config variables allowed the reviewer to click the approve and reject buttons. I am running git diff $mergeBase..$featureHead outside the browser anyway. A pull request with 180 MB files changed is looming. The PR comes with both text and binary files. I need the text file diffs for code review. Binary files are not analyzed in my code review.

Consider re-opening this issue for feature enhancement.

@yanOnGithub commented on GitHub (Jun 27, 2019): I think @zeripath probably want to increase the capacity of the diff page. Consider something like midnight commander 2-panel interface. List of files on the left, and a diff of the selected file on the right. Consider supporting infinite scrolling on the diff panel. Humans TLDR and a way to locate something is needed. 3-panel design can be "directory tree" + "files in selected directory" + "diff of selected file" Dumping the full diff of all changed files can overflow the browser. In the current design, some interactivity happens on each line. A large amount of DOM node or html source may be there to support the interactivity. MAX_GIT_DIFF_LINES MAX_GIT_DIFF_LINE_CHARACTERS MAX_GIT_DIFF_FILES Limiting these 3 config variables allowed the reviewer to click the approve and reject buttons. I am running ```git diff $mergeBase..$featureHead``` outside the browser anyway. A pull request with 180 MB files changed is looming. The PR comes with both text and binary files. I need the text file diffs for code review. Binary files are not analyzed in my code review. Consider re-opening this issue for feature enhancement.
Author
Owner

@yanOnGithub commented on GitHub (Jun 27, 2019):

top and bottom panel design would allow long paths and lines

image

@yanOnGithub commented on GitHub (Jun 27, 2019): top and bottom panel design would allow long paths and lines ![image](https://user-images.githubusercontent.com/25423046/60307679-3e307880-9978-11e9-81c9-63bff0d268ad.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3449