Skip to content

Report generation progress indicator in Chat UI #243

@willvelida

Description

@willvelida

Summary

Show a Claude-style progress indicator with elapsed timer in the Chat UI when report generation is in progress. Currently, the user sees only three bouncing dots for 30-120+ seconds during the entire report generation flow (data fetch → report generation → status polling → reviewer validation), with no visual distinction between "thinking", "fetching data", or "generating report".

Research Document: .copilot-tracking/research/2026-04-06/report-generation-progress-indicator-research.md

Problem

When a user requests a report via the chat interface, the Chat.Api agent:

  1. Fetches health data via MCP tools (5-15s)
  2. Calls RequestReport tool → POST to Reporting.Api → 202 Accepted (1-2s)
  3. Polls GetReportStatus tool while report generates in background (20-90s)
  4. Runs a reviewer agent to validate (5-10s)
  5. Streams the final response with charts and download links

During this entire 30-120+ second flow, the user sees only the generic typing indicator (three bouncing dots) — the same animation shown for a 2-second response.

Goal

Replace the generic typing indicator with a contextual progress indicator that shows:

  • Pulsing spinner (RadzenProgressBarCircular, indeterminate)
  • Contextual label ("Generating report...")
  • Elapsed timer counting up in Xs or m:ss format

Similar to Claude's "Thinking..." / "Analyzing..." indicator that shows transparency during long-running operations.

Implementation Approaches

Three approaches were researched and evaluated. Each approach is tracked as a sub-issue:

Approach Effort Files Projects Status
A: AGUI-Stream-Only (recommended) 2-4h, ~50 LOC 3 UI only Selected
B: Chat.Api Proxy + UI Polling 8-12h, ~200 LOC 10-13 UI + Chat.Api + Infra Available as upgrade
C: AGUI Custom Events 15-25h 4-5 Chat.Api + UI Rejected (high risk)

Key Research Findings

  1. TOOL_CALL_RESULT confirmed emitted — Source code from microsoft/agent-framework confirms MapAGUI emits TOOL_CALL_RESULT events in the SSE stream, carrying tool return content
  2. AGUIEvent model needs 3 propertiesContent, ToolCallId, ToolCallName are missing; tool result data is silently discarded during JSON deserialization
  3. UI cannot call Reporting.Api directly — all endpoints require ChatApiAgent authorization (azp claim)
  4. APIM uses explicit operations — new routes require Bicep additions (~15 lines), but API-level policy auto-applies
  5. Blob enumeration concernGetMetadataAsync does O(N) scan; relevant if Approach B is pursued
  6. Approach A is fully additive — doesn't block adding B later

Acceptance Criteria

  • Report generation shows contextual progress indicator instead of generic typing dots
  • Elapsed timer counts up during report generation
  • Indicator dismisses when report completes or stream ends
  • Accessibility: aria-label on progress component, not color-only
  • Mobile responsive (works at 320px viewport)
  • Existing unit tests pass
  • New timer logic properly disposed on component disposal

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions