Skip to content

Refactor pull request view (2)#37428

Merged
wxiaoguang merged 2 commits intogo-gitea:mainfrom
wxiaoguang:refactor-pr-view-2
Apr 26, 2026
Merged

Refactor pull request view (2)#37428
wxiaoguang merged 2 commits intogo-gitea:mainfrom
wxiaoguang:refactor-pr-view-2

Conversation

@wxiaoguang
Copy link
Copy Markdown
Contributor

@wxiaoguang wxiaoguang commented Apr 26, 2026

Follow up #37380

Some code is moved to the place whether it should be.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 26, 2026
@wxiaoguang wxiaoguang added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 26, 2026
@wxiaoguang wxiaoguang force-pushed the refactor-pr-view-2 branch 2 times, most recently from d7999d1 to febb3e1 Compare April 26, 2026 07:57
@bircni
Copy link
Copy Markdown
Member

bircni commented Apr 26, 2026

when opening a PR currently the diff gets caluclated directly, can we cache that somehow?

@wxiaoguang
Copy link
Copy Markdown
Contributor Author

when opening a PR currently the diff gets caluclated directly, can we cache that somehow?

Not in this PR's scope. You can study the details independently.

@bircni
Copy link
Copy Markdown
Member

bircni commented Apr 26, 2026

when opening a PR currently the diff gets caluclated directly, can we cache that somehow?

Not in this PR's scope. You can study the details independently.

sure just stumbled over it as if the diff is large the diff command gitea is using takes kinda long

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 26, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor Author

wxiaoguang commented Apr 26, 2026

when opening a PR currently the diff gets caluclated directly, can we cache that somehow?

Not in this PR's scope. You can study the details independently.

sure just stumbled over it as if the diff is large the diff command gitea is using takes kinda long

It's a very big topic and there are a lot of details. For example: Allow Loading of Diffs that are too large (#17739) , improve performance of diffs (#32393) , etc .

And another factor is "diff highlight rendering", Chroma is also extremely slow.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 26, 2026
@wxiaoguang wxiaoguang added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 26, 2026
@wxiaoguang wxiaoguang enabled auto-merge (squash) April 26, 2026 13:34
@wxiaoguang wxiaoguang merged commit b3ed4cd into go-gitea:main Apr 26, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone Apr 26, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 26, 2026
@wxiaoguang wxiaoguang deleted the refactor-pr-view-2 branch April 26, 2026 14:14
silverwind added a commit to McMichalK/gitea that referenced this pull request Apr 26, 2026
* origin/main: (176 commits)
  Refactor pull request view (3) (go-gitea#37439)
  Update 1.26.1 changelog in main (go-gitea#37442)
  Make GetPossibleUserByID can handle deleted user (go-gitea#37430)
  Fix fetch action redirect (go-gitea#37437)
  Refactor integration test DecodeJSON calls to use generic return value (go-gitea#37432)
  Integrate renovate bot for all dependency updates (go-gitea#37050)
  Refactor pull request view (2) (go-gitea#37428)
  Use MarkLongPolling instead of hard-coded route path (go-gitea#37427)
  Optimize CI caches (go-gitea#37387)
  Update AGENTS.md (go-gitea#37420)
  Update Nix flake (go-gitea#37425)
  [skip ci] Updated translations via Crowdin
  remove excessive quote from terraform instructions (go-gitea#37424)
  Improve testing init, clean up webhook tests (go-gitea#37412)
  Fix color regressions, add `priority` color (go-gitea#37417)
  [skip ci] Updated translations via Crowdin
  Stabilize e2e logout propagation test (go-gitea#37403)
  refactor: serve site manifest via `/assets/site-manifest.json` endpoint (go-gitea#37405)
  feat(security): set X-Content-Type-Options: nosniff by default (go-gitea#37354)
  Refactor pull request view (1) (go-gitea#37380)
  ...

# Conflicts:
#	templates/repo/diff/box.tmpl
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 27, 2026
* main: (33 commits)
  refactor: use named `Permission` field in `Repository` struct instead of anonymous embedding (go-gitea#37441)
  Refactor pull request view (3) (go-gitea#37439)
  Update 1.26.1 changelog in main (go-gitea#37442)
  Make GetPossibleUserByID can handle deleted user (go-gitea#37430)
  Fix fetch action redirect (go-gitea#37437)
  Refactor integration test DecodeJSON calls to use generic return value (go-gitea#37432)
  Integrate renovate bot for all dependency updates (go-gitea#37050)
  Refactor pull request view (2) (go-gitea#37428)
  Use MarkLongPolling instead of hard-coded route path (go-gitea#37427)
  Optimize CI caches (go-gitea#37387)
  Update AGENTS.md (go-gitea#37420)
  Update Nix flake (go-gitea#37425)
  [skip ci] Updated translations via Crowdin
  remove excessive quote from terraform instructions (go-gitea#37424)
  Improve testing init, clean up webhook tests (go-gitea#37412)
  Fix color regressions, add `priority` color (go-gitea#37417)
  [skip ci] Updated translations via Crowdin
  Stabilize e2e logout propagation test (go-gitea#37403)
  refactor: serve site manifest via `/assets/site-manifest.json` endpoint (go-gitea#37405)
  feat(security): set X-Content-Type-Options: nosniff by default (go-gitea#37354)
  ...
silverwind added a commit to hanism01/gitea that referenced this pull request Apr 27, 2026
…-review-feedback

* origin/main: (144 commits)
  Add API endpoint to reply to pull request review comments (go-gitea#36683)
  Add CurrentURL template variable back (go-gitea#37444)
  refactor: use named `Permission` field in `Repository` struct instead of anonymous embedding (go-gitea#37441)
  Refactor pull request view (3) (go-gitea#37439)
  Update 1.26.1 changelog in main (go-gitea#37442)
  Make GetPossibleUserByID can handle deleted user (go-gitea#37430)
  Fix fetch action redirect (go-gitea#37437)
  Refactor integration test DecodeJSON calls to use generic return value (go-gitea#37432)
  Integrate renovate bot for all dependency updates (go-gitea#37050)
  Refactor pull request view (2) (go-gitea#37428)
  Use MarkLongPolling instead of hard-coded route path (go-gitea#37427)
  Optimize CI caches (go-gitea#37387)
  Update AGENTS.md (go-gitea#37420)
  Update Nix flake (go-gitea#37425)
  [skip ci] Updated translations via Crowdin
  remove excessive quote from terraform instructions (go-gitea#37424)
  Improve testing init, clean up webhook tests (go-gitea#37412)
  Fix color regressions, add `priority` color (go-gitea#37417)
  [skip ci] Updated translations via Crowdin
  Stabilize e2e logout propagation test (go-gitea#37403)
  ...

# Conflicts:
#	models/project/column.go
#	routers/web/repo/issue_page_meta.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants