Add existing case confirmation flow - #146
Open
nonprofittechy wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a dedicated “existing case” resolution and confirmation flow to the v2 filing workflow, ensuring existing-case drafts persist a verified court/case lookup before converging with the new-case path at the downstream checklist bridge.
Changes:
- Introduces new Case Lookup and Case Confirmation screens (views, templates, JS/CSS) and routes them directly (no legacy redirect) for workflow v2 drafts.
- Persists additional case metadata on the durable draft (including new
case_titlefield + migration) and updates draft serialization helpers. - Fixes a legacy Suffolk lookup bug (case type name parsing) and updates workflow logic/tests to handle shared steps without draft context.
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| efile_app/efile/workflow.py | Adjusts workflow visibility logic (party completeness query + legacy default for shared steps without draft). |
| efile_app/efile/views/case_lookup.py | New view to persist lookup results and advance to case confirmation for existing-case drafts. |
| efile_app/efile/views/case_confirmation.py | New view to confirm or reject an existing-case match and converge on the checklist step. |
| efile_app/efile/urls.py | Routes /case-lookup/ and /case-confirmation/ to new v2 views instead of legacy redirects. |
| efile_app/efile/tests/test_workflow.py | Adds coverage for legacy default behavior when draft context is absent on shared steps. |
| efile_app/efile/tests/test_case_confirmation.py | Adds end-to-end tests for lookup persistence, confirmation acceptance, and rejection-clearing behavior. |
| efile_app/efile/templates/efile/upload_documents.html | Updates copy to reflect “analyze first PDF” behavior rather than “lead document.” |
| efile_app/efile/templates/efile/case_lookup.html | New template for court + case-number lookup UI. |
| efile_app/efile/templates/efile/case_confirmation.html | New template for confirmation UI (case summary + yes/no actions). |
| efile_app/efile/static/js/upload-documents.js | Updates analyzing-state copy to “first PDF.” |
| efile_app/efile/static/js/case-lookup.js | New client-side logic to load courts, call lookup API, persist result, and redirect. |
| efile_app/efile/static/css/reorganized-flow.css | Adds styling for lookup/confirmation screens (layout + case summary components). |
| efile_app/efile/services/drafts.py | Adds case_title to wire-field sources, read_case_data, and draft_snapshot. |
| efile_app/efile/models.py | Adds case_title field to FilingDraft. |
| efile_app/efile/migrations/0004_filingdraft_case_title.py | Migration adding FilingDraft.case_title. |
| efile_app/efile/api/suffolk_api_views.py | Fixes bug where case-type name was parsed from the wrong HTTP response. |
| efile_app/efile/api/dropdown_views.py | Uses guessed court to improve court recommendation prioritization when county info isn’t available. |
Suppressed comments (1)
efile_app/efile/templates/efile/case_confirmation.html:45
- The fallback text "Not available" is hard-coded via the
defaultfilter, so it bypasses i18n. Use an{% if %}/{% elif %}/{% else %}block and translate the fallback string.
<dt>{% translate "Case type" %}</dt>
<dd>
{{ case.case_type_name|default:case.case_type_code|default:"Not available" }}
</dd>
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
nonprofittechy
force-pushed
the
workflow/case-confirmation
branch
from
August 10, 2026 22:46
2537726 to
2d6680f
Compare
nonprofittechy
marked this pull request as ready for review
August 10, 2026 22:47
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
Find your court case
Confirm your case
Impact
This is stacked on #145. New cases still skip both screens; existing cases now resolve and confirm a real court case before both paths meet at the temporary Document Checklist bridge.
Validation
uv run pytest(197 passed)npm run test:unit(17 passed)Part of #136.