Skip to content

feat: show pipeline sub-stage on estimate status bar - #44

Open
ANTFOR7717 wants to merge 3 commits into
mainfrom
fix/intake-schema-imports
Open

feat: show pipeline sub-stage on estimate status bar#44
ANTFOR7717 wants to merge 3 commits into
mainfrom
fix/intake-schema-imports

Conversation

@ANTFOR7717

Copy link
Copy Markdown
Owner

Summary

  • Adds 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) a processing estimate is currently on.
  • Wires that signal through the intake page, the estimates list, and the recent-estimates widget so EstimateStatusBar shows a stage-specific label/tooltip ("Extracting findings", "Classifying items", "Pricing materials & labor", "Finalizing estimate") instead of a flat "Processing" state.
  • Fails closed to null on any error (storage unreachable, run not found, unexpected shape), so a fault here can't break estimate status rendering.

Test plan

  • tsc --noEmit passes (already verified locally)
  • Upload an estimate PDF and confirm the status bar cycles through the sub-stage labels while processing
  • Confirm estimates list and recent-estimates widget show the same sub-stage text for in-progress rows
  • Confirm a processing estimate with no resolvable sub-stage falls back to the generic "Processing" label

🤖 Generated with Claude Code

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.
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fixpro-app-dashboard Ready Ready Preview, Comment Jul 24, 2026 1:20pm

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.
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