Complete reorganized filing flow - #149
Open
nonprofittechy wants to merge 21 commits into
Open
Conversation
nonprofittechy
force-pushed
the
workflow/review-submit
branch
from
August 10, 2026 16:10
3930f8a to
351cffc
Compare
There was a problem hiding this comment.
Pull request overview
Completes the reorganized filing workflow by making workflow v2 the single canonical flow, updating Payment/Review/Confirmation to read from durable drafts, and redirecting retired legacy URLs forward while migrating saved drafts/steps.
Changes:
- Rebuilds Payment and Review screens to use durable draft data (including durable parties/filer + payment selection persistence) and shared EFSP payload construction.
- Updates Confirmation to display the submitted draft plus an extracted external confirmation reference; persists the last-submitted draft id in session.
- Removes the legacy workflow branch logic and migrates all saved drafts/steps to workflow version 2 with forward redirects for retired routes.
Reviewed changes
Copilot reviewed 25 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| efile_app/js-tests/filing-payload.test.js | Adds unit tests asserting filer + durable parties are used in EFSP payload generation. |
| efile_app/efile/workflow.py | Removes legacy workflow branching; maps legacy step keys to canonical v2 steps; tightens “incomplete parties” detection. |
| efile_app/efile/views/submission.py | Stores last submitted draft id in session on successful submission. |
| efile_app/efile/views/review.py | Replaces session-based review with a durable-draft summary and edit links to new screens. |
| efile_app/efile/views/payment.py | Implements POST-backed payment selection persistence and preconditions for quoting fees. |
| efile_app/efile/views/legacy_workflow.py | Redirects retired legacy URLs into the reorganized flow without restoring old screens. |
| efile_app/efile/views/confirmation.py | Shows submitted durable draft and extracts a confirmation/reference number from stored response. |
| efile_app/efile/urls.py | Routes retired URLs (expert_form/upload_first/upload) through the legacy redirect view. |
| efile_app/efile/tests/tests.py | Updates legacy expert_form test expectation to redirect. |
| efile_app/efile/tests/test_workflow.py | Updates workflow tests to reflect canonical v2-only flow and legacy-step mapping. |
| efile_app/efile/tests/test_review_submit_flow.py | Adds integration tests for payment→review→confirmation and legacy redirects. |
| efile_app/efile/tests/test_durable_drafts.py | Updates durable draft tests to match new resume/redirect destinations. |
| efile_app/efile/templates/efile/review.html | Replaces legacy JS-heavy review template with workflow shell summary cards + submit attestation. |
| efile_app/efile/templates/efile/payment.html | Replaces legacy payment template with workflow shell, radio choices, and fee summary. |
| efile_app/efile/templates/efile/options.html | Defaults new/resume redirects to the reorganized filing-path step. |
| efile_app/efile/templates/efile/confirmation.html | Replaces legacy confirmation template with workflow shell + submitted draft summary. |
| efile_app/efile/static/js/review.js | Simplifies review JS to submit using durable-draft JSON + shared FilingPayload. |
| efile_app/efile/static/js/payment.js | Updates payment JS to render radio choices, create payment methods, and quote fees via FilingPayload. |
| efile_app/efile/static/js/filing-payload.js | Adds durable filer/party support and improves document bundle party refs + fee rendering. |
| efile_app/efile/static/css/review.css | Adds styles for payment-choice + review summary grid/cards. |
| efile_app/efile/static/css/confirmation.css | Adds styles for new confirmation workflow card layout. |
| efile_app/efile/services/drafts.py | Defaults new drafts to workflow_version=2. |
| efile_app/efile/services/current_drafts.py | Defaults current-draft creation/ensure to workflow_version=2. |
| efile_app/efile/models.py | Defaults FilingDraft.workflow_version to 2. |
| efile_app/efile/migrations/0007_complete_workflow_migration.py | Migrates saved draft step strings and workflow_version to 2. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Rebuild the payment-method radio list: the previous version had been
mangled into invalid markup (broken tags, "$ {" interpolation split
across lines, "data - name" attribute), which prevented rendering and
selection. Root cause was a js-beautify quirk that corrupts a template
literal when an if-block containing another template literal is nested
inside a .map() callback that is itself inside an outer template
literal's ${} interpolation; hoisting the row-building into its own
`rows` variable before the outer interpolation avoids the nesting
depth that triggers it and verified idempotent under the formatter.
Also make _confirmation_number() recurse into list values (not just
dicts) so nested "filings"/"messages" arrays are found, and have
submission.py reuse confirmation.LAST_SUBMITTED_DRAFT_SESSION_KEY
instead of a duplicated magic session-key string.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
nonprofittechy
force-pushed
the
workflow/review-submit
branch
from
August 10, 2026 22:46
91f93af to
6da86df
Compare
nonprofittechy
marked this pull request as ready for review
August 10, 2026 22:48
document-prep's new requested_optional_services field and this branch's own 0007_complete_workflow_migration both branched off 0005/0006 independently, leaving two migration leaves. This ties them back into one graph; it carries no schema changes of its own. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Show each document's filing type as its own labeled tag on the Documents review card instead of burying it in a slash-separated string with the confidentiality setting. - Carry the fee quote already shown on the Payment step (total + itemized charges) onto the draft, and show it on Review instead of "the court will charge the fees shown on the previous screen" -- which was also wrong outright for a payment waiver, where nothing is charged. A waiver (paymentAccountTypeCode "WV", the one type code this app already relied on) now gets its own message; other types show the real calculated total rather than assuming a card. payment.js also stopped mislabeling non-card accounts as "Card ending in ****" when they don't carry card data. - Add return_to=review to Review's Edit links so editing Case, Documents, Your information, Other people, or Case questions saves and comes straight back to Review (via the mechanism added in document-prep/people), instead of replaying every later screen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Checked ~/EfileProxyServer (the Suffolk LIT Lab EFSP source) since the
account-type codes aren't documented anywhere public: payment accounts
only carry a bare paymentAccountTypeCode ("CC", "WV", ...), and the
proxy itself only special-cases those same two -- the full set is
whatever GetPaymentAccountTypeList (proxied at
.../payments/types) returns for the court, not a fixed enum anywhere
in the codebase.
Add a payment-account-types proxy endpoint and have payment.js fetch
it once and use the court's own name for any account type it doesn't
already special-case, instead of falling back to a guessed "Card
ending in ****" label for non-card accounts.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Completes the amount-in-controversy feature: case_questions collects the dollar amount and saves it on the draft (people), read_case_data exposes it in the case_data blob (document-prep), and this sends it as the top-level amount_in_controversy field in the JSON built for /api/payment-fees/ and /api/submit-final-filing/ -- the field the EFSP actually checks (CodesParser.vetAmountInControversy). Omitted entirely when not set, rather than sent as empty/zero, since the EFSP only requires it when at least one filing type demands it. Also includes the merge migration tying together the amount-in-controversy and payment-fields migration forks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Primary action buttons were the worst of it. The reorganized-flow pages never themed .btn-primary, so they rendered Bootstrap's default #0d6efd while the older pages used #007bff and the brand blue was #2c5aa0 -- three colors for the same action. Focus rings added #3b82f6 and #0d6efd on top. Buttons and links are now themed through Bootstrap's own custom properties (--bs-btn-bg, --bs-btn-hover-bg, --bs-link-color) rather than raw background-color, so hover, active, and disabled states move together instead of only the resting state getting repainted. --primary-btn-color now aliases the brand blue, which pulls the older pages in without refactoring them. The three new stylesheets carried 68 hardcoded hex values, including seven near-identical navies doing the same job. Those collapse into semantic tokens in common.css: three text tiers, two surfaces, four borders, and status colors. Only #fff is left inline. This also fixes a real contrast bug rather than just tidying. Every muted gray in the new screens failed WCAG AA -- #758196 was 3.93:1 and #778397 was 3.83:1 on white, worse on the tinted panels. --text-muted is solved for 4.5:1 against all five backgrounds, and --border-strong clears the 3:1 non-text threshold for the drop zone. Verified with the same _contrast_ratio implementation DAYamlChecker uses. Also drops ~250 lines of dead pre-reorg CSS from review.css and confirmation.css, including a shadow .document-list rule that would have silently overridden the live one on the review and payment pages, adds the missing .status-pill--lead rule the organize screen already referenced, and gives the drop zone a visible focus ring. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follows https://assemblyline.suffolklitlab.org/docs/style_guide/readability. Contractions are gone from user-facing text, per the guide's "write out the words instead, like 'cannot' or 'do not'". Possessives are left alone -- "the court's fees" is not a contraction and reads fine -- as are contractions inside code comments, which are developer-facing. The guide caught more than contractions: - Two idioms it warns about specifically: "get a head start" and "the dollar amount at stake". - Passive voice: "Court party roles could not be loaded" becomes "We could not load the court party roles". - Gerund openers: "Choosing Yes will attach your documents" becomes "If you choose Yes, we will attach your documents", which also matches the guide's preferred condition-then-action order. - Its word substitutions: receive -> get, whether -> if, such as -> like. - One sentence over the 20-word limit, on the new-vs-existing case help panel. Mean Flesch-Kincaid across the fourteen screens drops from 4.2 to 3.6, and every screen now sits at or under the grade 6 target. party_details was the only one above it at 7.1 and is now 5.0, mostly from dropping "this person's or organization's" -- the person or organization choice is a radio button directly below, so the lede did not need to repeat it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
This stack solves #136
Summary
Completes the reorganized filing workflow on top of #148.
/upload_first/,/expert_form/, and/upload/only as forward-compatible redirects; the legacy templates are no longer active routesScreenshots
Payment
Review
Confirmation
Validation
makemigrations --check --dry-runreports no changesgit diff --checkpassStack
Base:
workflow/people/ #148