     ;; TODO: we may not even use this
     (reset! events-added? true)))
 
+(defn attach-state-to-build
+  "Attach state to project-build map, and prune out unused keys"
+  [build]
+  (let [keep-keys [:id
+                   :source-paths
+                   :compiler]]
+    (-> initial-project-build-state
+        (merge (select-keys build keep-keys)))))
+
+(defn attach-state-to-proj
+  "Attach state to project map, and prune out unused keys"
+  [project]
+  (let [keep-keys [:filename
+                   :name
+                   :version
+                   :license
+                   :dependencies
+                   :plugins]
+        builds (->> project :cljsbuild :builds (mapv attach-state-to-build))]
+    (-> initial-project-state
+        (merge (select-keys project keep-keys))
+        (assoc :builds builds))))
+
+(defn init-projs!
+  [projects]
+  (js/console.log (pr-str projects))
+  (let [projects2 (map attach-state-to-proj projects)
+        filenames (mapv :filename projects2)
+        project-map (assoc (zipmap filenames projects2)
+                           :order filenames)]
+    (swap! state assoc :projects project-map)))
+
 (defn init! [projs]
-  (js/console.log (pr-str projs))
-  (add-events!)
-  ;; trigger the initial render
-  (swap! state identity))
+  (init-projs! projs)
+  (js/console.log (pr-str @state))
+  (add-events!))

    (map
      (fn [prj-key]
        (swap! state assoc-in [:projects prj-key :compile-menu-showing?] false))
      (-> @state :projects keys))))

(defn- click-compile-btn [prj-key]
  (let [prj (get-in @state [:projects prj-key])

   the last compile."
  []
  (let [n (now)
        prj-keys (-> @state :projects :order)]
    (doall
      (map
        (fn [prj-key]
