Add filing path and document intake - #145
Open
nonprofittechy wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces the first user-visible screens for workflow version 2, including a new “filing path” start, consolidated multi-PDF intake with lead/supporting documents, an extraction review screen, and a shared progress UI, while temporarily bridging unmigrated downstream routes into the legacy flow.
Changes:
- Start v2 drafts on the new Filing Path screen and route into consolidated document upload.
- Add document intake + extraction review screens (including LLM-based guess extraction) and UI state handling.
- Add shared workflow base/progress UI and legacy redirect bridges for not-yet-migrated screens.
Reviewed changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| efile_app/efile/workflow.py | Adds stage labels and stage-progress context for the new progress UI; updates stage assignment for extraction review. |
| efile_app/efile/views/upload_documents.py | Implements consolidated multi-PDF upload, lead/supporting handling, and extraction guess generation. |
| efile_app/efile/views/legacy_workflow.py | Adds temporary redirect bridge to force drafts into legacy flow for unmigrated screens. |
| efile_app/efile/views/filing_path.py | Adds the new v2 entry screen to select filing path and persist normalized branch state. |
| efile_app/efile/views/extraction_review.py | Adds extraction review screen that confirms extracted fields and branches to next step. |
| efile_app/efile/views/draft_views.py | Creates v2 drafts starting at Filing Path and redirects accordingly. |
| efile_app/efile/urls.py | Wires new v2 endpoints and legacy bridge routes. |
| efile_app/efile/tests/test_reorganized_start.py | Adds coverage for new start/upload/extraction/legacy-bridge behavior. |
| efile_app/efile/tests/test_durable_drafts.py | Updates durable draft creation expectations for v2 workflow start. |
| efile_app/efile/templates/efile/workflow_base.html | Introduces a shared base layout for reorganized workflow screens. |
| efile_app/efile/templates/efile/upload_documents.html | Adds the consolidated upload UI and document list. |
| efile_app/efile/templates/efile/options.html | Updates the new-draft redirect fallback to the filing path route. |
| efile_app/efile/templates/efile/filing_path.html | Adds the new “What are you trying to do?” start screen UI. |
| efile_app/efile/templates/efile/extraction_review.html | Adds the “Here’s what we found” extraction review UI. |
| efile_app/efile/templates/efile/components/workflow_progress.html | Adds the new eight-stage progress component. |
| efile_app/efile/static/js/upload-documents.js | Adds client-side upload/remove behavior and in-page upload state handling. |
| efile_app/efile/static/css/reorganized-flow.css | Adds styling for the new workflow shell, cards, progress UI, and new screens. |
| efile_app/efile/services/drafts.py | Allows creating drafts with an explicit workflow_version. |
| efile_app/efile/services/current_drafts.py | Plumbs workflow_version through draft creation and ensures it can be enforced/updated. |
Suppressed comments (1)
efile_app/efile/static/js/upload-documents.js:86
- The remove-document handler also unconditionally parses response.json(); if the request redirects (e.g., auth timeout) it will throw. Add a redirected check similar to the upload handler.
const response = await fetch(window.location.href, {
method: "POST",
body
});
const result = await response.json();
if (response.ok && result.success) window.location.reload();
else window.alert(result.error || "Could not remove the document.");
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+116
to
+128
| promote_document = None | ||
| other_documents = FilingDocument.objects.filter(draft=draft).exclude(pk=document.pk) | ||
| if document.role == FilingDocument.Role.LEAD and other_documents.exists(): | ||
| replacement = other_documents.order_by("sort_order", "created_at").first() | ||
| assert replacement is not None | ||
| promote_document = replacement.pk | ||
| document.delete() | ||
| if promote_document is not None: | ||
| replacement = FilingDocument.objects.get(pk=promote_document) | ||
| replacement.role = FilingDocument.Role.LEAD | ||
| replacement.sort_order = 0 | ||
| replacement.save(update_fields=["role", "sort_order", "updated_at"]) | ||
| return JsonResponse({"success": True}) |
Comment on lines
+38
to
+52
| write_case_data( | ||
| draft, | ||
| { | ||
| "existing_case": existing_case, | ||
| "court_name": request.POST.get("court_name", ""), | ||
| "case_category_name": request.POST.get("case_category_name", ""), | ||
| "case_type_name": request.POST.get("case_type_name", ""), | ||
| "docket_number": request.POST.get("docket_number", ""), | ||
| }, | ||
| current_step=WorkflowStepKey.EXTRACTION_REVIEW, | ||
| ) | ||
| next_step = get_next_step(WorkflowStepKey.EXTRACTION_REVIEW, draft) | ||
| if next_step: | ||
| return redirect(get_step_url(next_step.key, jurisdiction)) | ||
|
|
nonprofittechy
marked this pull request as ready for review
August 10, 2026 22:46
nonprofittechy
force-pushed
the
workflow/filing-path-upload
branch
from
August 10, 2026 22:46
df3bba5 to
8d9a1c3
Compare
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
Screenshots
Filing path
Consolidated upload
Extraction review
Impact
This is stacked on #144. The new beginning works end-to-end, then temporarily bridges into the legacy form until the later stacked PRs replace the downstream screens.
Validation
uv run pytest(193 passed)npm run test:unit(17 passed)Part of #136.