Conversation
fc6e6dd to
31b5702
Compare
b12ca80 to
acec5f3
Compare
There was a problem hiding this comment.
Pull request overview
This PR applies a set of targeted fixes for the 1.26 line, focusing on preventing frontend JS errors from truncated markup rendering, avoiding script-scope conflicts in the PR merge box, and refactoring the issue comment creation flow to avoid incorrect/mixed responses.
Changes:
- Skip initializing markup features for truncated markup blocks (e.g. dashboard activity feed) while clearing backend “loading” state.
- Wrap the pull merge box inline module script to avoid duplicate top-level declarations.
- Refactor
NewCommentto remove the problematic deferred response write and tighten empty-comment validation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| web_src/js/markup/content.ts | Skips markup feature initialization for .truncated-markup and clears .is-loading. |
| templates/user/dashboard/feeds.tmpl | Marks dashboard feed comment markup as truncated via truncated-markup class. |
| templates/repo/issue/view_content/pull_merge_box.tmpl | Wraps inline module script in an IIFE to avoid duplicate declarations. |
| routers/web/repo/issue_comment.go | Refactors comment creation + close/reopen handling and redirect response flow. |
| options/locale/locale_en-US.json | Adds a new i18n key for empty comment validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Seems ok, we can close the 2 (?) WIP PRs for that with that fix. I discontinued mine because the ask had gotten too complex. Or maybe just keep the simple approach of ommitting code blocks (my initial approach). |
Co-authored-by: silverwind <[email protected]> Signed-off-by: wxiaoguang <[email protected]>
My thoughts about the related PRs:
|
|
* main: Fix RPM Registry 404 when package name contains 'package' (go-gitea#37087) Improve actions notifier for `workflow_run` (go-gitea#37088) Refactor code render and render control chars (go-gitea#37078) Fix various problems (go-gitea#37077) [skip ci] Updated translations via Crowdin Support legacy run/job index-based URLs and refactor migration 326 (go-gitea#37008) Fix a bug when forking a repository in an organization (go-gitea#36950)
|
So what is the fix for the frontpage? Still "Don't process markup contents on user's home activity feed"? I think it's bad to show unprocessed markup. I imagine we need a |
Yes, no cut-off code blocks, math blocks, inline math, inline code. that makes no sense when being cut off in the middle. Only cut off in the middle inside plain text. |

Quick fix for 1.26. Complex change is not in this PR's scope. Related to existing PRs which are still WIP or have various problems:
constcauses js error in global scopeDiff with ignoring spaces: https://github.com/go-gitea/gitea/pull/37077/files?diff=unified&w=1