Monorepo for Tangled tangled.org
3

Configure Feed

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

appview/pages: use hx-load to lazily load commit statuses

Signed-off-by: oppiliappan <me@oppi.li>

author
oppiliappan
committer
Tangled
date (Jul 17, 2026, 12:51 PM +0300) commit 1d379a32 parent df9725a5 change-id vwuzrtrr
+38 -38
+9
appview/pages/templates/repo/fragments/commitPipelineStatuses.html
··· 1 + {{ define "repo/fragments/commitPipelineStatuses" }} 2 + {{ range $sha, $pipeline := .Pipelines }} 3 + {{ if gt (len $pipeline.Statuses) 0 }} 4 + <span id="commit-pipeline-{{ $sha }}" hx-swap-oob="outerHTML:#commit-pipeline-{{ $sha }}"> 5 + {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }} 6 + </span> 7 + {{ end }} 8 + {{ end }} 9 + {{ end }}
+16 -19
appview/pages/templates/repo/index.html
··· 224 224 </div> 225 225 226 226 <!-- commit info bar --> 227 - <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center flex-wrap"> 227 + <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center flex-wrap [&>:not(:empty)~:not(:empty)]:before:content-['·'] [&>:not(:empty)~:not(:empty)]:before:mx-1 [&>:not(:empty)~:not(:empty)]:before:select-none"> 228 228 {{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} 229 229 {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} 230 230 {{ if $verified }} ··· 240 240 {{ end }} 241 241 </a> 242 242 </span> 243 - <span 244 - class="mx-1 before:content-['·'] before:select-none" 245 - ></span> 246 243 {{ template "attribution" (list . $.EmailToDid) }} 247 - <div class="inline-block px-1 select-none after:content-['·']"></div> 248 244 {{ template "repo/fragments/time" .Committer.When }} 249 245 250 246 <!-- tags/branches --> 251 247 {{ $tagsForCommit := index $.TagMap .Hash.String }} 252 248 {{ if gt (len $tagsForCommit) 0 }} 253 - <div class="inline-block px-1 select-none after:content-['·']"></div> 254 - {{ end }} 255 - {{ range $tagsForCommit }} 256 - <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-[2px] inline-flex items-center"> 257 - {{ . }} 258 - </span> 259 - {{ end }} 260 - 261 - <!-- ci status --> 262 - {{ $pipeline := index $.Pipelines .Hash.String }} 263 - {{ if $pipeline }} 264 - {{ if gt (len $pipeline.Statuses) 0 }} 265 - <div class="inline-block px-1 select-none after:content-['·']"></div> 266 - {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }} 249 + <span class="flex items-center gap-1"> 250 + {{ range $tagsForCommit }} 251 + <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-[2px] inline-flex items-center"> 252 + {{ . }} 253 + </span> 267 254 {{ end }} 255 + </span> 268 256 {{ end }} 257 + <span id="commit-pipeline-{{ .Hash.String }}"></span> 269 258 </div> 270 259 </div> 271 260 {{ end }} 272 261 </div> 262 + {{ if and $.CommitsTrunc $.RepoInfo.Spindle }} 263 + <div 264 + class="hidden" 265 + hx-get="/{{ $.RepoInfo.FullName }}/commit-statuses?{{ range $.CommitsTrunc }}sha={{ .Hash.String }}&{{ end }}" 266 + hx-trigger="load" 267 + hx-swap="none" 268 + ></div> 269 + {{ end }} 273 270 </div> 274 271 {{ end }} 275 272
+12 -18
appview/pages/templates/repo/log.html
··· 72 72 73 73 <!-- ci status --> 74 74 <span class="text-xs"> 75 - {{ $pipeline := index $.Pipelines .Hash.String }} 76 - {{ if $pipeline }} 77 - {{ if gt (len $pipeline.Statuses) 0 }} 78 - {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }} 79 - {{ end }} 80 - {{ end }} 75 + <span id="commit-pipeline-{{ $commit.Hash.String }}"></span> 81 76 </span> 82 77 </div> 83 78 ··· 136 131 </div> 137 132 </div> 138 133 139 - <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center"> 134 + <div class="text-xs mt-2 text-gray-500 dark:text-gray-400 flex items-center [&>:not(:empty)~:not(:empty)]:before:content-['·'] [&>:not(:empty)~:not(:empty)]:before:mx-1 [&>:not(:empty)~:not(:empty)]:before:select-none"> 140 135 {{ $verified := $.VerifiedCommits.IsVerified $commit.Hash.String }} 141 136 {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} 142 137 {{ if $verified }} ··· 152 147 {{ end }} 153 148 </a> 154 149 </span> 155 - <span class="mx-2 before:content-['·'] before:select-none"></span> 156 150 {{ template "attribution" (list $commit $.EmailToDid) }} 157 - <div class="inline-block px-1 select-none after:content-['·']"></div> 158 151 <span>{{ template "repo/fragments/shortTime" $commit.Committer.When }}</span> 159 152 160 153 <!-- ci status --> 161 - {{ $pipeline := index $.Pipelines .Hash.String }} 162 - {{ if $pipeline }} 163 - {{ if gt (len $pipeline.Statuses) 0 }} 164 - <div class="inline-block px-1 select-none after:content-['·']"></div> 165 - <span class="text-sm"> 166 - {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }} 167 - </span> 168 - {{ end }} 169 - {{ end }} 154 + <span id="commit-pipeline-{{ $commit.Hash.String }}"></span> 170 155 </div> 171 156 </div> 172 157 {{ end }} 173 158 </div> 159 + 160 + {{ if and .Commits .RepoInfo.Spindle }} 161 + <div 162 + class="hidden" 163 + hx-get="/{{ .RepoInfo.FullName }}/commit-statuses?{{ range .Commits }}sha={{ .Hash.String }}&{{ end }}" 164 + hx-trigger="load" 165 + hx-swap="none" 166 + ></div> 167 + {{ end }} 174 168 </section> 175 169 176 170 {{ end }}
+1 -1
appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html
··· 21 21 {{ template "repo/pipelines/fragments/tooltip" $ }} 22 22 </div> 23 23 </div> 24 - {{ end }} 24 + {{ end }}