{{ define "repo/pulls/fragments/summarizedPullHeader" }}
  {{ $pull := index . 0 }}
  {{ $pipeline := index . 1 }}
  {{ $repoInfo := index . 2 }}
  {{ with $pull }}
    <div class="flex text-sm items-center justify-between w-full">
      <div class="flex items-center gap-2 min-w-0 flex-1 pr-2">
        <div class="flex-shrink-0">
          {{ template "repo/pulls/fragments/summarizedPullState" .State }}
        </div>
        <span class="truncate text-sm text-gray-800 dark:text-gray-200">
          <span class="text-gray-500 dark:text-gray-400">#{{ .PullId }}</span>
          {{ .Title | description }}
        </span>
      </div>

      <div class="flex-shrink-0 flex items-center gap-2">
        {{ $latestRound := .LastRoundNumber }}
        {{ $commentCount := .TotalComments }}
        <span id="pipeline-status-{{ .LatestSha }}" class="contents">{{ if and $pipeline $pipeline.Id }}{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $repoInfo "Pipeline" $pipeline) }}{{ end }}</span>
        <span>
          <div class="inline-flex items-center gap-1">
            {{ i "message-square" "w-3 h-3 md:hidden" }}
            {{ $commentCount }}
            <span class="hidden md:inline">Comment{{if ne $commentCount 1}}s{{end}}</span>
          </div>
        </span>
        <span class="before:content-['·'] before:select-none text-gray-500 dark:text-gray-400"></span>
        <span>
          <span class="hidden md:inline">Round</span>
          <span class="font-mono">#{{ $latestRound }}</span>
        </span>
      </div>
    </div>
  {{ end }}
{{ end }}

