Skip to content

fix(bud): show "Run estimation" button when no estimates exist yet - #189

Merged
mickyarun merged 1 commit into
mainfrom
fix/bud-estimate-empty-state-button
Jun 2, 2026
Merged

fix(bud): show "Run estimation" button when no estimates exist yet#189
mickyarun merged 1 commit into
mainfrom
fix/bud-estimate-empty-state-button

Conversation

@mickyarun

Copy link
Copy Markdown
Owner

Summary

  • When a BUD is created via the remote MCP create_bud tool, the caller supplies requirements_md directly, so the PRD agent never runs. The PRD agent's completion handler in backend/app/services/agent_result_handlers.py::handle_prd_result is the only path that calls estimate_bud_dates(trigger="prd_completed") for the first snapshot, so MCP-created BUDs land on the "No estimates yet" empty state with no way to populate it from the UI.
  • Surface a manual "Run estimation" button in the empty-state branch of BUDEstimateTimeline.vue that emits the same recalculate event the populated header already uses. The button reuses the existing recalculating prop for its loading spinner — no new store action, composable wiring, or endpoint.
  • No backend change: POST /v1/buds/{id}/estimates/recalculate runs estimate_bud_dates with no precondition on prior snapshots, so it is first-run safe.

Test plan

  • Create a BUD via the remote MCP create_bud tool with non-empty requirements_md.
  • Open the BUD in the UI; the Estimates section should show "No estimates yet" with a "Run estimation" button.
  • Click the button; spinner should appear, then the populated stepper + range bar render with the first snapshot.
  • Existing populated-state Recalculate button still works on an already-estimated BUD (no regression).
  • npx vue-tsc --noEmit is clean.

… BUDs

When a BUD is created via the remote MCP `create_bud` tool, the caller
supplies `requirements_md` directly, so the PRD agent never runs. The
PRD agent's completion handler is the only place that triggers the first
`estimate_bud_dates` snapshot, so MCP-created BUDs land on the
"No estimates yet" empty state with no way to populate it from the UI.

Surface a manual "Run estimation" button in the empty-state branch of
`BUDEstimateTimeline.vue` that emits the same `recalculate` event the
populated header already uses. The existing
`POST /v1/buds/{id}/estimates/recalculate` endpoint is first-run safe;
no backend change required.

Signed-off-by: Arun Rajkumar <mickyarunr@gmail.com>
@mickyarun
mickyarun merged commit 8538cad into main Jun 2, 2026
14 checks passed
@mickyarun
mickyarun deleted the fix/bud-estimate-empty-state-button branch June 2, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant