 (defrecord WatchPageChanges []
   rs/WatchEvent
   (-apply-watch [_ state s]
-    (println "WatchPageChanges")
     (let [stoper (->> (rx/filter clean-page-history? s)
                       (rx/take 1))]
       (->> (rx/filter udp/page-synced? s)

(defrecord ApplySelectedHistory [id]
  rs/UpdateEvent
  (-apply-update [_ state]
    (println "ApplySelectedHistory" id)
    (-> state
        (update-in [:pages-by-id id] dissoc :history)
        (assoc-in [:workspace :history :selected] nil)))

(defrecord CleanPageHistory []
  rs/UpdateEvent
  (-apply-update [_ state]
    (assoc-in state [:workspace :history] {})))

(defn clean-page-history
