Skip to content

feat(deploy,ui): SignalR-driven track UI at /deploy/track/<id> #1032

@Cataldir

Description

@Cataldir

Problem statement

Capability 43's locked Step 5 of the BPMN flow: /deploy/track/<id>. A SignalR-driven (or SSE) real-time view of deployment state. Per-resource progress, errors, retries. The track view is also the entry point for the cleanup contract (issue C7 #1033) and the exit/portability action (issue C10 #1036).

Acceptance criteria

  • Page at /deploy/track/<id> under the (deploy) route group.
  • Backend endpoint GET /api/deployments/<id>/events (SSE or SignalR hub) streams deployment state transitions and per-resource events to the page.
  • State machine surfaced to the user: NEW → PREFLIGHT_OK → DEPLOYING → SUCCEEDED | FAILED → (CLEANUP | KEEP_PARTIAL) → CLEANED | KEPT. (See issue C7 for the cleanup branch.)
  • Per-resource progress: name, type, status (pending / creating / succeeded / failed), error message if any.
  • Auto-reconnect on transient disconnects.
  • Auth via OBO token (issue C5 feat(deploy,infra,security): OBO OAuth flow + ARM deployment kickoff #1031); only the deployment owner (entra_oid matches) can subscribe.
  • On SUCCEEDED: surface the deployed UI URL (link to the retailer's domain or RG output) plus next-step CTAs (try the demo deployment, read the docs).
  • On FAILED: surface the "Clean up now" action (issue C7) and the "Keep partial" alternative.
  • Always offer "Delete this deployment" (issue C10) once the deployment is past PREFLIGHT_OK.
  • Lighthouse Accessibility ≥ 90 on the track page.

Risks and dependencies

Risk Mitigation
SignalR reconnect storm if many deployments happen simultaneously. APIM rate-limit policy (issue C8); per-connection backoff; max concurrent connections per user enforced.
Stale UI when the SSE stream drops silently. Heartbeat every 15 s; UI shows "Reconnecting…" if no message in 30 s.
Per-resource progress events lost if Event Hub is the source of truth and the consumer falls behind. Cosmos record is the source of truth for deployment state; Event Hub is for audit fan-out only.

Blocked by: epic 41 #1020; C1 #1027 (infra); C5 #1031 (OBO); C9 #1035 (Cosmos record); R2 epic #1008; R1 epic #990.

Evidence links

ADR impact

  • ADR-034 (audience-segmented IA) — implementation step.

Branch

feature/<this-issue-id>-deploy-track-signalr-ui per ADR-018.

BPMN process

%%{init: {'theme':'base', 'themeVariables': {
  'primaryColor':'#FFB3BA',
  'primaryTextColor':'#000',
  'primaryBorderColor':'#FF8B94',
  'lineColor':'#BAE1FF',
  'secondaryColor':'#BAE1FF',
  'tertiaryColor':'#FFFFFF'
}}}%%
flowchart LR
  A[Analyze Current Code] --> B[Design Change]
  B --> C[Implement on Issue Branch]
  C --> D[Open PR]
  D --> E[Validation and Fixes]
  E --> F[Merge to Main]
  F --> G[Monitor Workflows]
  G --> H[Close Issue and Cleanup]
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uiFrontend UIgtm:deploy-portalCapability 43 — One-click deployment portalpriority:highHigh priority worktype:featureNew feature or capability

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions