Add branch-aware filing workflow - #144
Open
nonprofittechy wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
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_WORKFLOWwith stages, branching visibility rules, and legacy workflow fallback (LEGACY_WORKFLOW). - Normalizes
existing_caseinto 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.
nonprofittechy
marked this pull request as ready for review
August 10, 2026 22:45
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.
What changed
existing_casetonew,existing, orunsurewhile translating values for legacy clientsWhy
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.pyuv run python manage.py makemigrations --check --dry-runPart of #136.