   [{:keys [show-insights? chartable-builds] :as project}]
   (let [outcome (some->> chartable-builds
                          (map :outcome)
-                         (filter #{"success" "failed"})
-                         last)]
-    (match [show-insights? outcome]
-           [true "success"] :success
-           [true "failed"] :failed
-           :else :other)))
+                         reverse
+                         (filter pass-fail-outcomes)
+                         first)]
+    (if-let [result (and show-insights?
+                         (-> outcome
+                             pass-fail-outcomes
+                             keyword))]
+      result
+      :other)))
 
 (defn project-latest-build-time [project]
   (let [start-time (-> project

(ns frontend.components.insights
  (:require [cljs.core.async :as async :refer [>! <! alts! chan sliding-buffer close!]]
            [cljs.core.match :refer-macros [match]]
            [clojure.string :as string]
            [frontend.async :refer [raise!]]
            [frontend.analytics :as analytics]

                                             :owner owner
                                             :properties {:build-url (unexterned-prop % "build_url")}})})
        (.select "rect.bar")
        (.attr #js {"class" #(str "bar " (-> %
                                             (unexterned-prop "outcome")
                                             insights-outcome-mapping))
                    "y" #(y-pos-scale (unexterned-prop % "build_time_millis"))
                    "x" #(x-scale (unexterned-prop % "build_num"))
                    "width" (.rangeBand x-scale)
