       format: 'thangs-folder'
       additionalProperties: {
         anyOf: [
-          Level.schema.properties.thangs.items
+          {
+            type: 'object'
+            format: 'thang'
+            required: ['thangType', 'id', 'index']
+          }
           { $ref: '#' }
         ]
       }


  onThangsChanged: =>
    return if @hush
    @level.set 'thangs', @flattenThangs(@thangsTreema.data)
    return if @editThangView
    serializedLevel = @level.serialize @supermodel, null, true
    try

  groupThangs: (thangs) ->
    # array of thangs -> foldered thangs
    grouped = {}
    for thang, index in thangs
      path = @folderForThang(thang)
      obj = grouped
      for key in path
        obj[key] ?= {}
        obj = obj[key]
      obj[thang.id] = thang
      thang.index = index
    grouped
    
  folderForThang: (thang) ->
