TreeState
Lifecycle state of a retained UI tree.
The state transitions from Active to Poisoned after a post-validation or pipeline failure. It transitions from Active to Closed when close begins. Non-active states reject operational work. Poisoned permits close, which transitions it to Closed. Closed is terminal and later close calls are no-ops.