Skip to content

Add connection status and optional Latest Version column to deployments (DT-4174)#3618

Open
rossnelson wants to merge 17 commits into
mainfrom
dt-4174-connection-status
Open

Add connection status and optional Latest Version column to deployments (DT-4174)#3618
rossnelson wants to merge 17 commits into
mainfrom
dt-4174-connection-status

Conversation

@rossnelson

@rossnelson rossnelson commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What

Implements DT-4174: surface compute-provider connection status on Worker Deployments, and add an optional Latest Version column to the deployments list.

CleanShot 2026-07-02 at 13 13 16

This PR now contains both halves of the ticket. The Latest Version column (second half) was developed in #3625 and merged into this branch.

Connection status (list + details)

  • Types: ProviderValidation / ComputeStatus + computeStatus? on VersionSummaryNew, matching the new compute_status.provider_validation API field.
  • deriveConnectionStatus derives pending / connected / failed from error_message + last_check_time (last_check_time checked first; empty and absent messages treated identically). Fully unit-tested.
  • formatConnectionCheckTime formats freshness through i18n as hours-only ("36 hours ago"), with "less than an hour ago" for sub-hour / future / invalid times.
  • ConnectionBadge: presentational dot + word chip with an informational tooltip. The API failure message is rendered directly (no client-side error-code mapping, per the backend decision). No click action.
  • List page: the Current Version cell is a composite of build ID + compute + connection, with a "No Current Version" empty state.
  • Details page: the Versions table gains a Connection column, shown for Current / Ramping / Draining versions and an em dash otherwise.

Latest Version column (list)

  • An opt-in, hidden-by-default column exposed via the table's configurable-columns control (the same gear + drawer used by the Workflows / Schedules / Activities tables).
  • Shows build ID + lifecycle badge + compute, with no connection indicator (connection stays on the Current Version cell). Shows "Same as Current" when the latest version equals the current one, and an em dash when there is no latest version.
  • Store: a new DEPLOYMENTS table type with namespace-scoped persistence.

Design polish

  • The build ID and compute badge sit together (removed the fixed min-width that left a large gap for short build IDs).
  • Removed the build ID copy buttons from the version cells (not shown in the design); the deployment name keeps its copy button.

All new UI is behind the serverScaledDeployments capability; the on-demand validate-connection flow is unchanged.

Why

The backend (temporalio/api#810, temporalio/temporal#10778, both merged) adds a periodic connectivity check for serverless worker deployments. This surfaces that signal in the UI so misconfiguration is visible before invocations fail. Per the DT-4174 decision log, the list defaults to the Current version, with Latest available as an optional column.

Testing

  • pnpm check: 0 errors
  • pnpm lint: clean
  • pnpm test --run: 2192 passed / 1 skipped (unit tests for the derivation + freshness utils and the deployments column store)

Notes

  • Freshness copy is hours-only; the "within 6h" cadence wording in the Pending tooltip should be confirmed against the backend's actual check interval.

Phase 1-2 of DT-4174 (connection status on Deployments/Versions).

- Add ProviderValidation/ComputeStatus types + computeStatus on VersionSummaryNew
- Add deriveConnectionStatus + formatConnectionCheckTime pure utils with tests
- Add ConnectionBadge component (dot + word + tooltip) and i18n keys

State is derived client-side from compute_status.provider_validation
(error_message + last_check_time): pending / connected / failed. The
failure message from the API is rendered directly (no client-side code map).

These phases are API-independent and degrade to Pending until the backend
(temporalio/api#810, temporalio/temporal#10778) lands. List/details wiring
and the configurable Latest Version column are follow-ups.
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jul 6, 2026 4:38pm

Request Review

@temporal-cicd

temporal-cicd Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

📊 Strict Mode: 4 errors in 3 files (0.4% of 891 total)

src/lib/stores/configurable-table-columns.ts (1)
  • L296:51: Property 'name' does not exist on type 'INamespaceInfo | null | undefined'.
src/lib/utilities/connection-status.ts (1)
  • L57:6: Argument of type 'ITimestamp | undefined' is not assignable to parameter of type 'ValidTime'.
src/lib/components/deployments/compute-badge.svelte (2)
  • L31:16: 'config' is possibly 'undefined'.
  • L32:8: 'config' is possibly 'undefined'.

Generated by 🚫 dangerJS against a58bd28

…174)

Phase 3-4 of DT-4174.

List page: replace the Latest Version column with a composite Current
Version cell (build ID + compute + connection badge); show No Current
Version when there is no current version. Latest Version as an optional
column is a follow-up.

Details page: add a Connection column to the versions table, shown for
Current/Ramping/Draining versions and an em dash otherwise. All new UI is
behind the serverScaledDeployments capability; the validate-connection
flow is unchanged.
Self-managed (non-serverless) deployments have no compute provider, so a
connection indicator is meaningless for them. Gate the ConnectionBadge on
the compute provider being present: the list Current Version cell shows it
alongside the compute badge, and the versions table shows an em dash when
there is no compute config. Found via local testing against a self-managed
worker deployment.
…174)

