Skip to content

feat: approval prompt UI component for dashboard web chat #537

@njbrake

Description

@njbrake

Context

The progressive approval system currently sends plain-text approval prompts via MessagingService.send_text(). In the dashboard web chat, this appears as a regular assistant message, and the user must type "yes"/"no"/"always"/"never" in the chat input. This is functional but not a great web UI experience.

Proposal

Add a dedicated approval prompt component to the dashboard chat UI that renders inline action buttons instead of relying on typed responses.

Implementation ideas

  • When the assistant message contains an approval prompt (detectable by a structured marker or a new message type in the bus), render it as a special card component with:
    • Tool name and description
    • Four buttons: Approve, Deny, Always Allow, Never Allow
    • Visual styling that distinguishes it from regular messages (e.g. a border, icon, or background color)
  • Clicking a button sends the corresponding text response ("yes"/"no"/"always"/"never") through the existing web chat message path, which flows through process_inbound_from_bus() and resolves the gate.
  • After a decision is made, the component updates to show the outcome (e.g. "Approved" with a checkmark) and disables the buttons.
  • Consider adding a countdown timer showing the remaining approval timeout.

Alternative: structured message type

Instead of pattern-matching on the text, introduce a structured approval_request message type in the outbound bus so the frontend can reliably distinguish approval prompts from regular messages. This would require:

  • A new field on the outbound bus message (e.g. message_type: "approval_request")
  • Frontend routing logic to render the appropriate component

References

  • Approval system: backend/app/agent/approval.py
  • Ingestion intercept: backend/app/agent/ingestion.py (top of process_inbound_from_bus)
  • Web chat frontend: backend/app/static/ or the relevant frontend directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlayer: agentAgent loop, tools, orchestrationlayer: featureUser-facing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions