Repository navigation
Conversation
…e app Chat now tracks componentReady, firstMessageSent, messageCount and inputSubmittedAt. Content rendered inside the chat reads them with useChatLifecycle(); an app outside it passes onLifecycleChange. The values live in a small store, so Chat itself does not render again when one changes. messageCount and inputSubmittedAt start again when the session prop changes. firstMessageSent also turns true when a run the composer did not start is seen running, and stays true while the Chat is mounted.
blove
enabled auto-merge
November 17, 2026 23:51
This branch has not been deployed
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
Angular's chat exposes four lifecycle values on its
CHAT_LIFECYCLEtoken. ReactChathad no equivalent. This adds them:useChatLifecycle()returnscomponentReady,firstMessageSent,messageCountandinputSubmittedAtto content rendered inside aChat(header, welcome, composer slots). It returns null outside aChat.onLifecycleChangeonChatreports the same four values to the app each time one changes, starting withcomponentReadyafter mount.The values live in a small store read with
useSyncExternalStore, soChatitself does not render again when one changes. Nothing changes for apps that use neither.Differences from Angular
React has no
clearThread, so:messageCountandinputSubmittedAtstart again when thesessionprop changes.session.submitsetsfirstMessageSentwhen its run is seen running and leaves the other two alone.Not included
AGENT_LIFECYCLE): they belong in the runtime session.libs/react/README.mddocuments the API.Verification
nx run-many -t lint,type-tests,build -p reactpasses.libs/reactvitest suite: 100 files, 1530 tests pass. A first run had 13 timeouts on a heavily loaded machine; those files passed alone and the suite passed on a rerun with a longer per-test timeout.node --test scripts/react-parity/verify-packages.spec.mjspasses (103);verify-boundaries.mjspasses;inventory.mjs --checkreports only baseline drift.🤖 Generated with Claude Code