   in s & environments . ix eid .~ newModel

updateEnvironment :: EnvironmentFormState -> Environment -> Environment
updateEnvironment form =
  (name .~ form ^. name)
    . (variables .~ form ^. variables)
    . (safetyLevel .~ form ^. safetyLevel)

showEnvironmentEditScreen ::
  EnvironmentContext -> AppState a -> AppState 'EnvironmentEditTag