feat: show pipeline sub-stage on estimate status bar - #44
Open
ANTFOR7717 wants to merge 3 commits into
Open
Conversation
Reads Mastra's own workflow-run storage to derive which of the four pipeline stages (extraction, classification, enrichment, presentation) a processing estimate is on, and surfaces it in the status bar's label/tooltip in place of the generic "Processing" state.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
getEstimatePipelineSubStage() was reading state.steps[stepId] off the parent "Generate Estimate" run, but each stage is composed as a workflow-as-step and Mastra persists it as its own storage row (same runId, different workflow_name) rather than folding it into the parent's steps record. Confirmed against mastra_workflow_snapshot directly: the parent run's own steps never gained entries for any of the four stages, so this always returned null and the status bar just showed the generic pulsing "Processing" state for the whole duration. Now reads each stage's snapshot directly via workflowName. Also renders the four sub-stages as individual bar segments during processing instead of a single pulsing bar.
Replaces the nested 4-dot sub-stage bar with a direct remap of the existing 5 segments (Uploaded/Extracted/Analyzing/Pricing/Delivered) onto the real pipeline sub-stages, instead of bolting new UI onto the single "Processing" slot.
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
getEstimatePipelineSubStage(), a read-only helper that consults Mastra's own workflow-run storage to find which of the four pipeline stages (extraction, classification, enrichment, presentation) aprocessingestimate is currently on.EstimateStatusBarshows a stage-specific label/tooltip ("Extracting findings", "Classifying items", "Pricing materials & labor", "Finalizing estimate") instead of a flat "Processing" state.nullon any error (storage unreachable, run not found, unexpected shape), so a fault here can't break estimate status rendering.Test plan
tsc --noEmitpasses (already verified locally)processingestimate with no resolvable sub-stage falls back to the generic "Processing" label🤖 Generated with Claude Code