feat(react): add stable lifecycle events - #53
Merged
Conversation
Contributor
TegamiThis repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under Create a changelog → · Changelog format Release preview
Changelogs in this PR
Run Managed by Tegami. |
Greptile SummaryThe PR exposes structured lifecycle events from
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/react/src/domain-kit.tsx | Adds a stable emitter backed by the latest listener committed in a layout effect; the previously reported render-phase and passive-effect listener windows are resolved. |
| packages/react/src/lifecycle.ts | Defines and exports the structured lifecycle-event union and listener contract. |
| packages/react/src/provisioning.tsx | Emits apply outcomes before invoking the existing flow callback, resolving the previously reported event-suppression path. |
| packages/react/src/connection.tsx | Publishes successful connection, reuse, and disconnection lifecycle events after updating state. |
| packages/react/src/cleanup.tsx | Publishes successful and partial cleanup events after canonical cleanup state changes. |
| packages/react/tests/lifecycle-events.test.tsx | Covers stable listener replacement, observer exception isolation, and provisioning event ordering. |
Sequence Diagram
sequenceDiagram
participant User
participant Flow as DomainKit flow
participant Transport
participant State as Canonical state
participant Host as Root onEvent
User->>Flow: Start mutation
Flow->>Transport: Execute request
Transport-->>Flow: Successful result
Flow->>State: Commit result
Flow->>Host: Emit structured lifecycle event
Note over Flow,Host: Observer failures are contained
Reviews (5): Last reviewed commit: "chore(release): note React lifecycle eve..." | Re-trigger Greptile
aryasaatvik
force-pushed
the
split/react-lifecycle-events
branch
from
August 30, 2026 23:08
7afb165 to
9ae8081
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DomainKit.RootValidation