flower
/
All briefs
complete draft note flower
epic · Notes for the /roster view: 1) Let's add a 'Go to r...

Roster: live updates via broadcast on check-in

canonical · plan

Spec

markdown

hand-off · dispatch

Dispatch

Auto-dispatch

when it reaches planned

Design-loop

design pass before build

This brief is complete — dispatch is closed.

provenance · append-only

Trace

live
or paste a screenshot uploading…
  1. link added 2d ago
    agent · system:commit-trailer
  2. participant joined 2d ago
    system · system:commit-trailer
  3. status change 3d ago
    agent · flower-orchestrator
  4. note added 3d ago

    Build complete on branch flower/roster-live-broadcast — commit 68c6fc9 (Brief: #75 trailer). NOT merged, NOT pushed (orchestrator merges). Files (9, +325/-1): - app/Events/DaemonCheckedIn.php (new) — ShouldBroadcast on PrivateChannel('roster'); broadcastWith() reuses DaemonRosterService::daemonPayload() so the wire shape == the roster view's row shape. - app/Services/DaemonRosterService.php — checkin() (single choke point for the artisan cmd + MCP tool) dispatches DaemonCheckedIn AFTER the row saves, via a guarded broadcastCheckin() try/catch(Throwable)→Log::warning. Best-effort at two layers: this guard + the existing driver-level BestEffortPusherBroadcaster. A broadcast failure can never fail a check-in. - routes/channels.php — authorize the 'roster' private channel (open, like briefs.*). - app/Livewire/Roster/Index.php — getListeners() ⇒ echo-private:roster,.DaemonCheckedIn → thin onDaemonCheckedIn(); the Livewire round-trip re-renders and render() re-pulls the roster (re-derives liveness/context). Same pattern as Briefs/Show + Rooms/Show. - app/Livewire/Projects/Show.php + resources/views/livewire/projects/show.blade.php — READ-ONLY daemon display (role + liveness badges, context%/pending, proc) enriched via the same DaemonRosterService, with a "Roster ↗" link to route('roster.index', ['project'=>slug]). Hidden when the project has no daemons; no action buttons. CLIENT-SIDE ECHO WIRING: DONE, no JS changes needed. resources/js/app.js already constructs window.Echo (reverb, gated on VITE_REVERB_APP_KEY). Livewire auto-subscribes to the echo listeners declared in getListeners() — identical to the existing Briefs/Show + Rooms/Show live listeners. Channel: private 'roster'; event name matched as the FQCN leading-dot literal (.App\Events\DaemonCheckedIn). Graceful degrade: Reverb down ⇒ listener never fires, poll/manual refresh still work. A getListeners() assertion test locks the channel+event+handler mapping. Design choices worth a glance on merge: - Single GLOBAL private 'roster' channel (not per-project). The roster view always wants every check-in (it re-pulls the whole roster on any event); per-project channels would force the "all projects" view to fan-subscribe. Payload carries project id/slug so a future per-row client update is possible without a channel change. - projects.show daemon display is intentionally NOT live (spec = read-only + link to /roster). Easy to make live later by adding the same getListeners() there. Tests (sqlite, Event::fake / no live socket): checkin broadcasts DaemonCheckedIn on private-roster with the daemonPayload shape; a throwing subscriber does NOT fail the check-in (row persists); roster getListeners subscribes to the channel; project detail renders the read-only display + roster link, hides it when no daemons. Full run: php artisan test → 578 passed, 1 skipped (pre-existing), 0 failures, 4004 assertions. Pint clean on changed PHP. Deferred: none — all three tasks in scope shipped. Reminder for the orchestrator: after merge to master, reload Horizon the graceful way (php artisan horizon:terminate) so the new event/broadcast code is live; Reverb (proc 982) needs no change.

    agent · agent:flower-75-worker(proc-992)
  5. participant joined 3d ago
    system · agent:flower-75-worker(proc-992)
  6. status change 3d ago
    agent · flower-orchestrator
  7. parent set 3d ago

    Grouped under epic #66.

    agent · flower-orchestrator
  8. note added 3d ago

    Child of #66, maps note #9. Broadcast a Reverb event on daemon_checkin (the same checkin path #67 hardened) → live-update the daemon's row/state on /roster without a poll. Also add read-only daemon displays on the project detail view, with a link to /roster. Reverb already runs (proc 982). Rides on #67 (done). M.

    agent · flower-orchestrator
  9. participant joined 3d ago
    system · flower-orchestrator

epic · dependencies

Relationships

depends on

No dependencies — dispatchable once planned.

agents · waves

Participants

  • flower-orchestrator participant · active
  • agent:flower-75-worker(proc-992) participant · active
  • system:commit-trailer participant · active

trace · graph

Links

  • Commit #1596 execution

scope

Projects

  • flower · primary

dogfood · read-only

Agent’s-eye view

The literal recall_brief payload an agent gets — same service path as the MCP tool.