# Cases

### The Cases page (`/cases`)

The hub for all cases. It has a **search** box, a **status filter** (Active / Archived / All),
and a **"+ New case"** button. Cases appear in a sortable table with **Name**, **Created**,
**Updated**, and **Status** columns, plus a hover **⋯** actions menu.

- Default sort is **most recently updated first**; **pinned** active cases always float to the
  top.
- The list is paginated (about 20 per page).
- Empty states guide first-time users ("No cases yet · Create a case to start organizing files,
  drafting, and chat.").

> Cases also re-sort by recency based on **any** interaction — chatting, drafting, uploading,
> editing notes, adding events — not just edits to the case record. Pinned cases are exempt.

### Creating a case

Click **"+ New case"** (from the Cases page or the case switcher). It's a **3-step wizard**:

**Step 1 — Defendant**
- **Case name** *(required)* — how it appears everywhere (e.g. "State v. John Smith").
- **Defendant** — optional.
- **Case type** — suggestions like "Felony", "Misdemeanor", "DUI", "Drug offense"; custom
  values allowed.
- **Status** — initial status (defaults to **Active**; see statuses below).

**Step 2 — Details**
- **Charges** — the structured charges editor (see [Section 7](https://albatross.legal/docs/case-legal-details)).
- **Docket number**, **Arrest date**.
- **Hearings & deadlines** — add dated rows; these become real calendar events, and the
  soonest one drives the case's "what's next" banner.
- **Advanced settings** (collapsible) — **Jurisdiction**, **County**, **Court**, **Judge**,
  **Prosecutor**. These inherit firm-wide defaults; the placeholder shows the default that will
  be used if left blank.

**Step 3 — Files**
- Drag-and-drop or use **"Upload files"** / **"Upload folder"** to stage files (optional).
  Remove staged files with **✕** before creating.

While creating, the user sees "Creating your case…" then an upload progress phase. When done,
they're taken straight to the new case.

### Case statuses

**Inquiry · Pre-Filing · Active · Negotiating · Trial · Sentencing · Appeal · Closed.**
Each has a colored badge. Change status by clicking the status badge on a case row (or in the
case switcher) and picking a new one.

### Pinning a case

Hover a case row → **⋯** → **"Pin to top"** (or **"Unpin"**). Pinned active cases float to the
top of both the case list and the case switcher and show a pin icon. Archived cases can't be
pinned.

### Archiving a case

Hover a case row → **⋯** → **"Archive"** (or **"Unarchive"**). Archived cases are hidden from
the default view — use the status filter's **Archived** or **All** to see them. Archiving is
the recommended way to get a finished case out of the way without losing anything.

### Deleting a case

Hover a case row → **⋯** → **"Delete"** (or use the case's context menu). The confirmation
warns: deleting permanently removes the case **and all its files, documents, chats, and
calendar events**, with no undo. The user must **type the exact case name** to enable the
**"Delete case"** button. If the case isn't archived, an **"Archive instead"** option is
offered as the safer choice.

### Editing a case

Open a case → in the case context pane (right side) click **⋯** → **"Edit details"**. The
full-page editor lets you change the title, description, status, charges, docket number, arrest
date, court/jurisdiction/county, judge, prosecutor, opposing counsel, and the case's calendar
events. Save with **"Update case."**

### The case context pane

When a case is open, a right-hand pane shows the case identity, status badge, a **"what's
next"** banner (the soonest upcoming event), key metadata (court, jurisdiction + county, judge,
prosecutor, next date), and the **charges** broken out as counts. The pane can be collapsed to
a slim rail and resized; its state is remembered.
