tree: refactor detail views