feat(goals): autopilot progress stepper on goal detail page#1146
Open
psdjungpulzze wants to merge 3 commits into
Open
feat(goals): autopilot progress stepper on goal detail page#1146psdjungpulzze wants to merge 3 commits into
psdjungpulzze wants to merge 3 commits into
Conversation
Add a four-stage autopilot lifecycle ribbon (Scoping → Building → Review → Delivered) to the top of the engine goal-detail surface, so a human can read at a glance where the daemon fleet is driving the goal. - New pure, client-bundle-safe derivation `deriveAutopilotProgress` (goal-autopilot.ts) ranks the in-flight stage from the SAME rollups the page already renders (status, in-flight planning task, completion, review-readiness / ready-to-deliver) — so the ribbon can never disagree with the badges + cards below it. Mirrors goal-ready.ts's single-predicate pattern. Accepted => all done; cancelled => stopped (reached stages done, rest upcoming, none current). - New presentational `GoalAutopilotStepper` re-using the task-progress-panel step vocabulary (done = green check, current = amber spinner, upcoming = muted ordinal). Re-renders for free on the detail client's live refetch. - Unit tests cover every stage transition + the two terminal states. No agent-config update needed: purely presentational, adds no tool, data, or workflow the PM agent surfaces. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eview→Deliver→Done) Review rework: the stepper merged Deliver and Done into one "Delivered" stage, and readyToDeliver was OR'd into reviewReady so a PR-ready, deploy-gate-passed goal rendered Review as current instead of Deliver. - goal-autopilot.ts: STEP_META now has 5 entries (scoping, building, review, deliver, done); AutopilotProgressInput carries reviewReady and readyToDeliver as distinct signals; activeStageIndex returns 3 (Deliver) on readyToDeliver, 2 (Review) on reviewReady/completion. Done is terminal (only "done" on accepted, never "current"). - engine-goal-detail-client.tsx: pass reviewReady (reviewReadiness.ready) and readyToDeliver separately instead of OR-ing them. - goal-autopilot-stepper.tsx: header comment updated to five stages. - goal-autopilot.test.ts: add Deliver scenario (Deliver=current/Review=done) and exactly-one-current test; update lifecycle-order + Review assertions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…test collision The presentational stepper renders every step's description unconditionally, so the Deliver step's 'Ready to deliver — waiting on your accept.' string matched queryByText(/ready to deliver/i) in three cue tests that assert the phrase is ABSENT on non-ready/accepted goals. Reword to 'Waiting on your accept-stamp to ship.' — same meaning, no verbatim cue phrase. Full suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a four-stage autopilot progress stepper to the top of the engine goal-detail surface: Scoping → Building → Review → Delivered. A human can now read at a glance where the daemon fleet is driving the goal, instead of inferring it from scattered badges.
![stages] done = green check · current = amber spinner · upcoming = muted ordinal
How
src/lib/engine/goal-autopilot.ts— new pure, dependency-free derivationderiveAutopilotProgress. It ranks the in-flight stage from the same rollups the page already renders (goal status, an in-flightplanningtask, completion, review-readiness / ready-to-deliver), so the ribbon can never disagree with the badges and rollup cards below it. Mirrorsgoal-ready.ts's single-predicate, client-bundle-safe pattern (no@/lib/dbimport).accepted⇒ every stagedone.cancelled⇒ autopilot stopped: reached stagesdone, the restupcoming, nonecurrent.goals/goal-autopilot-stepper.tsx— new presentational component re-using thetask-progress-panelstep vocabulary (done green / current amber / upcoming muted). Horizontal onsm+, stacked on mobile. Re-renders for free on the detail client's existing live refetch (it's just props).engine-goal-detail-client.tsx— derives the progress from the fields already in scope and renders the ribbon between the header and the rollup cards.Tests
goal-autopilot.test.ts— 8 cases covering every stage transition (scoping → building → review), the empty/unscoped goal, completion-without-explicit-review, and both terminal states (accepted, cancelled).npm run typecheckclean; eslint clean on all touched files; existinggoal-detail.test.tsstill green.Agent config
No PM-agent update needed — this is purely presentational and adds no tool, data, or workflow the agent surfaces (per CLAUDE.md's AI Agent Maintenance rule).
🤖 Generated with Claude Code