Skip to content

Fresh UI: make PromptInput production-capable with action slots and submit key policy #949

Description

@rickylabs

Problem

The registry PromptInput renders attach, screenshot, and voice controls unconditionally, but those controls have no callbacks/capability props. It also leaves keyboard submission and busy/stop behavior to every app island. A real consumer therefore either shows inert buttons or forks the component.

eis-chat had to evolve its copy to remove unavailable actions, wire file/image attachment, block submission during OCR preflight, show stop while streaming, and support Ctrl/Cmd+Enter.

Requested API

  • optional onAttach / attachment capability, or typed leading/trailing action slots
  • do not render screenshot/voice/attach affordances unless the consumer supplies the capability
  • �usy, onStop, and sendDisabled states with accessible labels
  • explicit submit key policy (
    one, enter, mod-enter) rather than undocumented island code
  • matching �ria-keyshortcuts and IME-safe handling
  • consistent icon-button sizing between attach and send
  • retain the presentational/form-first API and model/grounding/research controls

Acceptance criteria

  • no inert toolbar actions in the default/minimal configuration
  • Ctrl/Cmd+Enter can submit without inserting a newline; plain Enter remains available for multiline when configured
  • composition events do not accidentally submit
  • busy/preflight state prevents duplicate submits and can expose Stop
  • tests cover keyboard policy, disabled/busy state, and optional action rendering

Dogfood evidence

eis-chat PR #152 contains the production behavior and can serve as an API/interaction reference. This can be delivered under the registry quality umbrella #509 without making chat transport or OCR concerns part of Fresh UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions