Skip to content

✨ dispatch: add middleware-extensible host events - #24

Closed
cowboyd wants to merge 1 commit into
tree-focusfrom
tree-dispatch
Closed

cowboyd wants to merge 1 commit into
tree-focusfrom
tree-dispatch

Conversation

@cowboyd

@cowboyd cowboyd commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

A terminal can produce an open-ended stream of input: keys today, but also resize, paste, mouse, and application-defined events. Bombshell needs a generic boundary for sending those external events into the middleware tree without hard-coding every event category into the UI loop. That boundary should also prevent an exception in installed dispatch middleware from tearing down the terminal session without giving the application a chance to respond.

This API intentionally represents events entering the tree, as distinct from semantic events that elements will later emit to their consumers. It also avoids a universal “handled” protocol, allowing specialized middleware to define its own delegation behavior while dispatch itself reports only success or failure.

This PR adds the middleware-extensible DispatchApi and installs a Host-level error boundary with useDispatch(). Dispatch returns a small success/failure result and preserves the original thrown reason for callers.

@cowboyd
cowboyd force-pushed the tree-dispatch branch 2 times, most recently from d70a392 to 4687b18 Compare August 7, 2026 06:21
@pkg-pr-new

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

Copy link
Copy Markdown

commit: b7c337f

@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