- List Current Version cell renders the connection dot + word inside the
  compute pill (Lambda • Connected) instead of as a separate badge, per design
- ComputeBadge accepts children so the connection can be composed inside it
- Rename the versions-table lifecycle column header to Lifecycle
…lumn (DT-4174)

- Shrink the in-pill status dot (size-2 -> size-1.5) and shrink-0 so it stays
  small and vertically centered next to the label, matching the design
- Add showDot prop to ConnectionBadge (default off); the list pill opts in, the
  details Connection column renders the word only
Move the connection rendering into ComputeBadge via a computeStatus prop so
the icon, label, status dot, and status word are direct flex children of one
pill (Lambda • Connected), with the tooltip on the pill. ConnectionBadge is
now the word-only badge used by the details Connection column.
Showcases the composite pill across providers x Connected/Failed/Pending,
compute-only (self-managed), and the details word-only ConnectionBadge.
- Connection colors use design tokens (text-success/text-danger/text-subtle)
  instead of raw green/red; the in-pill dot uses bg-current so it matches
- Add Storybook play() render assertions for each connection scenario
  (Lambda/Cloud Run x Connected/Failed/Pending, compute-only), runnable via
  pnpm stories:test
The on-demand Validate Connection API is a dry-run and does not persist to
compute_status, so it does not update the connection badge. Remove the
implication that it does.
Both ComputeBadge (list pill) and ConnectionBadge (details column) duplicated
the state->color map, state->label, and tooltip-text logic. Move them to
connection-status.ts (connectionStateColor, connectionStateLabel,
connectionTooltip) so there is a single source of truth; the components are
now thin presentational shells.
{#snippet pill()}
<div
class="inline-flex min-w-24 items-center justify-center gap-2 border border-subtle px-1"
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'config' is possibly 'undefined'.

<div
class="inline-flex min-w-24 items-center justify-center gap-2 border border-subtle px-1"
>
<Icon name={config.icon} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'config' is possibly 'undefined'.

connection-tooltip-connected and connection-tooltip-failed-checked were the
same string ('Checked {{ time }}'). Replace both with a single state-neutral
connection-tooltip-checked key used by connectionTooltip for the connected
and failed states.
formatConnectionCheckTime previously returned hardcoded English (date-fns
output + a literal 'less than an hour ago'). Replace with translate keys
(connection-checked-recently/-hour/-hours) and a manual hour calc, dropping
the date-fns dependency from this helper. Output is unchanged for the
existing states.
return translate('deployments.connection-tooltip-pending');
}
const checked = translate('deployments.connection-tooltip-checked', {
time: formatConnectionCheckTime(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'ITimestamp | undefined' is not assignable to parameter of type 'ValidTime'.

@rossnelson rossnelson marked this pull request as ready for review July 2, 2026 14:21
@rossnelson rossnelson requested a review from a team as a code owner July 2, 2026 14:21
* Add Latest Version optional column to Deployments list (DT-4174)

The second half of DT-4174. Latest Version is an opt-in, hidden-by-default
column on the Worker Deployments list, toggled via the table's
configurable-columns drawer (the same control Workflows/Schedules/Activities
use).

- Extend the configurable-table-columns store with a DEPLOYMENTS table type:
  DEFAULT_DEPLOYMENTS_COLUMNS (Deployment, Current Version, Created At) with
  Latest Version as an available/hidden column, a namespace-scoped
  persistStore, and availableDeploymentColumns.
- Source the deployments list columns from the store, translate labels for
  the header, and add the footer gear + reused drawer.
- The Latest Version cell renders build ID, lifecycle status, and compute
  provider, with no connection indicator (connection stays on Current
  Version). Shows 'Same as Current' when the latest version equals the
  current one, and an em dash when there is no latest version.
- Gate the drawer's custom search attributes section off for deployments so
  it does not show an irrelevant empty section (workflows/schedules/
  activities are unaffected).

* Tighten deployment list version cells (DT-4174)

Match the design for the Current and Latest Version cells on the deployments
list:

- Remove the min-w-32 on the build-ID container so the compute badge sits
  next to the build ID instead of leaving a large gap for short IDs.
- Drop the copy button from the build-ID cells (not shown in the design); the
  deployment name keeps its copy button.
Resolve configurable-table-columns.ts conflict by keeping both the new
DEPLOYMENTS table type (this branch) and the NEXUS_OPERATIONS table type
(main): both table types coexist across TABLE_TYPE, defaults, persisted
stores, the derived columns map, available-column helpers, and the
default/persisted switch statements.
@rossnelson rossnelson changed the title Add connection status foundation for deployments (DT-4174) Add connection status and optional Latest Version column to deployments (DT-4174) Jul 2, 2026
Drop the compute-badge story to check whether it is the source of the
Chromatic UI Tests failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant