diff --git a/appview/pages/url.go b/appview/pages/url.go
--- a/appview/pages/url.go
+++ b/appview/pages/url.go
@@ -65,7 +65,7 @@
if err != nil {
return "", fmt.Errorf("failed to make repo url: %w", err)
}
- return path.Join(repoUrl, "issues", strconv.FormatInt(issue.Id, 10)), nil
+ return path.Join(repoUrl, "issues", strconv.Itoa(issue.IssueId)), nil
}
func (p *Pages) MakePullUrl(ctx context.Context, uri syntax.ATURI, roundIdx int) (string, error) {
@@ -77,7 +77,7 @@
if err != nil {
return "", fmt.Errorf("failed to make repo url: %w", err)
}
- return path.Join(repoUrl, "pulls", strconv.Itoa(pull.ID), "rounds", strconv.Itoa(roundIdx)), nil
+ return path.Join(repoUrl, "pulls", strconv.Itoa(pull.PullId), "rounds", strconv.Itoa(roundIdx)), nil
}
func (p *Pages) makeRepoUrlInner(ctx context.Context, repo *models.Repo) (string, error) {
diff --git a/appview/state/comment.go b/appview/state/comment.go
--- a/appview/state/comment.go
+++ b/appview/state/comment.go
@@ -303,12 +303,11 @@
Comment: comment,
}); err != nil {
l.Error("failed to render pull comment fragment", "err", err)
- s.pages.HxRefresh(w)
+ } else {
+ w.Header().Set("Content-Type", "text/html")
+ w.Write(buf.Bytes())
return
}
- w.Header().Set("Content-Type", "text/html")
- w.Write(buf.Bytes())
- return
}
target, err := s.pages.MakeCommentUrl(ctx, comment.AtUri())
diff --git a/appview/pages/templates/repo/pulls/fragments/pullNewComment.html b/appview/pages/templates/repo/pulls/fragments/pullNewComment.html
--- a/appview/pages/templates/repo/pulls/fragments/pullNewComment.html
+++ b/appview/pages/templates/repo/pulls/fragments/pullNewComment.html
@@ -8,6 +8,7 @@
hx-target="#pull-comments-{{ .RoundNumber }}"
hx-swap="beforeend"
hx-disabled-elt="find button[type='submit']"
+ hx-on::after-request="if(event.detail.successful) htmx.ajax('GET', '/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .RoundNumber }}/actions', {target: '#actions-{{ .RoundNumber }}', swap: 'outerHTML'})"
>