From 73cb06db386ca4885e6466ab7a22e603b7ac801e Mon Sep 17 00:00:00 2001 From: Lewis Date: Mon, 23 Mar 2026 09:03:18 +0000 Subject: [PATCH] appview/pages: PR mark-as-reviewed btn Lewis: May this revision serve well! --- appview/pages/templates/repo/fragments/diff.html | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- appview/pages/templates/repo/pulls/pull.html | 3 +++ types/diff.go | 7 +------ 3 file(s) changed, 149 insertion(s)(+), 7 deletion(s)(-) diff --git a/appview/pages/templates/repo/fragments/diff.html b/appview/pages/templates/repo/fragments/diff.html --- a/appview/pages/templates/repo/fragments/diff.html +++ b/appview/pages/templates/repo/fragments/diff.html @@ -14,6 +14,7 @@ {{ block "diffLayout" . }} {{ end }} {{ template "fragments/resizable" }} {{ template "activeFileHighlight" }} {{ template "fragments/line-quote-button" }} + {{ template "reviewState" }} {{ end }} @@ -37,7 +38,7 @@ {{ $stat := $diff.Stats }} {{ $count := len $diff.ChangedFiles }} {{ template "repo/fragments/diffStatPill" $stat }} - + {{ if $root }} {{ if $root.IsInterdiff }} @@ -178,6 +179,21 @@ {{ end }} + @@ -305,3 +321,131 @@ updateActiveFile(); })(); {{ end }} + +{{ define "reviewState" }} + +{{ end }} diff --git a/appview/pages/templates/repo/pulls/pull.html b/appview/pages/templates/repo/pulls/pull.html --- a/appview/pages/templates/repo/pulls/pull.html +++ b/appview/pages/templates/repo/pulls/pull.html @@ -100,6 +100,9 @@ {{ end }} {{ define "contentAfter" }} + {{ if .IsInterdiff }} + + {{ end }} {{ template "repo/fragments/diff" (list .Diff .DiffOpts $) }} {{ end }} diff --git a/types/diff.go b/types/diff.go --- a/types/diff.go +++ b/types/diff.go @@ -84,12 +84,7 @@ func (d NiceDiff) FileTree() *filetree.FileTreeNode { fs := make([]string, len(d.Diff)) for i, s := range d.Diff { - n := s.Names() - if n.New == "" { - fs[i] = n.Old - } else { - fs[i] = n.New - } + fs[i] = s.Id() } return filetree.FileTree(fs) } -- tangled.sh