devapp: make it easier to see only release-blocker issues

Fixes #32418

Change-Id: I834858b76c08c1946fa897a011b25ea381619dba
Reviewed-on: https://go-review.googlesource.com/c/build/+/182217
Reviewed-by: Andrew Bonventre <andybons@golang.org>
diff --git a/devapp/release.go b/devapp/release.go
index acde6ce..bf575bc 100644
--- a/devapp/release.go
+++ b/devapp/release.go
@@ -100,11 +100,25 @@
 	return i.Issue.HasLabel("release-blocker")
 }
 
+func (i *item) CurrentBlocker() bool {
+	return i.Issue.Milestone.Title == curMilestoneTitle && i.ReleaseBlocker()
+}
+
+func (i *item) EarlyInCycle() bool {
+	return !i.ReleaseBlocker() && i.Issue.HasLabel("early-in-cycle")
+}
+
 type itemsBySummary []item
 
 func (x itemsBySummary) Len() int      { return len(x) }
 func (x itemsBySummary) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
 func (x itemsBySummary) Less(i, j int) bool {
+	// Sort release-blocker issues to the front
+	ri := x[i].Issue != nil && x[i].Issue.HasLabel("release-blocker")
+	rj := x[j].Issue != nil && x[j].Issue.HasLabel("release-blocker")
+	if ri != rj {
+		return ri
+	}
 	// Sort performance issues to the end.
 	pi := x[i].Issue != nil && x[i].Issue.HasLabel("Performance")
 	pj := x[j].Issue != nil && x[j].Issue.HasLabel("Performance")
diff --git a/devapp/templates/release.tmpl b/devapp/templates/release.tmpl
index 269785b..7cfc02b 100644
--- a/devapp/templates/release.tmpl
+++ b/devapp/templates/release.tmpl
@@ -44,14 +44,16 @@
 .Item {
   display: flex;
 }
-.Item-blocker:before {
-  content: '★';
-  position: absolute;
-}
 .Item-num {
-  margin-left: 4ch;
+  margin-left: 1ch;
   min-width: 12ch;
 }
+.Mark {
+  width: 3ch;
+  height: 1ch;
+  text-align: center;
+  vertical-align: middle;
+}
 .DirTitle {
   margin: 1em 0 .25em;
 }
@@ -80,7 +82,16 @@
 	{{if .FirstPerformance}}<h5 class="Performance-separator">performance</h5>{{end}}
         {{$i := .Issue}}
         {{if $i}}
-          <div class="Item{{if .ReleaseBlocker}} Item-blocker{{end}}">
+          <div class="Item">
+            {{if .CurrentBlocker}}
+              <div class="Mark" title="{{.Issue.Milestone.Title}} release blocker">★</div>
+            {{else if .ReleaseBlocker}}
+              <div class="Mark" title="Release blocker">✩</div>
+            {{else if .EarlyInCycle}}
+              <div class="Mark" title="Early In Cycle">&#x23F1;&#xE0100;</div>
+            {{else}}
+              <div class="Mark"> </div>
+            {{end}}
             <a class="Item-num" href="https://golang.org/issue/{{.Issue.Number}}" target="_blank">#{{.Issue.Number}}</a>
             <span class="Item-title">{{.Issue.Title}}</span>
           </div>
@@ -88,6 +99,7 @@
         {{range .CLs}}
           {{if not .Closed}}
             <div class="Item">
+              <div class="Mark"></div>
               <span class="Item-num">
                 {{if $i}}⤷{{end}} <a href="{{.ReviewURL}}" target="_blank">CL {{.Number}}</a>
               </span>