From d0acfc930f3d0ca8f918cdc443d0278dcdc7e0d0 Mon Sep 17 00:00:00 2001 From: Jes Olson Date: Wed, 04 Mar 2026 04:06:55 +0000 Subject: [PATCH] appview: highlight active file in PR filetree on scroll When reviewing a pull request with multiple files, the currently visible file is now highlighted (bolded) in the filetree sidebar. This makes it easier to track your position when scrolling through large diffs and lose track of the header of the file you're looking at. The highlight updates on scroll and also responds to clicks on filetree links. Signed-off-by: Jes Olson --- appview/pages/templates/repo/fragments/diff.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ appview/pages/templates/repo/fragments/fileTree.html | 2 +- 2 file(s) changed, 47 insertion(s)(+), 1 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 @@ -11,6 +11,7 @@ {{ template "diffTopbar" . }} {{ block "diffLayout" . }} {{ end }} {{ template "fragments/resizable" }} + {{ template "activeFileHighlight" }} {{ end }} {{ define "diffTopbar" }} @@ -226,6 +227,51 @@ } }); }); + }); + +{{ end }} + +{{ define "activeFileHighlight" }} + {{ end }} diff --git a/appview/pages/templates/repo/fragments/fileTree.html b/appview/pages/templates/repo/fragments/fileTree.html --- a/appview/pages/templates/repo/fragments/fileTree.html +++ b/appview/pages/templates/repo/fragments/fileTree.html @@ -16,7 +16,7 @@ {{ else if .Name }}
{{ i "file" "flex-shrink-0 size-4" }} - {{ .Name }} + {{ .Name }}
{{ else }} {{ range $child := .Children }} -- tangled.sh