Skip to content

Mobile: Tool approval and question cards in the DM #1718

Closed

Description

@DoodleBears

Problem and context / 问题与背景

In a mobile DM, a message that carries a Tool approval or a Human question shows only "Open the full client on your computer to respond to this." The Human has to leave the chat to decide. apps/mobile/DESIGN.md (Chat → Action cards) says these cards sit in the chat stream and are decided there. Activity can already decide them through src/host/requests.ts (#1653).

Smallest useful scope / 最小有用范围

Included:

  • A src/ui/chat/ action card with one shared layout: a title and explanation, an optional preview, then buttons. At most one button is primary.
  • Tool approval: Allow once / Always allow / Deny. Details open a form sheet showing the tool, cwd and input.
  • Question: lettered options, single or multiple choice, then Submit.
  • A decided card collapses to one line. A card decided on another device, or one that expired, says so.
  • The cards reuse loadApproval / loadQuestion and the decide calls in src/host/requests.ts. There are no new Host bridge methods, so no CLI change.
  • Opening an Activity item jumps to its card in the chat.

Excluded:

How to verify / 如何验收

  • Fake-Host tests cover each card kind: pending, decided here, decided elsewhere and expired.
  • Against an isolated Host (MOBILE_LIVE_HOST_URL), a real PersonaBot asks for an approval and a question in a DM. Both are decided from the chat, and the Bot continues.
  • PR screenshots of each card in light and dark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions