PR: #466: feat(documents): counsel marks Privileged on the Record + legal-lexicon [Story-1854] by @ankitmaheshwari-com
View PR →
Story-1854 · app lane · RFD-DOC-001 · the first W2 story

Counsel marks a document “Privileged” on the Record

Every document a firm uploads enters a matter’s Record — searchable, producible, usable in filings. Some of it must never go out: attorney work product, litigation strategy. Producing it by mistake is waiver — the worst-case legal failure. This story ships the manual, lawyer-driven control to withhold a document, plus the shared legal vocabulary every future surface will reuse. The backend gate already exists (pramaan-functions Story-1501, FN-PRIVILEGE); this is the app-side UI + wiring. Founder stance (locked): a clear warning and counsel holds the control — no AI auto-decision, no heavy hand-holding.

What changed

The two axes (why Privileged ≠ Confidential)

Concept keyUS labelMeaning
recordRecordthe trustworthy home of a matter’s documents
protection.producibleProduciblecan be filed, produced, relied on (the default)
protection.privilegedPrivilegedwithheld entirely — cannot be compelled
protection.privileged.workProductWork productstrategy / mental impressions prepared for litigation

Privilege is Axis-1 (can it go out?). The W1 upload buckets are Axis-2 (whose is it?). The axes never merge. This story ships the Axis-1 keys the control needs; the rest of the lexicon is recorded for later waves.

Verification

Out of scope (named later, per the lexicon): Blake auto-suggestion, the Work Product workspace, redaction, and confidential / AEO.

Files changed

20 file(s), +824 / -1 lines

Path Role + -
messages/en.jsonConfig+24-0
messages/hi.jsonConfig+24-0
src/app/[locale]/(workspace)/matters/[matterId]/record/page.tsxApp route+1-0
src/app/api/internal/matters/[matterId]/documents/[docId]/privilege/route.tsApp route+83-0
src/components/documents/detail/document-detail-drawer-container.tsxComponent+88-0
src/components/documents/detail/document-detail-drawer.stories.tsxComponent+18-0
src/components/documents/detail/document-detail-drawer.tsxComponent+24-0
src/components/documents/detail/privilege-control.stories.tsxComponent+71-0
src/components/documents/detail/privilege-control.test.tsxComponent+79-0
src/components/documents/detail/privilege-control.tsxComponent+133-0
src/components/documents/register/saved-views-register.tsxComponent+13-0
src/components/matters/live-matter-documents-page.tsxComponent+19-0
src/lib/documents/gateway.tsLibrary+30-1
src/lib/kubb-client.tsLibrary+12-0
src/lib/legal-lexicon/concepts.tsLibrary+77-0
src/lib/legal-lexicon/index.tsLibrary+14-0
src/lib/legal-lexicon/resolve.test.tsLibrary+33-0
src/lib/legal-lexicon/resolve.tsLibrary+46-0
src/lib/legal-lexicon/use-legal-term.tsLibrary+26-0
src/lib/pramaan-diagnostics.tsLibrary+9-0