Files
AgenticCode/openspec/changes/wire-responses-api/specs/chat-ui/spec.md
local 1614a61617 feat: add basic chat interface with MudBlazor and propose responses API integration
Install MudBlazor 9.2.0, replace Bootstrap layout with MudLayout/MudAppBar,
create Chat.razor with message list, text input, auto-scroll, and hardcoded
responses. Add ChatMessage shared model. Remove template pages (Counter,
Weather), move health check to /health. Include OpenSpec change artifacts
for the upcoming wire-responses-api work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 01:24:40 +01:00

1.7 KiB

MODIFIED Requirements

Requirement: Hardcoded response

The assistant SHALL reply with a real AI response streamed from the backend API, replacing the previous hardcoded stub. Tokens appear incrementally as they arrive.

Scenario: Bot replies with streamed AI response

  • WHEN the user sends any message
  • THEN the assistant message appears and grows token by token as the stream delivers text

Requirement: Message input

The chat page SHALL provide a text input area at the bottom of the page where the user can type and submit messages.

Scenario: Submit via button

  • WHEN the user types text and clicks the send button
  • THEN the message is added to the conversation and the input is cleared

Scenario: Submit via Enter key

  • WHEN the user types text and presses Enter
  • THEN the message is submitted (same as clicking send)

Scenario: Empty input blocked

  • WHEN the user attempts to send an empty or whitespace-only message
  • THEN nothing is sent and no message is added

Scenario: Input disabled during streaming

  • WHEN the assistant is currently streaming a response
  • THEN the input field and send button are disabled until streaming completes

ADDED Requirements

Requirement: Thinking indicator

The chat page SHALL show a visual indicator while waiting for the first token from the assistant.

Scenario: Indicator shown during wait

  • WHEN the user sends a message and the assistant has not yet started streaming
  • THEN a thinking indicator (e.g., animated dots) is shown in the assistant message area

Scenario: Indicator replaced by content

  • WHEN the first token arrives from the stream
  • THEN the thinking indicator is replaced by the streamed text