                      (swap! state assoc :error status-text)))}))})
 
 
-(defn- render-side-bar [state refs config editing? props]
+(defn- render-side-bar [{:keys [state refs config editing? props restore-on-cancel]}]
   [:div {:style {:width 290 :float "left"}}
    [:div {:ref "sidebar"}]
    (style/create-unselectable :div {:style {:position (when-not (:sidebar-visible? @state) "fixed")
                                             :top (when-not (:sidebar-visible? @state) 4)
                                             :width 290}}
      (let [locked? (:locked? @state)
-           can-edit? (access-greater-than? (:access-level props) "READER")]
+           can-edit? (access-greater-than? (:access-level props) "READER")
+           snapshot-id (get-in config ["methodRepoMethod" "methodVersion"])]
        [:div {:style {:lineHeight 1}}
         (when (and can-edit? (not editing?))
           [:div {}
            [comps/SidebarButton {:style :light :color :button-primary
                                  :text "Edit Configuration" :icon :edit
                                  :disabled? (when locked? "The workspace is locked")
-                                 :onClick #(swap! state assoc :editing? true)}]
+                                 :onClick #(swap! state assoc :editing? true :prev-snapshot-id snapshot-id)}]
            [comps/SidebarButton {:style :light :color :exception-state :margin :top
                                  :text "Delete" :icon :delete
                                  :disabled? (when locked? "The workspace is locked")

        (when editing?
          [comps/SidebarButton {:color :success-state
                                :text "Save" :icon :done
                                :onClick #(do (commit state refs config props)
                                              (stop-editing state))}])
        (when editing?
          [comps/SidebarButton {:color :exception-state :margin :top
                                :text "Cancel Editing" :icon :cancel
                                :onClick #(stop-editing state)}])]))])


(defn- input-output-list [values ref-prefix invalid-values editing? all-values]

(defn- render-display [this state refs props]
  (let [wrapped-config (:loaded-config @state)
        config (wrapped-config "methodConfiguration")
        editing? (:editing? @state)
        restore-on-cancel #(this :load-new-method-template %)]
    [:div {}
     [comps/Blocker {:banner (:blocker @state)}]
     [:div {:style {:padding "1em 2em"}}
      (render-side-bar (utils/restructure state refs config editing? props restore-on-cancel))
      (when-not editing?
        [:div {:style {:float "right"}}
         (launch/render-button {:workspace-id (:workspace-id props)
