Skip to content

Add branch-aware filing workflow - #144

Open
nonprofittechy wants to merge 2 commits into
mainfrom
workflow/branch-aware-navigation
Open

Add branch-aware filing workflow#144
nonprofittechy wants to merge 2 commits into
mainfrom
workflow/branch-aware-navigation

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

What changed

  • declares the complete reorganized screen registry and broad progress stages
  • resolves new-case, existing-case, repeating party-detail, and optional case-question branches from durable draft state
  • normalizes existing_case to new, existing, or unsure while translating values for legacy clients
  • versions workflows so pre-migration drafts continue through the current seven-screen route
  • adds the schema/data migration and focused workflow coverage

Why

The current adjacency-only registry cannot represent the conditional paths in the revised screen order. This infrastructure centralizes navigation decisions before new screens begin replacing the legacy flow.

Impact

No visible screens change in this PR. Existing drafts remain resumable on workflow version 1; subsequent stacked PRs create version-2 drafts and add the new routes.

Validation

  • uv run pytest (188 passed)
  • uv run ruff check efile/workflow.py efile/models.py efile/services/drafts.py efile/tests/test_workflow.py
  • uv run python manage.py makemigrations --check --dry-run

Part of #136.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the filing workflow registry to support branch-aware navigation driven by durable draft state, while keeping legacy drafts resumable on the existing linear flow via workflow versioning.

Changes:

  • Introduces a reorganized FILING_WORKFLOW with stages, branching visibility rules, and legacy workflow fallback (LEGACY_WORKFLOW).
  • Normalizes existing_case into a controlled vocabulary and translates to legacy yes/no values where needed.
  • Adds workflow_version + migration, updates draft serialization, and expands workflow-focused tests.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
efile_app/efile/workflow.py Adds branch-aware workflow registry, visibility/next-step logic, and existing-case normalization.
efile_app/efile/views/upload.py Passes the current filing draft into workflow context for correct navigation rendering.
efile_app/efile/views/upload_first.py Passes the current filing draft into workflow context for correct navigation rendering.
efile_app/efile/views/review.py Passes the current filing draft into workflow context for correct navigation rendering.
efile_app/efile/views/payment.py Passes the current filing draft into workflow context for correct navigation rendering.
efile_app/efile/views/options.py Passes the current draft into workflow context and resume URL logic.
efile_app/efile/views/expert_form.py Passes the current filing draft into workflow context for correct navigation rendering.
efile_app/efile/tests/test_workflow.py Adds coverage for workflow versions, branching visibility, stage progress, and normalization helpers.
efile_app/efile/services/drafts.py Normalizes existing_case on write and translates for legacy consumers on read; adds workflow_version to snapshots.
efile_app/efile/models.py Adds workflow_version and constrains existing_case with choices based on the new enum.
efile_app/efile/migrations/0003_branch_aware_workflow.py Migrates existing_case legacy values and adds/updates related schema fields.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread efile_app/efile/workflow.py
Comment thread efile_app/efile/workflow.py
@nonprofittechy
nonprofittechy marked this pull request as ready for review August 10, 2026 22:45
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