Agents Builders

Stage-change status badge

Archived
stage-change-status-badge

Created

Jul 02, 16:52

Started

Jul 02, 16:55

Completed

Jul 02, 17:47

DevOps handoff

Type

Feature

Shape

ui+db

Worktree Slug

stage-change-status-badge

Repositories

mcritchie-studio

Release Slug

Branch

feat/stage-change-status-badge

ui

Acceptance Criteria

  • Bullet separates status badge and action count
  • Stage-change span shows target-stage badge
  • Non-transition spans keep done or open badge

Expected Test Plan

  • unit
  • integration

Checks Run

  • [unit] transition-in-window badges target stage; label+scheme reuse board palette (heartbeat_helper_test)
  • [unit] last in-window transition wins; outside-window/no-slug/no-map fall back to done/open
  • [component] event_table renders bullet separator between status badge and action count
  • [component] stage-change span renders board .badge pill (Submitted); replaces done; no-match keeps done
  • [integration] in-window transition badges new stage; intent (non-transition) does not restage
  • [integration] stage transitions bulk-load in ONE task_events query for all spans (no N+1)
  • [e2e] npx playwright test e2e/alex_heartbeat.spec.js — new bullet+stage-change-badge spec PASSES green (seed adds an in-window transition)
  • [full-suite@9b8a2ff5536a97793656e08e05a309ab815cbfe0] bin/rails test green
  • [rubocop@9b8a2ff5536a97793656e08e05a309ab815cbfe0] bin/rubocop clean

Agent Context

Two changes to the heartbeat Status/Task cell. (1) BULLET: in the hb-satline (the status-badge + action-count row), put a bullet separator between them, e.g. 'DONE · 1 action'. (2) STAGE-CHANGE BADGE: when a span corresponds to a task STAGE CHANGE, the status badge should show the STAGE THE TASK CHANGED TO (styled as that stage's board badge/color) instead of the generic DONE. DETECTION: cross-reference TaskEvent (app/models/task_event.rb — append-only stage spine; fields task_slug, from_stage, to_stage, kind [transition|intent], occurred_at; indexed on task_slug+occurred_at). For a span (AtomicEvent) that has a task_slug and window opened_at..closed_at, find a kind='transition' TaskEvent for that task_slug whose occurred_at falls in the window; if found, the badge = the LAST such to_stage, humanized + colored with the STAGE's board badge styling (reuse the existing stage badge helper/colors the /tasks + /deployments board use — find it, e.g. a Task stage color/label helper). Load transitions in BULK for the visible spans' task_slugs (group by task_slug, no N+1) in heartbeat_controller#show + #all_spans, pass to heartbeat_span_status_meta (or a new helper) which returns the stage badge when a transition matches, else the current open/done badge. Preview on 3001 for the operator before handoff (leave the stack up). See project_task_event_timeline_2026_06_22, project_opsd_learning_layer.

Stage Timeline

Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. means the agent didn't report that metric.

Sizing Avi · PO SMALL Dev SMALL Actual XL ≠ forecast
  1. Created Designed
    C Caterpie
    Caterpie
    Model
    Duration
    Tokens
    Cost
    Completed Jul 02, 16:52 · 6 days ago
    api
  2. Designed Building
    C Caterpie
    Caterpie
    Model
    claude-opus-4-8
    Duration
    2 minutes
    Tokens
    9,762,426
    Cost
    ~$6.11
    Started Jul 02, 16:52
    Completed Jul 02, 16:55 · 6 days ago
    cli
  3. Building Submitted
    C Caterpie
    Caterpie
    Model
    claude-opus-4-8
    Duration
    36 minutes
    Tokens
    16,443,577
    Cost
    ~$8.60
    Started Jul 02, 16:55
    Completed Jul 02, 17:31 · 6 days ago
    cli
  4. Submitted Reviewed Review Activity
    C Carl
    Carl primary
    S Shannon
    Shannon light
    Model
    claude-opus-4-8
    Duration
    1 minute
    Tokens
    2,485,353
    Cost
    ~$1.39
    Started Jul 02, 17:31
    Completed Jul 02, 17:32 · 6 days ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    under a minute
    Tokens
    2,487,231
    Cost
    ~$1.31
    Started Jul 02, 17:32
    Completed Jul 02, 17:33 · 6 days ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    14 minutes
    Tokens
    9,130,971
    Cost
    ~$4.65
    Started Jul 02, 17:33
    Completed Jul 02, 17:47 · 6 days ago
  7. Shipped Archived
    Model
    Duration
    1 day
    Tokens
    Cost
    Started Jul 02, 17:47
    Completed Jul 04, 03:23 · 4 days ago

Conversation

QA review feedback, agent handoffs, and follow-up notes for this task.

No task feedback has been recorded yet.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

XL