Skip to content

Add existing case confirmation flow - #146

Open
nonprofittechy wants to merge 2 commits into
workflow/filing-path-uploadfrom
workflow/case-confirmation
Open

Add existing case confirmation flow#146
nonprofittechy wants to merge 2 commits into
workflow/filing-path-uploadfrom
workflow/case-confirmation

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

What changed

  • sends existing-case filings from Extraction Review to a focused court/case-number lookup
  • loads Illinois courts and recommends or restores the draft's selected court
  • persists the EFSP case tracking ID, docket, title, category, type, and court on the durable draft
  • adds a separate confirmation screen; rejection clears the result and returns to search
  • converges accepted existing cases and new cases on Document Checklist
  • fixes the legacy lookup bug that used the category response as the case-type name

Screenshots

Find your court case

Case lookup

Confirm your case

Case confirmation

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

  • Illinois test-account browser verification and screenshots
  • uv run pytest (197 passed)
  • npm run test:unit (17 passed)
  • Ruff, djLint, CSS/JS format hooks, ty, migration drift check

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

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_title field + 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 default filter, 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.

Comment thread efile_app/efile/templates/efile/case_confirmation.html
Comment thread efile_app/efile/templates/efile/case_confirmation.html
@nonprofittechy
nonprofittechy force-pushed the workflow/case-confirmation branch from 2537726 to 2d6680f Compare August 10, 2026 22:46
@nonprofittechy
nonprofittechy marked this pull request as ready for review August 10, 2026 22:47
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