Repository navigation
web: migrate the repository commit history pages to React - #8533
Merged
Merged
Conversation
3 of 4 tasks
unknwon
force-pushed
the
commits-react-flamego
branch
from
November 13, 2026 15:59
3c42cd8 to
61cf579
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
2 times, most recently
from
November 14, 2026 07:09
64d3f74 to
7932f5e
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
3 times, most recently
from
November 14, 2026 16:03
abfb9b4 to
dae0dbe
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
6 times, most recently
from
November 14, 2026 19:34
e06a86b to
d5e08b3
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
2 times, most recently
from
November 14, 2026 20:21
4448ad9 to
7848a42
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
3 times, most recently
from
November 14, 2026 22:10
e3932b5 to
f690a14
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
4 times, most recently
from
November 15, 2026 00:23
e2fd21a to
f3a6d38
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
from
November 15, 2026 02:17
56a68d0 to
a91e6c9
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
7 times, most recently
from
November 15, 2026 05:34
94fcf64 to
cafe8b7
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
4 times, most recently
from
November 15, 2026 22:18
bba2b5b to
fbfd843
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
from
November 15, 2026 22:45
fbfd843 to
80c7670
Compare
unknwon
force-pushed
the
commits-react-flamego
branch
3 times, most recently
from
November 16, 2026 02:24
f682a2a to
1280650
Compare
unknwon
marked this pull request as ready for review
November 16, 2026 02:57
unknwon
force-pushed
the
commits-react-flamego
branch
from
November 16, 2026 03:07
1280650 to
e16551a
Compare
The commit history of a branch, a tag or a commit, the history of a file or
a directory, and the search of commit messages are now a React page backed
by /api/web/{owner}/{repo}/commits, with a picker for branches and tags.
unknwon
force-pushed
the
commits-react-flamego
branch
from
November 16, 2026 03:40
e16551a to
b470e0a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the pull request
Migrates the repository commit history to React: the history of a ref (
/{owner}/{repo}/commits/{ref}), of a file or directory (/commits/{ref}/{path}), and the search of commit messages (/commits/{ref}/search?q=). They are backed byGET /api/web/{owner}/{repo}/commits/{ref}/{path}.RefPickeris a new popover with a filter and tabs for branches and tags. Switching keeps the path or the search. The code page can reuse it.?page=. Search lists every match, like legacy.RefCommits,Commits,SearchCommitsandFileHistoryhandlers andrepo/commits.tmpl. The commit-history branches ofcommits_table.tmplandbranch_dropdown.tmplare gone too. The compare and pull request pages still use both templates.repo.tag,commits.history_for,commits.committedandcommits.no_commits.Behavior changes from legacy
pageSizeis capped at 100.Screenshots
Commit history of a branch
Branch and tag picker
File history, dark
Searching commit messages
Older page
Checklist
Test plan
go test ./cmd/gogs/internal/web/ ./internal/route/...passes, andTestRequireViewAccesscovers the new endpoint.moon run gogs:lintandmoon run web:lintreport 0 issues.-tags prodbuild with SQLite. Seed: alice owns the publicwidgets, the emptyemptyand the privatesecret. carol has no access.master?page=2&pageSize=3,feature/login(a branch with a slash), a tag, a short SHA withREADME.md, andmaster/docs/draftsreturn the right commits.master/search?q=readmereturns the two matching commits. A missing ref gets 404. Signed-out visitors and carol get 404 onsecret, and alice gets 404 onempty. A message with#1and<img onerror>comes back with an issue link and the HTML escaped.feature/loginand switched to it. Switched to a tag while searching and kept the search. Opened the history ofdocs/drafts/notes.txtand checked the breadcrumb links. Searched for "readme". With 36 commits, went to the older page and back. No sideways scroll at 375.alice/alpharebased onmain, with 45 commits, a merge offeature/search, tagsv1.0.0andv1.1.0, and issue Register/delete users #1:mainshows 30 commits grouped by day, and Older shows the other 15 at?page=2, matchinggit rev-list --count. Everyfixes #1links to the issue, and the merge commit is muted.v1.0.0opens its history.src/mod3.golists 8, the same asgit log. The file history breadcrumb linksalphaandsrc. A 7-character SHA works as the ref.