                        (apply (partial b/dropdown {:bs-style "primary" 
                                                    :title (or (:id deployment) 
                                                               "Deployments")})
-                              (for [[id info] deployments]
+                              (for [[id info] (reverse (sort-by (comp :created-at val) 
+                                                                deployments))]
                                 (b/menu-item {:key id
                                               :on-select (fn [_] 
                                                            ;(stop-tracking! id)
                                                            (start-tracking! id))} 
                                              id)))))))
 
-(defn entry-for-job? [job-id entry]
+(defn is-job-entry? [job-id entry]
   (if-let [entry-job-id (if (= (:fn entry) :submit-job)
                           (:id entry)
                           (:job-id entry))]
     (= entry-job-id job-id)))
 
-(defcomponent deployment-entries [{:keys [selected-job entries]} owner]
+(defcomponent deployment-entries [{:keys [selected-job entries message-id-max]} owner]
   (render [_]
-          ;(println "ENTRY INFO:" (count (map :message-id entries))  (count (set (map :message-id entries))))
-          (let [filtered-entries nil #_(filter (partial entry-for-job? selected-job) entries)] 
+          (let [num-displayed 100
+                start-id (max 0 (- (inc message-id-max) num-displayed))
+                displayed-msg-ids (range start-id (inc message-id-max))] 
             (table {:striped? true :bordered? true :condensed? true :hover? true}
                    (dom/thead
                      (dom/tr

(sente/start-chsk-router! ch-chsk event-handler)

(defn main []
  #_(om/root
    ankha/inspector
    app-state
    {:target (js/document.getElementById "ankha")})


(defcomponent job-info [{:keys [selected-job jobs]} owner]
  (render [_]
          (if-let [job (and selected-job jobs (jobs selected-job))]
            (dom/div 
              (dom/div (str (om/value job)))
              (if-let [catalog (:catalog job)]
                (om/build catalog-view catalog {}))))))

(defn msg-controller [type msg]
  (swap! app-state 
         (fn [state]
           (if-let [tracking-id (:tracking-id msg)] 
             (cond (= tracking-id (get-in state [:deployment :tracking-id]))
                   (case type
                     ;:deployment/replica
                     ;(assoc-in state [:deployment :replica] recv-msg)
                     :job/completed-task
                     (do (println "Task completed: " msg)
                         state)
                     :job/submitted-job 
                     (assoc-in state [:deployment :jobs (:id msg)] msg)
                     :job/entry
                     (update-in state [:deployment] (fn [deployment]
                                                      (-> deployment
                                                          (assoc :message-id-max (max (:message-id msg)
                                                                                      (:message-id-max deployment)))
                                                          (assoc-in [:entries (:message-id msg)] msg))))
                     state)
                   :else state)
             (if (= :deployment/listing type)
               (assoc-in state [:deployments] msg)
               state)))))

(defn event-handler [{:keys [event]}]
  (let [[msg-type msg] event]
