Skip to content

Warn early and block filing for configured courts and case types - #274

Merged
nonprofittechy merged 5 commits into
mainfrom
feature/court-filing-availability
Oct 1, 2026
Merged

nonprofittechy merged 5 commits into
mainfrom
feature/court-filing-availability

Conversation

@nonprofittechy

@nonprofittechy nonprofittechy commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What changes

Courts can temporarily block filing through LITEFile when a required capability, such as hearing scheduling, is unavailable. Add filing_availability to a court's existing jurisdiction YAML entry to disable the whole court or selected case categories, case types, and filing types. Filing remains enabled by default.

Filers see a live warning beside the court or type selection immediately, before answering the remaining questions. Continue is disabled while availability is being checked or when a restriction matches. Correcting the choice clears the warning. Existing-case court lookup and document filing-type changes use the same live check.

Rules match human-readable category, case-type, and filing-type names exactly by default, with explicit {regex: "pattern"} entries for full-name regular expressions. Numeric Tyler type IDs can change without requiring rule edits. Court entries support a county prefix such as cook:*, and provide either the built-in explanation, a court-wide message, or a rule-specific message. All documents in an envelope are checked. Restrictions stop progression and final submission, including saved drafts, concurrent submission claims, and outgoing selections resolved to authoritative names from current court code lists. A failed required name lookup blocks submission with a retry message. Filers retain their drafts and can correct their selections.

The Illinois YAML includes a commented Cook County Contract case-type example explaining the unsupported hearing-scheduling capability. The complete filing availability guide documents the full schema, exact and regex matching, message precedence, court and county examples, immediate warnings, submission enforcement, deployment, verification, re-enabling, troubleshooting, and live-check API. It is linked from the sidebar, court configuration, partner overview, and admin reference. The example is deliberately inactive: the affected production case-type names and actual scheduling requirements still need confirmation.

Validation

  • 31 availability tests cover each selector, jurisdiction/court isolation, county prefixes, message fallback, supporting documents, correction paths, saved drafts, submission bypass attempts, exact/regex semantics, changed numeric IDs, and failed name resolution.
  • All 24 court-selection browser tests passed, including seven new checks for immediate warnings, correction, stale responses, and document organization.
  • The complete Python test suite and JavaScript unit suite passed through the required pre-push hooks.
  • Ruff, ty, djlint, Bandit, migration checks, and the documentation production build passed.
  • Real Django browser captures show generic and scheduling-specific warnings immediately after changing selections at desktop and mobile widths; no mobile horizontal overflow.

Validation screenshots on a gist. Images were captured under /tmp and are not in this repository. Demo restrictions used an isolated local database and did not send filings to a court.

Cook County hearing-scheduling example

Closes #212.

nonprofittechy and others added 5 commits September 30, 2026 22:03
Fixes from review:
- Extraction review checks once courts load, so a guided selector with
  no court chosen no longer leaves Continue blocked without a message.
- Organize documents uses saved filing-type names until each card's list
  loads, so the server-rendered warning is not cleared by a blank check.
- Rules are validated on every check, whatever names are saved, so a bad
  regex fails before the draft is claimed rather than leaving it in ERROR.
- The guard only re-enables buttons it disabled itself.

Simplifications:
- The guard coalesces checks made in the same turn and skips unchanged
  selections; organize documents checks once after all cards load.
- Draft checks query documents only when a filing-type rule exists, and
  submit checks load the court's rules once.
- Shared apiUtils.selectedOptionText, a notice template include, a merged
  submit error response, and tidier tests and browser-spec mocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nonprofittechy
nonprofittechy merged commit 8d5a758 into main Oct 1, 2026
8 checks passed
@nonprofittechy
nonprofittechy deleted the feature/court-filing-availability branch October 1, 2026 14:02
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.

Let someone disable e-filing per county and filing type (if we can't support all features needed)

1 participant