Skip to content

Workflow progress indicator + UI improvements - #1

Merged
samingbar merged 1 commit into
mainfrom
laine-changes
Nov 13, 2026
Merged

samingbar merged 1 commit into
mainfrom
laine-changes

Conversation

@lainecsmith

Copy link
Copy Markdown
Contributor

Summary of changes

Workflow progress tracking (both mortgage_embedded_agent and mortgage_fixed_flow)

  • Added a WorkflowStage type and a WorkflowProgress model (stage, detail, updated_at) in each mortgage_models.py.
  • Each workflow now records its current stage as it runs: Extracting application → Retrieving policy → Running analyses (e.g. "Credit analysis (2 of 4)") → Critic review → Drafting decision → Awaiting human review → Completed.
  • Added a get_progress query so the UI can read the current stage.

Review UI improvements (both review_app.py files)

  • Clearer status badges: a running case shows its current stage, such as "Analyzing application", instead of plain RUNNING. Cases waiting on a human get an amber badge. Completed cases show the final decision ("Completed – Approved" in green, "Completed – Rejected" in red).
  • Case detail page: shows a line saying what the workflow is doing and when that last changed, plus a "← All cases" back link.
  • Case list: now includes completed workflows as well as running ones (up to 200, was 50). It's sorted by case ID, and statuses are looked up in parallel so the page and its auto-refresh stay fast.
  • Bug fix: the case page no longer auto-refreshes while the human review form is showing. Before, the 10-second refresh wiped out whatever the reviewer had typed.
  • Hardening: the case ID and error message on the "Case Not Found" page are now HTML-escaped.

** Demo runs cases in parallel (mortgage_embedded_agent/demo.py)

  • The demo script now starts all cases at once with asyncio.gather instead of one after another. A case waiting on human review no longer holds up the others, and one failed case is printed without stopping the rest.

Tests (mortgage_embedded_agent/mortgage_workflow_tests.py)

  • The human-review test now checks that get_progress reports AWAITING_HUMAN_REVIEW before the signal and COMPLETED after it.

…l workflows in parallel rather than sequentially

@samingbar samingbar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@samingbar
samingbar merged commit cf71a3c into main Nov 13, 2026
4 of 5 checks passed
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.

2 participants