Skip to content

✨ lifecycle: create/destroy/id as Apis over a hidden global - #19

Closed
cowboyd wants to merge 1 commit into
tree-apifrom
tree-lifecycle
Closed

cowboyd wants to merge 1 commit into
tree-apifrom
tree-lifecycle

Conversation

@cowboyd

@cowboyd cowboyd commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Every later subsystem relies on nodes having a dependable attachment lifecycle. Creating a node must register it with its parent so inherited APIs can propagate through the actual tree, while destroying a subtree must remove every descendant cleanly. Lifecycle itself must also be middleware-extensible so hosts and future subsystems can react to attachment and removal without embedding those concerns in the tree primitive.

Stable node identities are also required when layout operations are handed to the terminal renderer. Providing lifecycle and identity through the same API mechanism proves that the abstraction works for foundational operations, not only higher-level UI behavior.

This PR adds middleware-extensible create, destroy, and id lifecycle operations. Creation registers children and assigns stable identifiers, while destruction recursively removes a subtree from its parent.

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

commit: a05004a

@cowboyd
cowboyd force-pushed the tree-lifecycle branch 2 times, most recently from 8ce50b9 to 577889b Compare August 11, 2026 04:00
@cowboyd
cowboyd force-pushed the tree-lifecycle branch 2 times, most recently from e272d64 to 4d1a9a6 Compare August 22, 2026 05:24
@cowboyd
cowboyd force-pushed the tree-lifecycle branch 2 times, most recently from 8a0f1ed to a05004a Compare August 23, 2026 17:28
@cowboyd

cowboyd commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

closing out in favor of a DOM based substrate. See #37

@cowboyd cowboyd closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant