[keep-tree-state] Save category tree state