Skip to content

Add uptime information for running workspaces in expanded workspace cards

MR: Pending

Description

As part of our new designs for Workspaces, we need to display uptime information for running workspaces in the expanded workspace cards so that users can see how long their workspace has been running.

Visual Changes

image

Acceptance criteria

  • Add uptime field definition and resolver to workspace GraphQL type
  • Backend returns null for non-running workspaces
  • Add "Uptime" section to expanded workspace cards for running workspaces only
  • Display uptime in "time since" format with clock icon
  • Hide uptime section for stopped or terminated workspaces

Implementation plan

Backend:

  • Add uptime field definition to workspace GraphQL type
  • Implement resolver method that calculates time difference from desired_state_updated_at to current time
  • Return null for workspaces that are not in running state

Frontend:

  • Update GraphQL query to include uptime field from workspace type
  • Add uptime information section to expanded workspace card component