Created
Jul 06, 01:19
Started
Jul 06, 01:20
Completed
Jul 06, 05:02
DevOps handoff
Type
Feature
Shape
ui+db
Worktree Slug
live-activities-via-websockets
Repositories
mcritchie-studio
Release Slug
—
Branch
feat/live-activities-via-websockets
Acceptance Criteria
Expected Test Plan
Checks Run
Agent Context
Add live websocket updates to /agents/activities (AgentsController#activities, shipped in #405, now on release). Requirements: (1) AgentActivity created -> prepend its row (tbody) to the top of the feed (newest-first). (2) AgentActivity updated -> replace that activity's tbody in place. (3) AgentAction created -> append its action row into its parent activity's drill-down (if that activity is on the page). (4) AgentAction updated -> replace that action row. (5) A brief flash animation when an activity OR action is UPDATED (not necessarily on create). Operator: do NOT try to maintain the 10-per-page pagination count on live inserts — the websocket is purely ADDITIVE (new items just get added; page can exceed 10 live). Follow the app's existing live-update pattern: /deployments uses Turbo Stream broadcasts + LiveBoardFx JS for animations (see feedback_live_board_animation_gotchas, feedback_live_partial_dual_render_paths). Use turbo-rails Turbo::Streams broadcasts from the AgentActivity/AgentAction models (after_create_commit / after_update_commit) targeting a stream the page subscribes to via turbo_stream_from. Reuse the existing agents/_activities_table row partials so the broadcast renders the SAME markup (dual render paths must match). Flash = a short CSS keyframe on the replaced row. Mind table/tbody Turbo Stream targeting (templates + table elements are finicky). Shape ui+db (model broadcast callbacks + UI subscription). Tests: model broadcast on create/update, view subscribes, partial renders.
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.
Conversation
QA review feedback, agent handoffs, and follow-up notes for this task.
Scout report: request-changes - Boundary close path skips the live activity update broadcast. Reporter: carl Outcome: request-changes Findings: - Blocker: bin/agent-activity next sends prior_outcome through the create endpoint, but AgentActivity.open_activity! closes the previous row with update_all, bypassing the after_update_commit broadcaster; the previous activity can stay open on the live feed and never flash. Questions: - The page subscribes to a global agents_activities stream even when session filters are active; confirm additive out-of-filter inserts are acceptable or scope/drop them client-side. Checks: - Read AGENTS.md, Avi pr-review SOP, shared pr-review SOP, README, RUNBOOK, ECOSYSTEM, and relevant frontend/testing/routes/data-model docs. - Inspected PR #412 body, diff, changed files, tests, and task metadata; acceptance explicitly requires activity updates to replace rows live and flash. - GitHub reports PR #412 merged to release at 85c8c50 with scan_ruby, scan_js, lint, and test all passing. - Merge safety: changed files are activity-feed/broadcaster/test scoped, and open release PRs #379, #363, and #361 do not overlap these files.
Scout report: merge-ready - Light UI review: live Turbo stream path matches the acceptance criteria; no blocking defects found. PR #412 was already merged and the task assembled before this scout report. Reporter: shannon Outcome: merge-ready Findings: - No blocking UI defects found in the activity/action create-update stream path. - Non-blocker follow-up: the global agents_activities stream can insert new activities into filtered or older pages because the activity insert target is page-global; acceptable for this additive scope, but revisit if filtered live views must stay strict. - Process note: DoR now refuses the PR only because #412 is already merged; the recorded full-suite/rubocop fingerprint matches the PR head tree. Questions: - none Checks: - Read AGENTS.md, Avi pr-review SOP, shared PR-review module, README, ECOSYSTEM, frontend/testing/routes docs, and Shannon role/soul. - Reviewed task metadata, PR body, diff, changed files, CI, DoR state, and open-PR overlap; no same-file merge conflict risk found. - Focused Rails check passed: bin/rails test test/services/activities_broadcaster_test.rb test/integration/agents_activities_test.rb (22 runs, 98 assertions). - Local URL http://localhost:3014/agents/activities returned 200 and rendered the Turbo subscription plus stable activity/action DOM ids.
Avi pr-review verdicts landed after operator merge (PR #412 merged to release by amcritchie 02:08:45Z, task assembled mid-wave). Primary carl: request-changes — open_activity! update_all bypasses after_update_commit broadcaster, prior row never updates live. Light shannon: merge-ready, no blockers. Not dragging assembled work back; defect filed as follow-up bug task fix-boundary-close-broadcast (https://mcritchie.studio/tasks/fix-boundary-close-broadcast). Rides current release as-is.
Sealed-bid sizing
Edit →Alex (PM)
—
Avi (PO)
MEDIUM
Dev
MEDIUM
Actual
XL
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.