Repository navigation
feat(mobile-web): send a prompt suggestion with one tap - #3656
Merged
bobleer merged 4 commits intoNov 2, 2026
Merged
Conversation
The suggestion bubble only accepts the text into the composer, so sending a suggestion always costs a second tap on the send button, and accepting first hides the bubble because it is gated on an empty editor. Keep the bubble as the accept affordance and add a trailing control that submits the suggestion directly. The send path reuses the existing submission handler with an explicit text override, so toast/queue/error handling stays in one place, and the draft is left untouched — a half-typed message must never be clobbered by a suggestion. Covered by the existing prompt-suggestion browser fixture plus a new case asserting one tap records a send and does not fill the textarea. iOS, Android and HarmonyOS composers still accept-only; this change covers the Remote web surface.
Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
Collaborator
|
Review note: pushed Verified locally: |
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.
问题与改动
Remote web 聊天页的建议气泡原先只能填入输入框,触屏需要再点一次发送。本 PR 保留气泡主体的“采纳并编辑”,在旁边新增独立的发送箭头,一次点击提交建议。
handleSend(suggestion)复用既有消息提交路径;普通发送仍通过无参数包装调用handleSend()。审查补充
已合并 main 到
32715e45d的更新,并补充真实ChatPage+RemoteSessionManager+HostDialogQueue/ durable outbox 的浏览器集成测试,只模拟 host IO:验证
以下命令在本 PR 工作树运行(使用
corepack pnpm):pnpm --dir src/mobile-web run type-check— passed。首次因新工作树缺少 design-system package 的依赖链接失败,补齐本地依赖链接后通过,未修改依赖清单。pnpm --dir src/mobile-web run test:prompt-suggestion-browser— 3 passed,包含真实聊天/队列成功与失败路径。pnpm --dir src/mobile-web run test:workspace-identity— 35 passed。pnpm --dir src/mobile-web run test:account-browser— 21 passed,覆盖共享 fixture 的既有行为。pnpm run i18n:audit— passed,0 warnings。git diff --check— passed。pnpm --dir src/mobile-web run test:host-queue— 16 passed,1 failed。 失败为既有queue stays above the measured composer...的正文/思考图标左边界断言:textLeft=16, iconLeft=28。在独立的未打补丁 main32715e45d工作树、相同依赖环境,用node --test --test-name-pattern='queue stays above' tests/host-dialog-queue-browser.test.mjs得到完全相同的失败。该失败尚未修复;没有修改断言或宣称整套测试全绿。浏览器测试使用本机 Chrome 的一次性 profile,另检查了 320px 长文本截图;没有操作用户浏览器或使用真实账号/relay。远程场景仅有 mobile remote-control 的本地模拟 host IO 集成验证,未做真实手机/双机、SSH workspace、Peer Device 或 Detached Dispatch 实机验证。
Generated with OpenBitFun