fix(mobile): show held message as user bubble when model gate is up - #6302
fix(mobile): show held message as user bubble when model gate is up#6302Christian-Sidak wants to merge 1 commit into
Conversation
On a keyless account, a message typed in the /m composer was stashed in pendingTasksAtom and held correctly, but nothing rendered it. The screen showed only the AgentIntroCard below the connect-model strip, so the person could not see what they had typed. This matches the desktop behavior: the desktop renders the held seed as a visible user turn above the connect-model banner. Mobile now matches that. Changes: - Read pendingTasksAtom non-destructively (without consuming the entry) in LiveConversation to get the held task text. - Render it as a right-aligned user bubble in the transcript whenever heldTaskText is set, placed above the AgentIntroCard. The bubble disappears automatically once the gate drops and the send effect fires (takePendingTaskAtom removes the entry from the atom). - Pass 'Connect a model to start chatting...' as the composer placeholder when modelBlocked is true, matching the desktop disabled-state copy. - Thread a placeholder prop through Composer to ChatComposer so the host can override the default idle placeholder. Fixes Agenta-AI#6209 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Christian-Sidak <61099993+Christian-Sidak@users.noreply.github.com>
|
@Christian-Sidak is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
|
✅ Thanks @Christian-Sidak! This PR now meets the contribution requirements and has been reopened. A maintainer will review it soon. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Disabled knowledge base sources:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe mobile chat flow now keeps held task text visible while the model gate is active. The composer accepts an optional placeholder override and displays a connection prompt when sending is blocked. ChangesMobile held-message flow
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Demo
Before: Text typed in
/mon a keyless account disappeared after sending (no user bubble visible, only the amber gate strip and the agent intro card).After: The held message is rendered as a right-aligned user bubble above the gate, composer shows "Connect a model to start chatting..." — matching the desktop behavior exactly.
Screenshots from a real device are required per the issue's validation criteria (#6209). The issue report includes QA reference screenshots named
qa/ui-regression/m-keygate-newaccount--staging.png(broken mobile) andqa/ui-regression/firstrun-keygate--staging.png(working desktop). Real-device screenshots should be attached here once a test device is available.Summary
On a keyless account, a message typed in the
/mcomposer was stashed inpendingTasksAtomand held correctly, but nothing rendered it. The screen showed only theAgentIntroCardbelow the connect-model strip, so the person could not see what they had typed.This is a render-only gap: the message was never lost (it was parked and would send once a key was added), but it was invisible. The desktop already does the right thing: it shows the held seed as a visible user turn above the connect-model banner. Mobile now matches that behavior.
Changes:
pendingTasksAtomnon-destructively (without consuming the entry) inLiveConversationto get the held task text.heldTaskTextis set, placed above theAgentIntroCard. The bubble disappears automatically once the gate drops and the send effect fires (takePendingTaskAtomremoves the entry from the atom)."Connect a model to start chatting..."as the composer placeholder whenmodelBlockedis true, matching the desktop disabled-state copy.placeholderprop throughComposertoChatComposerso the host can override the default idle placeholder.The fix is mobile-only and does not touch any shared packages or desktop code.
Test plan
pendingTasksAtom[sessionId]and thattakePendingTaskAtomis only called by the send effect (not the display path), so peeking without consuming is safe.heldTaskTextis derived from live atom state, so it updates reactively when the task is consumed (the bubble disappears as soon as the gate clears and the send fires).ChatBubble/ChatBubbleAvatar/turnRowClassusage matches the existingTurnRowrender for user messages exactly.Fixes #6209