                :class  "noselect"
                :style  {:cursor "pointer"}
                :attr   {:title    (str (if open? "Close" "Open") " the pod bay doors, HAL")
-                        :on-click (rc/handler-fn
-                                    (swap! open? not)
-                                    (println "Clicked [arrow]"))}
+                        :on-click (rc/handler-fn (update-pod-field id :open? (not open?)))}
                :child  [rc/box
                         :margin "auto"
                         :child  [:span.arrow (if open? "▼" "▶")]]]


;; TODO: START ========== LOCAL DATA - REPLACE WITH SUBS AND EVENTS

(def *pods (r/atom [{:type :destroyed :layer "3" :path [:todo/blah]      :open? true :diff? true}
                    {:type :created   :layer "3" :path [:todo/completed] :open? true :diff? true}
                    {:type :re-run    :layer "3" :path [:todo/completed] :open? true :diff? true}
                    {:type :re-run    :layer "2" :path [:todo/blah]      :open? true :diff? true}
                    {:type :not-run   :layer "3" :path [:todo/blah]      :open? true :diff? true}]
                   #_[]))

(defn update-pod-field

  (let [f (fn [pod]
            (if (= id (:id pod))
              (do
                (println "Updated" field "in" (:id pod) "from" (get pod field) "to" new-val)
                (assoc pod field new-val))
              pod))]
    (reset! *pods (mapv f @*pods))))
