fix(bud): show "Run estimation" button when no estimates exist yet - #189
Merged
Conversation
… 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>
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.
Summary
create_budtool, the caller suppliesrequirements_mddirectly, so the PRD agent never runs. The PRD agent's completion handler inbackend/app/services/agent_result_handlers.py::handle_prd_resultis the only path that callsestimate_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.BUDEstimateTimeline.vuethat emits the samerecalculateevent the populated header already uses. The button reuses the existingrecalculatingprop for its loading spinner — no new store action, composable wiring, or endpoint.POST /v1/buds/{id}/estimates/recalculaterunsestimate_bud_dateswith no precondition on prior snapshots, so it is first-run safe.Test plan
create_budtool with non-emptyrequirements_md.npx vue-tsc --noEmitis clean.