8000 feat(web): restyle ask_user prompt as a composer-style selector by sheepbox8646 · Pull Request #818 · felinics/Memoh · GitHub
[go: up one dir, main page]

Skip to content

feat(web): restyle ask_user prompt as a composer-style selector - #818

Merged
qqqqqf-q merged 1 commit into
mainfrom
feat/web-ask-user-composer-selector
Jul 16, 2026
Merged

qqqqqf-q merged 1 commit into
mainfrom
feat/web-ask-user-composer-selector

Conversation

@sheepbox8646
Copy link
Copy Markdown
Member

Summary

UX polish for the ask_user tool prompt in the web chat. The pending Q&A used to render as a small white card floating above the composer, with its own visual language (card border, tiny text, footer Submit/Cancel row) that clashed with the input capsule below it.

The prompt is now a selector that takes the composer's place and wears its exact language — same chat-composer-edge hairline, bg-surface-composer fill, 20px radius and inner padding — so answering a question feels like part of the input surface rather than a bolted-on dialog:

  • Option rows — full-width ghost rows with radio/checkbox indicators (selection shows via the indicator, not a persistent row fill).
  • Divider, then a "Tell the bot more…" input for the free-text / custom answer; Enter submits directly.
  • Submit / Cancel pair at the bottom. Cancel resolves the request as canceled and hands the focused composer back.

Behavior details

  • While a request is pending the textarea hides; picking an option reveals it again so the user can keep typing.
  • For single_select, typing a custom answer clears the picked option and vice-versa, mirroring the backend's "exactly one of option / custom text" rule — Submit can never be armed with an invalid combination.
  • A lone text question routes its answer through the same footer input; multi-question requests keep per-question inline inputs (one footer input can't answer several text questions).
  • The bottom backdrop mask now measures whichever box stands in for the composer (shared COMPOSER_MASK_BELOW_PX), so no message bleed behind the capsule's bottom corners.
  • i18n: new chat.tools.userInputTellMore key in en/zh/ja.

Verification

  • vue-tsc --noEmit clean, ESLint clean, check-ui-contract.mjs passes (no new violations).
  • vitest run apps/web/src/store — 444/444 pass.

🤖 Generated with Claude Code

While an ask_user request was pending, the Q&A card sat above the composer
as a mismatched white card with its own footer buttons. Replace it with a
selector that takes the composer's place and wears its exact language
(chat-composer-edge hairline, bg-surface-composer, 20px radius): option
rows, a divider, a "tell the bot more" free-text input that submits on
Enter, and a Submit / Cancel pair at the bottom.

Cancel resolves the request as canceled and hands the focused composer
back; picking an option also reveals the composer so the user can keep
typing. Single-select keeps option vs custom text mutually exclusive in
the UI, mirroring the backend rule; multi-question requests keep
per-question inline inputs. The bottom backdrop mask now measures whichever
box stands in for the composer, via the shared COMPOSER_MASK_BELOW_PX.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sheepbox8646
sheepbox8646 requested a review from a team July 16, 2026 11:37
@qqqqqf-q qqqqqf-q left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM — ask_user 选择器和 composer 视觉统一方向没问题,diff 范围也干净(6 个 web 文件,无 ACP 混入)。底部遮罩跟着替身盒子走这点处理得细致。先合。

@qqqqqf-q
qqqqqf-q merged commit 50986bf into main Jul 16, 2026
12 checks passed
@qqqqqf-q
qqqqqf-q deleted the feat/web-ask-user-composer-selector branch July 16, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0