Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview: fix comment redirect behavior

Signed-off-by: Seongmin Lee <git@boltless.me>

Seongmin Lee (Jun 30, 2026, 5:58 PM +0900) 9e1834f2 24b6a9c1

+6 -6
+1
appview/pages/templates/repo/pulls/fragments/pullNewComment.html
··· 8 8 hx-target="#pull-comments-{{ .RoundNumber }}" 9 9 hx-swap="beforeend" 10 10 hx-disabled-elt="find button[type='submit']" 11 + hx-on::after-request="if(event.detail.successful) htmx.ajax('GET', '/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions', {target: '#actions-{{ .RoundNumber }}', swap: 'outerHTML'})" 11 12 > 12 13 <input name="subject-uri" type="hidden" value="{{ .Pull.AtUri }}"> 13 14 <input name="pull-round-idx" type="hidden" value="{{ .RoundNumber }}">
+2 -2
appview/pages/url.go
··· 65 65 if err != nil { 66 66 return "", fmt.Errorf("failed to make repo url: %w", err) 67 67 } 68 - return path.Join(repoUrl, "issues", strconv.FormatInt(issue.Id, 10)), nil 68 + return path.Join(repoUrl, "issues", strconv.Itoa(issue.IssueId)), nil 69 69 } 70 70 71 71 func (p *Pages) MakePullUrl(ctx context.Context, uri syntax.ATURI, roundIdx int) (string, error) { ··· 77 77 if err != nil { 78 78 return "", fmt.Errorf("failed to make repo url: %w", err) 79 79 } 80 - return path.Join(repoUrl, "pulls", strconv.Itoa(pull.ID), "rounds", strconv.Itoa(roundIdx)), nil 80 + return path.Join(repoUrl, "pulls", strconv.Itoa(pull.PullId), "rounds", strconv.Itoa(roundIdx)), nil 81 81 } 82 82 83 83 func (p *Pages) makeRepoUrlInner(ctx context.Context, repo *models.Repo) (string, error) {
+3 -4
appview/state/comment.go
··· 303 303 Comment: comment, 304 304 }); err != nil { 305 305 l.Error("failed to render pull comment fragment", "err", err) 306 - s.pages.HxRefresh(w) 306 + } else { 307 + w.Header().Set("Content-Type", "text/html") 308 + w.Write(buf.Bytes()) 307 309 return 308 310 } 309 - w.Header().Set("Content-Type", "text/html") 310 - w.Write(buf.Bytes()) 311 - return 312 311 } 313 312 314 313 target, err := s.pages.MakeCommentUrl(ctx, comment.AtUri())