PR: #525: feat(matter): Import drawer v2 live — armed source + privileged fail-safe + rail entry/fixes [Story-2111] by @ankitmaheshwari-com
View PR →

Files changed

26 file(s), +1090 / -1069 lines

Path Role + -
messages/en.jsonConfig+24-2
messages/hi.jsonConfig+24-2
src/app/[locale]/(workspace)/matters/[matterId]/layout.tsxApp route+13-1
src/app/[locale]/(workspace)/matters/[matterId]/record/page.tsxApp route+0-14
src/app/[locale]/(workspace)/matters/actions.tsApp route+37-0
src/components/matter-detail/matter-right-rail.tsxComponent+6-1
src/components/matter-detail/rail-icon-strip.tsxComponent+2-1
src/components/matters/evidentiary-record-notice.tsxComponent+0-47
src/components/matters/import-into-matter-sheet-v2.stories.tsxComponent+182-0
src/components/matters/import-into-matter-sheet-v2.tsxComponent+447-0
src/components/matters/import-into-matter-sheet.stories.tsxComponent+0-122
src/components/matters/import-into-matter-sheet.tsxComponent+0-123
src/components/matters/import-sheet-presentation.tsComponent+0-42
src/components/matters/live-matter-documents-page.tsxComponent+19-115
src/components/matters/matter-intake-drawer.tsxComponent+75-0
src/components/matters/matter-shell-chrome.tsxComponent+31-3
src/components/matters/upload-dropzone.stories.tsxComponent+0-29
src/components/matters/upload-dropzone.tsxComponent+0-143
src/components/matters/upload-queue-item.stories.tsxComponent+0-101
src/components/matters/upload-queue-item.tsxComponent+0-107
src/components/matters/upload-status-pill.stories.tsxComponent+0-43
src/components/matters/upload-status-pill.tsxComponent+0-39
src/components/matters/use-document-upload-queue.tsComponent+14-1
src/components/matters/use-matter-import-v2.tsComponent+191-0
src/components/matters/use-matter-import.tsComponent+0-133
src/lib/matters/gateway.tsLibrary+25-0

Story-2111: Import drawer v2, live — armed source, privileged fail-safe, rail entry, rail fixes

The founder-approved Storybook prototype (proto/import-drawer-v2, 2026-07-07) is now the production Import drawer. It replaces the W1 sheet (Story-1858): instead of a passive dropzone + a "source" segmented filter, counsel must first arm whose documents these are — one tap that recolours the zone and pre-stamps every dropped file's side. Classification becomes unavoidable and effortless. The prototype was lifted verbatim (no redesign); this story wires it to the real upload machinery, internationalises every string, moves it onto the Matter Action Rail so it opens on any matter page, and fixes two rail defects.

What landed

declared_side & functions Story-2110

functions Story-2110 (fn#577) merged mid-build and its contract synced to the mirror (Chore-2112), so declared_side is now wired end-to-end — no seam:

No pnpm codegen was run locally; the branch was rebased onto the Chore-2112 codegen-sync main so the generated client is the committed mirror.

Storybook (verify here)

Verification

Live-data seam: the drawer runs the same presign → S3 → finalize path the Record page always used; the journey rows are driven by real queue statuses (uploading/processing/done/failed). The end-to-end staging run against a real matter — including the empty first-run Record — is the component-boundary → system-boundary check to confirm on stg.app.pramaan.io, and declared_side persistence is gated on functions Story-2110 landing in the mirror.