Repository navigation
web: remove the server-rendered page layer - #8539
Merged
Merged
Conversation
4 tasks done
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
2 times, most recently
from
November 14, 2026 05:43
89b632d to
78c74f2
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
3 times, most recently
from
November 14, 2026 13:23
f6e85f6 to
e22fd00
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 14, 2026 16:03
e22fd00 to
782e3e1
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
4 times, most recently
from
November 14, 2026 19:00
aeb4e3e to
dad12d2
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 14, 2026 19:23
dad12d2 to
2719ecb
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
5 times, most recently
from
November 14, 2026 21:47
f77d1d1 to
70661f5
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
3 times, most recently
from
November 14, 2026 23:00
69eb0e4 to
dff43bb
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 14, 2026 23:31
dff43bb to
86f22c8
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 15, 2026 13:45
b0d3a69 to
722378b
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
4 times, most recently
from
November 15, 2026 22:45
457dc02 to
99c3dc6
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
3 times, most recently
from
November 16, 2026 02:24
ffc7985 to
a69bb1a
Compare
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 16, 2026 03:07
a69bb1a to
23dfe99
Compare
4 tasks done
unknwon
marked this pull request as ready for review
November 16, 2026 20:36
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 16, 2026 20:45
23dfe99 to
16e605e
Compare
unknwon
added a commit
that referenced
this pull request
Nov 16, 2026
unknwon
added a commit
that referenced
this pull request
Nov 16, 2026
The sidebar of the repository home shows the newest published release that is not a pre-release, with a "Latest" badge and its date, like GitHub, or the newest tag when there is none, and links to the rest.
unknwon
force-pushed
the
ui-cleanup-react-flamego
branch
from
November 16, 2026 21:48
f5b6568 to
70b16bd
Compare
This branch was successfully deployed
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
Every page is now rendered by the React app, so this removes the server-rendered page layer that was left behind and cleans up the router.
serveWebhandler (route.Homeis gone), and the middleware that only setc.Data["PageIs…"]for templates is removed. The route-specific checks, e.g., two-factor state, webhook types and admin lookups, stay as they were.POST /{user}/action/{action}(follow and unfollow),POST /{owner}/{repo}/action/{action}(watch, star and similar) andPOST /{owner}/{repo}/branches/delete/*. The React pages use/api/web/*for these.internal/context: removed theCacheandFlashfields, the template helpers (Title,PageIs,Require*,FormErr,HasValue,HTML,Success,RenderWithErrand others), everyc.Data[...]write in the contexter, repository and organization middleware, and the notice banner loader.HasErrorandGetErrMsgstay because API v1 uses them.c.JSONandc.PlainText.internal/template.FuncMap(with its test) and the template-only helpers ininternal/templateandinternal/toolare removed. Mail templates are untouched.internal/route/home.go,internal/route/repo/branch.go, the unuseddev.TemplatePreviewhandler,templates/base,templates/org,templates/repo,public/js,public/css,public/less, and the jQuery, Semantic UI, font-awesome, octicons, dropzone, highlight.js, mermaid and emoji assets.publickeepsavatar_default.png, the favicon, the webhook icons and the dompurify, marked, notebookjs and pdf.js plugins the React app loads. The LibreJS page lists only those.go-macaron/cacheand its Redis adapter are gone (go mod tidy).repo.release.latest,repo.release.n_more_releaseandrepo.release.n_more_releases.Behavior changes from legacy
custom/notice/banner.mdis no longer shown. Only the removed templates rendered it./js/gogs.js, answer 404.custom/templatesare no longer read. Mail template overrides still work.Screenshots
Dashboard
Repository home
Repository home, dark
Pull request
Branches
User settings
Site administration, as an admin
Not found
375px: repository home (dark) and dashboard
Latest release in the sidebar, light, dark, and with tags only
Checklist
Test plan
go build ./...,moon run gogs:lint(0 issues) andgo testfor./cmd/...,internal/context,internal/route/...,internal/tool,internal/emailandtemplatespass. No files underweb/change.-tags prodbuild with SQLite. Every page route returns the app (200), and the dashboard, a repository, a pull request, user settings, site administration and the 404 page render.git cloneover HTTP,/healthcheck, avatars, plugins and issue and release attachments work./adminanswers 403 for a non-admin as before, and the removed routes and assets answer 404./{user}.keysanswers 404, the same as onmain, because the user middleware looks up a user named{user}.keys.main, with a-tags prodbuild. log: replace clog with charmlog and logx #8529 (logx), web: search repository branches and add GitHub-style branch tabs #8590 (branch tabs) and web: show community files in tabs below the file list #8615 landed since, so the contexter andRepoAssignmenttake the logger, the/branches/yours,/activeand/staleroutes stay (onserveWeb), andToUTF8WithErrandActionContent2Commitskeep their logger.go mod tidyonly dropsgo-macaron/cacheand Redis. As alice, 28 page routes return the app (200), including the pull request, compare, branch tabs, Git hooks, settings and admin pages, and an unknown page returns 404.POST /alice/action/follow,POST /alice/alpha/action/star,/js/gogs.jsand/css/gogs.cssreturn 404./healthcheck,/api/v1/repos/alice/alpha(JSON), a zip archive,git cloneover HTTP, an issue attachment and the dompurify plugin return 200. The pages render with no failed resource requests at 1280, in dark mode and at 375, where nothing scrolls sideways.v1.0.0,v1.1.0andv2.0.0, the sidebar showsv2.0.0with no badge and "+ 2 releases". After publishing "Alpha 1.1" onv1.1.0, it shows "Alpha 1.1" with "Latest" and its date. A newer pre-release "Alpha 2.0 beta" onv2.0.0leaves "Alpha 1.1" as the latest. A repository without tags still shows "No releases published". Checked in dark mode.