Skip to content

Phase 3 — Action row redesign (started-ago, status text, pie dot) #285

@eonist

Description

@eonist

Part of #269

Goal

Update each action row in PopoverMainView to match the new field order and content from the spec:

● abc1234  Deploy Prod    2m ago   1:34  3/3   SUCCESS     >
✕ pqr678e  Integration   25m ago   3:12  4/5   FAILED      >
◑ ghi789b  Build App      1m ago   0:45  2/4   IN PROGRESS >

Changes

ActionGroup.swift

Add a startedAgo computed property:

var startedAgo: String {
    guard let start = firstJobStartedAt ?? createdAt else { return "" }
    let sec = Int(Date().timeIntervalSince(start))
    if sec < 60 { return "\(sec)s ago" }
    let m = sec / 60
    if m < 60 { return "\(m)m ago" }
    return "\(m / 60)h ago"
}

Add a statusLabel computed property:

var statusLabel: String {
    switch groupStatus {
    case .inProgress: return "IN PROGRESS"
    case .queued:     return "QUEUED"
    case .completed:
        switch conclusion {
        case "success":   return "SUCCESS"
        case "failure":   return "FAILED"
        case "cancelled": return "CANCELED"
        case "skipped":   return "SKIPPED"
        default:          return "DONE"
        }
    }
}

PopoverMainView.swift

Replace the action row HStack fields:

  • Remove currentJobName conditional text (80 pt wide field)
  • Add Text(actionGroup.startedAgo) after the title
  • Replace status display with Text(actionGroup.statusLabel) — right-aligned, fixed width ~80 pt
  • Replace plain Circle().fill() dot with PieProgressView from Phase 1
    • progress = group.jobsTotal > 0 ? Double(group.jobsDone) / Double(group.jobsTotal) : 0
    • color = actionDotColor(for: group) (existing helper, unchanged)

Field order in HStack

PieDot · SHA/label · Title · startedAgo · elapsed · jobProgress · statusLabel · chevron

Notes

  • Status text must read "IN PROGRESS" not "Running" or "In progress" (per spec comment)
  • statusLabel width: frame(width: 80, alignment: .trailing) to keep column-like alignment
  • startedAgo width: frame(width: 44, alignment: .trailing)

Acceptance criteria

  • All 7 fields present in the correct order
  • IN PROGRESS / SUCCESS / FAILED / CANCELED status text displayed
  • startedAgo shows relative time (e.g. "2m ago")
  • Pie dot replaces plain circle dot
  • Row still fits at 420 pt with no truncation of critical fields
  • > chevron at far right

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