fix(desktop): prevent "Composer is not available" error on boot after v0.17 upgrade - #49979
Closed
Andy365-365 wants to merge 3 commits into
Closed
fix(desktop): prevent "Composer is not available" error on boot after v0.17 upgrade#49979Andy365-365 wants to merge 3 commits into
Andy365-365 wants to merge 3 commits into
Conversation
When the assistant-ui composer core binding is not yet established (e.g. during boot or session switch), aui.composer().setText() throws 'Composer is not available'. This was reported after upgrading to v0.17.0 where the composer popout refactor introduced a timing window where the boot-time useEffect fires before the binding resolves. Add a safeSetText wrapper that catches the error and defers to the next frame via requestAnimationFrame, giving the binding time to resolve. Applied to all setText call paths including loadIntoComposer, clearDraft, insertText, and insertInlineRefs. Fixes NousResearch#49903
setPreviewTarget() only set the preview target and selected the right rail tab,
but never called setPaneOpen('preview', true). After the user closed the preview
panel (dismissPreviewTarget), the pane open state remained false, so subsequent
browser_navigate calls loaded content but the panel stayed hidden.
Andy365-365
marked this pull request as draft
June 21, 2026 14:04
Andy365-365
marked this pull request as ready for review
June 21, 2026 14:04
Contributor
|
Thanks for the focused desktop investigation. This automated hermes-sweeper review found that the requested behavior is already implemented on current
Closing as implemented on main. |
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.
What does this PR do?
Add a defensive safeSetText wrapper around aui.composer().setText() in composer/index.tsx. When the assistant-ui composer core binding is not yet established (e.g. during boot or session switch), setText throws "Composer is not available". The wrapper catches this specific error and defers the call to the next frame via requestAnimationFrame, giving the binding time to resolve. Other errors rethrow normally.
Related Issue
Fixes #49903
Type of Change
Changes Made
File: apps/desktop/src/app/chat/composer/index.tsx (+28 lines, -5 lines)
How to Test
Checklist
Code
Documentation & Housekeeping
Screenshots / Logs
N/A — the fix prevents a console error, no visual change.