Agents Builders

Order Session Filter Recency

Archived
order-session-filter-recency

Created

Jul 07, 19:58

Started

Jul 07, 19:58

Completed

Jul 07, 22:41

DevOps handoff

Type

Feature

Shape

ui-only

Worktree Slug

order-session-filter-recency

Repositories

mcritchie-studio

Release Slug

Branch

feat/order-session-filter-recency

QA URL

Production URL

activities-feed telemetry-ui

Acceptance Criteria

  • Filter lists sessions by most-recent activity first
  • Each session row shows a compact last-active time
  • Activity-only sessions stay listed, never dropped

Expected Test Plan

  • [component] filter partial renders time and order

Checks Run

  • [component] test/views/agents_activities_filter_test.rb green (recency label + order)
  • [integration] test/integration/agents_activities_test.rb green (sidebar order + activity-only kept)
  • [unit] test/helpers/application_helper_test.rb green (compact_time_ago edges)
  • [full-suite@c827cb2ad4b01ecfc7be964a607dbc49b8857759] bin/rails test green
  • [rubocop@c827cb2ad4b01ecfc7be964a607dbc49b8857759] bin/rubocop clean

Agent Context

Activities session-filter (/agents/activities) polish. Sort source: app/controllers/concerns/activity_feed.rb:34-70 session_filter_options — currently sorts by max(AgentAction.occurred_at, AgentActivity.opened_at) desc (lines 36-38); each option already carries last_at (line 66) but the panel (app/views/agents/_activities_filter.html.erb:23-41) renders only the activity COUNT, never a timestamp, so recency is invisible (e.g. Clefairy '0 activities' sits high on recent raw actions). Change: key ordering strictly on latest action, and RENDER a relative last-active time (e.g. '2m ago') per row so the newest-first order is legible. No persistence.

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
    L Larvitar
    Larvitar
    Model
    Duration
    Tokens
    Cost
    Completed Jul 07, 19:58 · about 16 hours ago
    api
  2. Designed Building
    L Larvitar
    Larvitar
    Model
    claude-opus-4-8
    Duration
    under a minute
    Tokens
    1,034,245
    Cost
    ~$0.68
    Started Jul 07, 19:58
    Completed Jul 07, 19:58 · about 16 hours ago
    cli
  3. Building Submitted
    P Pupitar
    Pupitar
    Model
    claude-opus-4-8
    Duration
    about 2 hours
    Tokens
    21,295,910
    Cost
    ~$19.52
    Started Jul 07, 19:58
    Completed Jul 07, 22:05 · about 14 hours ago
    cli
  4. Submitted Reviewed Review Activity
    S Shannon
    Shannon primary
    J Jasper
    Jasper light
    Model
    claude-opus-4-8
    Duration
    7 minutes
    Tokens
    1,972,133
    Cost
    ~$1.44
    Started Jul 07, 22:05
    Completed Jul 07, 22:13 · about 14 hours ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    11 minutes
    Tokens
    9,267,330
    Cost
    ~$9.35
    Started Jul 07, 22:13
    Completed Jul 07, 22:24 · about 14 hours ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    17 minutes
    Tokens
    4,238,499
    Cost
    ~$2.69
    Started Jul 07, 22:24
    Completed Jul 07, 22:41 · about 14 hours ago
  7. Shipped Archived
    Model
    Duration
    about 8 hours
    Tokens
    Cost
    Started Jul 07, 22:41
    Completed Jul 08, 06:32 · about 6 hours ago

Conversation

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

Comment jasper about 14 hours ago

Scout report: merge-ready - Light read: tight ui-only recency polish; description matches diff, no unrelated churn, well-covered across helper/component/integration tiers. Two nits, no blockers. Reporter: jasper Outcome: merge-ready Findings: - NIT: compact_time_ago renders '0m ago' for the 45-59s window (just-now cutoff 45s vs minute floor 60s); bumping the just-now threshold to 60s closes it. - NIT: helper comment and PR blurb say '(s/m/h/d/w)' but no seconds unit is ever emitted — smallest output is 'just now'. Questions: - none Checks: - Verified activity_feed.rb builds last_at as the MAX-merge union of AgentAction.occurred_at and AgentActivity.opened_at (union sort intact; activity-only sessions retained). - Integration test hits real path and asserts '2m ago' renders + newest-first order — confirms session[:last_at] is populated in production, label is not dead.

Comment shannon about 14 hours ago

Scout report: merge-ready - ui-only recency label: correct, in-scope, union sort preserved w/ regression test; gate green by tree-equality+CI (dor-check STALE is the known false positive from the release checkout). One cosmetic nit: 45-59s window renders '0m ago'. Reporter: shannon Outcome: merge-ready Findings: - NIT app/helpers/application_helper.rb:369 — compact_time_ago 'just now' cutoff is 45s but the minutes branch floor-divides, so 45-59s renders '0m ago'. Fix: return "#{[seconds/60,1].max}m ago" (or bump cutoff to 60). - GOOD union sort untouched: activity-only sessions kept via times.merge(...){max}; regression test present (integration). Questions: - none Checks: - Gate MET: PR head e3dacce0 tree c827cb2ad4b0 == recorded cert tree; CI test/lint/scan_js/scan_ruby all green on head. dor-check STALE = known false positive (review checkout on base release). - Tests span 3 tiers: unit (helper edge cases), integration (order + activity-only kept), component (new filter view test). Theme parity via reused --hb-muted token, no hardcoded color.

Handoff avi about 14 hours ago

Avi review approved (2/2 merge-ready) — ready for Steffon's qa-release sweep. PRIMARY shannon (deep) + LIGHT jasper (light) both approve; CI green on #449 (test/lint/scan_ruby/scan_js). DoR gate genuinely met: head e3dacce0 tree c827cb2ad4b0 == recorded cert tree (dor-check STALE was the known tree-hash false positive). Inclusive union sort verified untouched (activity-only sessions kept, regression-tested); theme parity via --hb-muted; 3-tier coverage. One non-blocking nit both caught: compact_time_ago renders '0m ago' for the 45-59s window (just-now cutoff 45s vs 60s minute floor) — cosmetic, fold into a follow-up push if convenient, not a gate.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

XL