🐛 fix(home): blank user bubble when sending the placeholder hint#14678
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
979c99d to
5b82ea3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #14678 +/- ##
==========================================
- Coverage 66.13% 66.13% -0.01%
==========================================
Files 2913 2912 -1
Lines 255803 255755 -48
Branches 25026 31124 +6098
==========================================
- Hits 169188 169146 -42
+ Misses 86462 86456 -6
Partials 153 153
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
5b82ea3 to
59d781e
Compare
When the home input was empty and the user clicked send, `useSend`
correctly fell back to the daily-brief hint for `message`, but it also
forwarded `mainInputEditor.getJSONState()` as `editorData`. An empty
editor still returns a non-null JSON state (e.g. `{ type: 'doc' }`),
which makes `UserMessageContent.hasEditorData` truthy — so the renderer
took the RichTextMessage branch and drew nothing, while the agent
happily processed the hint text behind a blank user bubble.
Skip `editorData` when the hint is being used so the renderer falls
back to the markdown `content`. Adds a regression test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
59d781e to
af3cf41
Compare
arvinxx
added a commit
that referenced
this pull request
May 12, 2026
) When the home input was empty and the user clicked send, `useSend` correctly fell back to the daily-brief hint for `message`, but it also forwarded `mainInputEditor.getJSONState()` as `editorData`. An empty editor still returns a non-null JSON state (e.g. `{ type: 'doc' }`), which makes `UserMessageContent.hasEditorData` truthy — so the renderer took the RichTextMessage branch and drew nothing, while the agent happily processed the hint text behind a blank user bubble. Skip `editorData` when the hint is being used so the renderer falls back to the markdown `content`. Adds a regression test. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lezi-fun
pushed a commit
to lezi-fun/lobehub
that referenced
this pull request
May 13, 2026
…ehub#14678) When the home input was empty and the user clicked send, `useSend` correctly fell back to the daily-brief hint for `message`, but it also forwarded `mainInputEditor.getJSONState()` as `editorData`. An empty editor still returns a non-null JSON state (e.g. `{ type: 'doc' }`), which makes `UserMessageContent.hasEditorData` truthy — so the renderer took the RichTextMessage branch and drew nothing, while the agent happily processed the hint text behind a blank user bubble. Skip `editorData` when the hint is being used so the renderer falls back to the markdown `content`. Adds a regression test. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
💻 Change Type
🔗 Related Issue
🔀 Description of Change
When the home input was empty and the user pressed send,
useSendcorrectly fell back to the daily-brief placeholder hint formessage, but it also forwardedmainInputEditor.getJSONState()aseditorData. An empty editor still returns a non-null JSON state (e.g.{ type: 'doc' }), which makesUserMessageContent.hasEditorDatatruthy — so the renderer took theRichTextMessagebranch and drew nothing, while the agent happily processed the hint text behind a blank user bubble.Skip
editorDatawhen the hint is being used so the renderer falls back to the markdowncontent.src/routes/(main)/home/features/InputArea/useSend.ts— computeeditorDataafterusedHint; returnundefinedwhen sending the hint.src/routes/(main)/home/features/InputArea/useSend.test.ts— mockuseHomeDailyBrief; new regression test for the empty-editor + hint case.🧪 How to Test
📝 Additional Information
No locale or schema changes.