Repository navigation
Conversation
Why: - StrictMode cleanup clears the page-chat request scope without setup restoring it. - A first empty submit then leaves the dock busy without reaching save or API work. What: - Restore the current request scope in effect setup and pair cleanup with that scope. - Add component regressions for initial submit, retry, scope changes, and unmount. Risk: - Keep existing request-generation and render-time invalidation behavior unchanged. - API and Chat are mocked in UI fixtures; live provider behavior was not tested. Tests: - Regression failed on unmodified source; focused suites now pass 13 tests. - npm test: 312 tests passed across 49 files on Node 24.16.0. - npm run check-format; npm run lint; npm run typecheck; npm run build. - Chrome fixture: 1280px click, 390px Tab/Enter, and API-failure retry. Live Docs: - No setup, dependency, or public API change; no documentation update required.
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.
Workflow and problem
In development, open a page with an available specialist and assistant configuration, then select Send to page assistant without typing first. Opening page chat with an empty draft is supported by the component.
main.tsxenables React StrictMode. Its initial effect setup → cleanup → setup replay clearsPageChatRequests' selected scope, but the previous setup never restored it. The submit handler setsbusy=true, thenrun(scope)returns beforebeforeChator the conversation API executes; no settled callback releases busy. The input and send button stay disabled.An input change or parent rerender before submitting re-selects the scope and can mask the bug. This is a development StrictMode lifecycle bug; I am not claiming the production build or normal typed-message flow fails.
Change
Only
PageConversation.tsxand its new component test change. No dependency, configuration, SDK, or backend changes.Verification
On Node 24.16.0, based on current upstream
main:mainsource, the StrictMode first-empty-submit regression fails becausebeforeChatis called zero times; the other 9 new component cases and 3 existing request-controller cases pass. With the fix, all 13 focused tests pass.npm run check-format— passed.npm run lint— passed.npm run typecheck— passed.npm test— 49 files, 312 tests passed.npm run build— passed.git diff --check— passed.Actual Chrome browser checks used the real
PageConversation, ReactDOM StrictMode and repository CSS in an isolated Vite fixture:Verification limits
The component tests mock the API and child
Chat. The browser fixture intercepts the conversation API and replaces only the childChat; it validates setup lifecycle, controls, layout and the handoff, not a live Intelligence/model response. No live cloud chat, voice, Slack or Docker deployment was tested. Temporary fixture scripts and screenshots are not committed.The build retains the existing Vite native-config and large-chunk warnings. Tests use the repository's existing react-test-renderer dependency.
AI-assisted investigation, implementation and independent code review; all reported commands and browser checks were executed locally.