Agents Builders

Filter activities by session

Archived
filter-activities-by-session

Created

Jul 05, 20:31

Started

Jul 05, 20:31

Completed

Jul 05, 22:13

DevOps handoff

Type

Feature

Shape

ui-only

Worktree Slug

filter-activities-by-session

Repositories

mcritchie-studio

Release Slug

Branch

feat/filter-activities-by-session

QA URL

Production URL

ui,heartbeat,read-only

Acceptance Criteria

  • Add session picker to All Activities page
  • Default view shows all sessions unfiltered
  • Selecting a session filters the activity list
  • Pager links preserve the active session filter

Expected Test Plan

  • component

Checks Run

  • [component] bin/rails test test/integration/heartbeat_all_spans_test.rb — ?session_id= filters rows, mascot picker, pager preserves filter (12 runs green)
  • [full-suite@56e108df7f613c382e7b43d6e982bd325bb89a8c] bin/rake test test:system green
  • [rubocop@56e108df7f613c382e7b43d6e982bd325bb89a8c] bin/rubocop clean

Agent Context

Add an optional session filter to /alex/heartbeat/activities (heartbeat#all_activities). The per-session show page already has an inline session dropdown (form_with url: alex_heartbeat_path -> select_tag :session_id + options_for_select(@sessions,@session_id), auto-submits on change). all_activities currently sets no @sessions and never reads params[:session_id]; it lists ALL AgentActivity newest-first, paginated 100/page. Change: controller reads @session_id = params[:session_id].presence, chains the existing AgentActivity.for_session(@session_id) scope onto the scope when present, and sets @sessions = session_options (the same private method show uses). View: render the session form in .hb-toolbar pointed at heartbeat_all_activities_path with a leading 'All sessions' blank option (default here is unfiltered, unlike show which defaults to latest session), and thread session_id through the two pager link_to heartbeat_all_activities_path(page:) calls. Test tier: component/request spec hitting the page with and without ?session_id= asserting the filter narrows rows.

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
    P Porygon
    Porygon
    Model
    Duration
    Tokens
    Cost
    Completed Jul 05, 20:31 · 3 days ago
    api
  2. Designed Building
    P Porygon
    Porygon
    Model
    claude-opus-4-8
    Duration
    under a minute
    Tokens
    816,505
    Cost
    ~$1.23
    Started Jul 05, 20:31
    Completed Jul 05, 20:31 · 3 days ago
    cli
  3. Building Submitted
    P Porygon
    Porygon
    Model
    claude-opus-4-8
    Duration
    21 minutes
    Tokens
    14,942,404
    Cost
    ~$13.19
    Started Jul 05, 20:31
    Completed Jul 05, 20:52 · 3 days ago
    cli
  4. Submitted Reviewed Review Activity
    S Shannon
    Shannon primary
    A Alex
    Alex light
    Model
    claude-opus-4-8
    Duration
    12 minutes
    Tokens
    4,583,613
    Cost
    ~$3.30
    Started Jul 05, 20:52
    Completed Jul 05, 21:04 · 3 days ago
    cli
  5. Evolve
    P Porygon
    Porygon
    P Porygon2
    Porygon2
    triggered by
    S Shannon
    Shannon
    Model
    Duration
    12 minutes
    Tokens
    Cost
    Started Jul 05, 20:52
    Completed Jul 05, 21:04 · 3 days ago
  6. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    37 minutes
    Tokens
    5,451,772
    Cost
    ~$4.19
    Started Jul 05, 21:04
    Completed Jul 05, 21:41 · 3 days ago
  7. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    32 minutes
    Tokens
    Cost
    Started Jul 05, 21:41
    Completed Jul 05, 22:13 · 3 days ago
  8. Shipped Archived
    Model
    Duration
    about 4 hours
    Tokens
    Cost
    Started Jul 05, 22:13
    Completed Jul 06, 01:45 · 2 days ago

Conversation

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

Handoff avi 3 days ago

Avi review approved (Shannon primary + Alex light): all 4 acceptance criteria met — session picker added to All Activities toolbar, default unfiltered (params[:session_id].presence), for_session scope filters, and BOTH pager links thread session_id (test-locked). Reuses the #show picker idiom (session_options/for_session already in release), no N+1, no new CSS, no Alpine gotchas, terminology current, CI green. Ready for Steffon's qa-release sweep.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

XL