A vibe coded tangled fork which supports pijul.
1{{ define "repo/pulls/fragments/pullStack" }}
2 <div class="grid grid-cols-1 rounded border border-gray-200 dark:border-gray-700 divide-y divide-gray-200 dark:divide-gray-700">
3 {{ range $pull := .Stack }}
4 {{ $isCurrent := false }}
5 {{ with $.Pull }}
6 {{ $isCurrent = eq $pull.PullId $.Pull.PullId }}
7 {{ end }}
8 <a href="/{{ $.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}" class="no-underline hover:no-underline hover:bg-gray-100 hover:dark:bg-gray-700">
9 <div class="flex gap-2 items-center px-2 {{ if $isCurrent }}bg-gray-100 dark:bg-gray-700{{ end }}">
10 {{ if $isCurrent }}
11 {{ i "arrow-right" "w-4 h-4" }}
12 {{ end }}
13 <div class="{{ if not $isCurrent }} ml-6 {{ end }} w-full py-2">
14 {{ block "summarizedHeader" $pull }} {{ end }}
15 </div>
16 </div>
17 </a>
18 {{ end }}
19 </div>
20{{ end }}
21
22{{ define "summarizedHeader" }}
23 <div class="flex text-sm items-center justify-between w-full">
24 <div class="flex items-center gap-2">
25 {{ block "summarizedPullState" . }} {{ end }}
26 <span>
27 <span class="text-gray-500 dark:text-gray-400">#{{ .PullId }}</span>
28 {{ .Title }}
29 </span>
30 </div>
31
32 <div>
33 {{ $latestRound := .LastRoundNumber }}
34 {{ $lastSubmission := index .Submissions $latestRound }}
35 {{ $commentCount := len $lastSubmission.Comments }}
36 <span>
37 <div class="inline-flex items-center gap-2">
38 {{ $commentCount }}
39 comment{{if ne $commentCount 1}}s{{end}}
40 </div>
41 </span>
42 <span class="mx-2 before:content-['·'] before:select-none"></span>
43 <span>round <span class="font-mono">#{{ $latestRound }}</span></span>
44 </div>
45 </div>
46{{ end }}
47
48{{ define "summarizedPullState" }}
49 {{ $fgColor := "text-gray-600 dark:text-gray-300" }}
50 {{ $icon := "ban" }}
51
52 {{ if .State.IsOpen }}
53 {{ $fgColor = "text-green-600 dark:text-green-500" }}
54 {{ $icon = "git-pull-request" }}
55 {{ else if .State.IsMerged }}
56 {{ $fgColor = "text-purple-600 dark:text-purple-500" }}
57 {{ $icon = "git-merge" }}
58 {{ end }}
59
60 {{ $style := printf "w-4 h-4 %s" $fgColor }}
61
62 {{ i $icon $style }}
63{{ end }}