Skip to content

🐛 fix(home): blank user bubble when sending the placeholder hint#14678

Merged
arvinxx merged 1 commit into
canaryfrom
fix/welcome-prompt-empty-message
May 12, 2026
Merged

🐛 fix(home): blank user bubble when sending the placeholder hint#14678
arvinxx merged 1 commit into
canaryfrom
fix/welcome-prompt-empty-message

Conversation

@arvinxx

@arvinxx arvinxx commented May 11, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • 🐛 fix

🔗 Related Issue

🔀 Description of Change

When the home input was empty and the user pressed send, useSend correctly fell back to the daily-brief placeholder 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.

  • src/routes/(main)/home/features/InputArea/useSend.ts — compute editorData after usedHint; return undefined when sending the hint.
  • src/routes/(main)/home/features/InputArea/useSend.test.ts — mock useHomeDailyBrief; new regression test for the empty-editor + hint case.

🧪 How to Test

  • Tested locally
  • Added/updated tests
  1. Open the home page, leave the input empty, wait until a daily-brief hint shows up as the placeholder.
  2. Click the send button.
  3. Before this fix: the user bubble in the resulting chat is blank, even though the agent responds to the hint. After: the user bubble shows the hint text as markdown.

📝 Additional Information

No locale or schema changes.

@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment May 12, 2026 4:43pm

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @arvinxx, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 11, 2026
@arvinxx arvinxx force-pushed the fix/welcome-prompt-empty-message branch from 979c99d to 5b82ea3 Compare May 11, 2026 14:00
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 11, 2026
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.13%. Comparing base (84c89f9) to head (af3cf41).

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              
Flag Coverage Δ
app 60.55% <100.00%> (-0.01%) ⬇️
database 91.83% <ø> (ø)
packages/agent-runtime 80.48% <ø> (ø)
packages/builtin-tool-lobe-agent 83.41% <ø> (ø)
packages/context-engine 83.99% <ø> (ø)
packages/conversation-flow 92.43% <ø> (ø)
packages/file-loaders 87.60% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.94% <ø> (ø)
packages/model-runtime 83.72% <ø> (ø)
packages/prompts 70.39% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 5.44% <ø> (ø)
packages/utils 88.02% <ø> (ø)
packages/web-crawler 87.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 66.95% <ø> (ø)
Services 54.16% <ø> (ø)
Server 71.40% <ø> (-0.01%) ⬇️
Libs 56.16% <ø> (ø)
Utils 82.65% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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>
@arvinxx arvinxx force-pushed the fix/welcome-prompt-empty-message branch from 59d781e to af3cf41 Compare May 12, 2026 16:32
@arvinxx arvinxx merged commit e8ab37e into canary May 12, 2026
32 of 34 checks passed
@arvinxx arvinxx deleted the fix/welcome-prompt-empty-message branch May 12, 2026 16:51
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant