v0.21.0 — feature 007: live flow view, scout %, init PR toggle, artifact copy
Highlights
Live flow view survives TDD + worktree (US1)
- New
bender event emitatomic helper (O_APPEND | O_SYNC+ fsync) with Bash and PowerShell fallbacks (.specify/scripts/{bash,powershell}/event-emit.*) — skills call this instead ofprintf >> events.jsonl, so fsnotify-based tails see one write per event and the viewer no longer freezes on batched subagent output. internal/workflow.Resolve+bender workflow resolve --key <branch>link consecutive sessions (e.g./tdd→/ghu) into one workflow.state.jsongains optionalworkflow_id+workflow_parent_session_id(additive; schema version unchanged).- Server:
GET /api/workflows/{id}+GET /api/workflows/{id}/streammerge SSE from every session in the workflow and pick up new sessions that join the workflow mid-stream (1s poll cadence). - UI:
pickLiveWorkflowId+LiveProjectFlownow subscribe to the workflow stream when aworkflow_idis known; single-session subscription remains the fallback.
Scout % reflects real progress (US2)
/ghuSKILL emitsorchestrator_progressasround(100 * completed_nodes / total_nodes)on every DAG transition, replacing the baseline points table.bg-scout-*skills emit per-sub-stepagent_progressticks so the per-agent bar advances even between DAG nodes.ProgressBar.tsxenforces monotonic non-decreasing bars and surfacescompleted/total nodesin the dial tooltip.
bender init "open PR on success" toggle (US3)
- New huh confirm prompt added to the init form; answer persists to
.bender/selection.yamlunderpreferences.open_pr_on_success. - Prior value is honored as the default on re-run (FR-012).
- New
prextension withafter_implementhook: bash/PowerShell scripts check preference + session status, then shell tobender session pr. Adapter failures never fail the implement run (FR-013). internal/pr.RunForSession(ctx, SessionRunOptions)exposes PR invocation as a library call for hook and test parity.
Click-to-copy buttons next to event JSON (US4)
- New
CopyButtoncomponent +copyTexthelper inui/src/client/lib/clipboard.ts— prefersnavigator.clipboard, falls back to a hidden-textareaexecCommand('copy')in non-secure contexts. - Wired next to every event's raw-JSON toggle in
EventRow.tsx.
Upgrade notes
All schema changes are additive:
state.json— new optionalworkflow_id,workflow_parent_session_idfields..bender/selection.yaml— new optionalpreferences:block.events.jsonl— unchanged envelope; only emission path changes.
Old sessions load unchanged; new UI degrades gracefully when workflow_id is missing.
CLI additions
bender event emit --session … --type … --actor-kind … --actor-name … --payload … [--sessions-root …]bender workflow resolve --key <branch>bender worktree create --workflow-id <id> --workflow-parent <parent-id> <session-id>
Tests
- New Go tests:
internal/event/emit_test.go,cmd/bender/event_test.go,internal/session/state_workflow_test.go,internal/workflow/link_test.go,internal/pr/session_runner_test.go. - New integration tests:
event_emit_parity,workflow_linkage,flowview_worktree,scout_progress,after_implement_pr,init_pr_preference. - New UI tests:
clipboard,copy-button,progress-bar,project-flow.