PR: #616: feat(import): slate Strategy, privileged instruction line, in-flight compact zone [Story-2402] by @ankitmaheshwari-com
View PR →

Story-2402 · pramaan-app · 14 Jul 2026

Colour is a claim. Space is a priority.

Story-2400 gave the import drawer a fixed instruction slot and shipped states 1–3 of the founder-approved design. This Story finishes it. Strategy stops borrowing a colour it has no right to. Privileged stops being the one state that says nothing in the slot. And the dropzone stops hogging 300px of the drawer at the exact moment counsel is watching files land instead of dropping more.

The one idea

Every state speaks from the same slot, and takes only the room its job needs. A source’s colour says where its documents will live; a zone’s size says how much the zone still matters right now. Neither is decoration — get either one wrong and counsel misreads the drawer.

What shipped

Piece What it does
Strategy arms slate ARMED.strategy was blue (--blue-1/2/3). Blue is a status hue in PRAMAAN (the Brief “building” pill), and Strategy is not a status — it is a home, and the one home that sits OUTSIDE the discoverable Record. It now arms in the neutral family (--ink-9 border, --shell fill, text-ink-body): colourless on purpose, so it can never be read as a Record side (green / crimson) or as privileged amber. “Other” stays the pale neutral; Strategy is the deeper one. The landed-row chip (“In Strategy”) follows the same ink.
Privileged gets its instruction line The refusal panel already carried the locked headline and body. But the instruction slot below it did not render at all under Privileged — the one state that most needs a sentence explaining itself was the one state that was silent. It now speaks from the SAME slot as every other state: “Privileged material never enters the discoverable Record. The refusal is the protection.”
The zone compacts in flight The moment any row is fetching / uploading / reading, the dropzone drops from py-9 to py-5: the cloud icon and the invitation share one line, and the four door buttons collapse into one quiet sentence — “or Browse files · Choose folder · Google Drive · Dropbox”. Every door stays a live, clickable control with the same handler and the same gating. It is still a dropzone; it just stops shouting over the rows counsel is actually watching.
The slot says what closing does While files are in flight, the slot’s words swap (they do not move) to “Closing is disabled while files are arriving. The X keeps uploads running in the background.” — the honest description of the two close paths Story-2393 shipped: the outside-click veto, and the X that closes without killing the uploads.

One list of doors, not two

The compact zone needed the same four doors as the full zone. Copy-pasting the button row into a second branch is how a fifth door later ships in one place and not the other, and how Drive’s pending spinner quietly stops disabling its twin.

So the doors are declared once as a doors array (label, glyph, pending, handler, availability), and both branches render from it. The full zone maps it to SecondaryButtons; the compact zone maps it to inline text buttons joined by ·. Adding a door means touching one array — there is no second copy to forget.

The states

armed: strategy [ ☁ Drop strategy notes ] zone: SLATE (was blue) [ Browse · Folder · Drive · Dropbox ] ─────────────────────────────────── Everything added here is marked for Strategy, outside the Record. ← slot armed: privileged [ 🔒 Privileged material stays out of the Record ] [ The Record is discoverable. Attorney–client ] [ advice and work product are not uploaded here… ] ─────────────────────────────────── Privileged material never enters the discoverable ← slot Record. The refusal is the protection. (NEW) in flight [ ☁ Drop client documents ] ← compact [ or Browse files · Choose folder · Drive · Dropbox ] (96px) ┌───────────────────────────────────┐ │ ⟳ Fetching from Drive… │ ← the rows now │ ⟳ Fetching from Dropbox… │ own the drawer │ ▓▓▓▓▓░░░ Rejoinder_Vol2.pdf 62% │ │ ✓ Witness_Statement_RS.pdf │ └───────────────────────────────────┘ ─────────────────────────────────── Closing is disabled while files are arriving. The X ← slot keeps uploads running in the background. (NEW) ↑ the slot sits at the SAME y in every state above

What did not change

Token note (read this in review)

The design canvas draws Strategy in a true cool slate (#64748B / #F2F4F6). PRAMAAN has no cool-slate ramp — every neutral in design/v1/colors_and_type.css is warm. Per the ticket (“use existing slate/neutral tokens; no new colors”) this ships on the nearest existing neutrals rather than inventing a ramp or inlining a hex. The relationship the design encodes — Strategy is the deeper neutral, Other the pale one, and neither is a side colour — is preserved exactly. If the founder wants the literal cool hue, that is a token proposal (--slate-*), not a component patch.

Where it lives

File Change
src/components/matters/import-into-matter-sheet-v2.tsx ARMED.strategy → neutral tokens; StageChip’s Strategy ink follows. InstructionSlot gains an inFlight and a privileged variant (both in the same grid cell, so the slot still never moves) and now renders under Privileged. The dropzone gains its compact branch, fed by the shared doors array.
messages/en.json, messages/hi.json Three new keys in both locales: privilegedInstruction, inFlightInstruction, sourcesInlinePrefix.
src/components/matters/import-into-matter-sheet-v2.stories.tsx New InFlightCompactZone story (Drive + Dropbox fetching + an upload in progress). ArmedStrategy, RegisteredToStrategy and Privileged cover the other two states.

How to see it

  1. pnpm storybook → Matters/Import/ImportIntoMatterSheetV2.
  2. ArmedStrategy — the zone arms slate, not blue, and invites “Drop strategy notes”. Click across Client’s / Opponent’s / Other / Strategy: Strategy is unmistakably not a side.
  3. Privileged — the refusal panel, and below it, in the same slot every other state uses, the line explaining that the refusal is the protection. Arm and disarm it: nothing on the screen jumps.
  4. InFlightCompactZone — the zone is compact, the four doors are one quiet clickable row, the journey rows have the drawer, and the slot reads the closing note. Click “Browse files” in that row: the file dialog still opens. Watch the rows clear — the zone expands back to full size.
  5. Switch the Storybook locale to Hindi and repeat. The slot is taller; it still never moves between states.

Files changed

4 file(s), +241 / -101 lines

Path Role + -
messages/en.jsonConfig+4-1
messages/hi.jsonConfig+4-1
src/components/matters/import-into-matter-sheet-v2.stories.tsxComponent+49-7
src/components/matters/import-into-matter-sheet-v2.tsxComponent+184-92