Skip to content

Add connected/error state to Data Warehouse settings tab — Manage flow #7290

@gagantrivedi

Description

@gagantrivedi

Summary

Renders the persistent state of a configured warehouse connection. Shows status, connection summary, streaming telemetry, and test/edit/disconnect actions. This issue covers the view that appears after a connection exists; the first-time setup wizard is in FE-A (#7288).

Depends on: #7276 (PATCH), #7277 (test), #7278 (delete), #7279 (GET), #7289 (telemetry)

Rendering

  • On page load, call GET /organisations/{id}/integrations/warehouse-connections/
  • If the list is empty → render the FE-A wizard
  • If non-empty and status === 'pending_customer_setup' → render FE-A Step 2 (run SQL) or Step 3 (test), picking up where the user left off
  • If non-empty and status === 'connected' or 'error' → render this view
  • In parallel, call GET /{id}/telemetry/ to populate the telemetry section

Connected state

  • Status indicator: green dot + "Connected"
  • Connection summary (read-only, from config):
    • Account identifier
    • Warehouse
    • Database
    • Schema
    • Role
    • User
  • Last tested: relative timestamp from last_tested_at (or "Never" if null)
  • Streaming telemetry (from Add telemetry endpoint for warehouse connections #7289):
    • Last successful delivery (from last_delivery_at)
    • Events delivered in last 24h (from events_last_24h.total)
    • Pipeline status dot reflecting the status field from telemetry (active / degraded / error / idle)
  • Actions:
    • Test connectionPOST /{id}/test/
    • Edit → opens the config form (pre-filled)
    • Disconnect → confirmation modal → DELETE /{id}/

Test action

  • Button fires POST /{id}/test/, shows spinner (<5s)
  • Success: green toast, status dot stays green, last_tested_at updates
  • Failure: red toast with raw error string, status dot → red, view transitions to Error state below

Edit action

  • Opens the same form from FE-A Step 1, pre-filled with current config
  • type and account_identifier are disabled (immutable per Add create/update endpoints for warehouse connections (Snowflake) #7276)
  • Submit → PATCH /{id}/ returns a regenerated setup_script and resets status to pending_customer_setup
  • On success, the tab re-renders and FE-A takes over at Step 2 (the new SQL must be run)

Disconnect action

  • Confirmation modal: "This will stop data delivery and delete any buffered data waiting to be delivered. Your Snowflake database, tables, and already-delivered data are untouched."
  • Confirm → DELETE /{id}/
  • On success, tab re-renders into FE-A's empty state

Error state

  • Rendered when status === 'error'
  • Red banner at the top of the card showing last_error (raw Snowflake message)
  • Retry button — same behaviour as Test action
  • Connection summary still visible below, so the user can see what config was being tested

States the UI handles

Server status View
(no connection) FE-A Step 1
pending_customer_setup FE-A Step 2 or 3
connected Connected state (this issue)
error Error state (this issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions