Skip to content

Chat: show provider activity and provider confirmation requests #1641

Backlog

Description

@smart-ssh-planner

Goal

The chat shows a provider's activity entries and its confirmation requests (from #1639). The user sees what the provider is doing and can answer its questions directly in the chat.

Context

  • Chat UI: apps/smart-ssh-community/frontend/src/components/ChatPanel.tsx and the transcript components next to it (ChatTranscript*). Existing confirmation and question UI: see the ChatPanelQuestion and confirmation tests in the same folder.
  • WebActivity entries are already rendered in the chat and are the model for informational entries.
  • Backend events, the answer command and the stored entries come from Provider activity notices and provider-requested confirmations in the chat turn #1639.

Requirements

  • Activity entries.
    • Each entry is a compact line in the transcript: an icon per kind (tool, plan, thought, notice), the title and the status (pending/running/completed/failed). The detail is collapsible.
    • Updates with the same id change the entry in place.
    • Entries come back after reloading the chat.
  • Confirmation requests.
    • Shown inline in the chat as a card with title, detail and one button per option. A reject option is the default focus.
    • After answering, the card shows the choice and is no longer actionable. A cancelled request shows "cancelled".
    • While a provider confirmation is open, the composer behaves as it does during a pending command confirmation.
  • Safety and texts.
    • Provider text is untrusted: plain text only, no markdown links, no HTML. Long text is collapsed.
    • New texts are in every UI language.

Acceptance Criteria

  • An activity event followed by an update of the same id renders one entry with the updated status (test).
  • Activity entries render after reloading a stored chat (test).
  • A confirmation card renders its options. Clicking one calls the answer command with the request id and option id, and the card turns read-only (test).
  • A cancelled confirmation renders as cancelled and offers no buttons (test).
  • Provider text containing markdown links or HTML renders as plain text (test).
  • Keyboard: the card's buttons are reachable by Tab, reject is focused first, and the a11y test passes.
  • Relevant automated tests pass (frontend unit tests, type check, i18n checks).

Technical Notes

Files: apps/smart-ssh-community/frontend/src/components/ (new chat components for activity and provider confirmation, ChatPanel.tsx), apps/smart-ssh-community/frontend/src/locales/

Spec impact: update 0006

Related Work

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrontend

    Fields

    Priority

    P2 - Normal

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions