43 file(s), +697 / -19 lines
| Path | Role | + | - |
|---|---|---|---|
| messages/en.json | Config | +13 | -0 |
| messages/hi.json | Config | +13 | -0 |
| openapi/app-api.json | Config | +26 | -1 |
| src/app/[locale]/(workspace)/matters/actions.ts | App route | +5 | -0 |
| src/components/add-matter/add-matter-drawer-types.ts | Component | +14 | -0 |
| src/components/add-matter/add-matter-drawer.stories.tsx | Component | +22 | -1 |
| src/components/add-matter/add-matter-drawer.tsx | Component | +14 | -0 |
| src/components/add-matter/representing-side-field.stories.tsx | Component | +94 | -0 |
| src/components/add-matter/representing-side-field.tsx | Component | +270 | -0 |
| src/components/add-matter/use-add-matter-drawer-form.ts | Component | +31 | -3 |
| src/components/agents/agent-chat-panel.render.test.tsx | Component | +1 | -0 |
| src/components/agents/agent-dock-mount.render.test.tsx | Component | +1 | -0 |
| src/components/agents/render-catalog/render-catalog.fixtures.ts | Component | +2 | -0 |
| src/components/matter-detail/brief/matter-brief-page.stories.tsx | Component | +1 | -0 |
| src/components/matters/add-matter-launcher.tsx | Component | +2 | -1 |
| src/components/matters/live-matters-wizard-payload.ts | Component | +16 | -7 |
| src/components/matters/matters-live-register-row.stories.tsx | Component | +2 | -0 |
| src/gen/index.ts | Generated contract | +5 | -0 |
| src/gen/schemas/matterCreateRequest.json | Generated contract | +8 | -1 |
| src/gen/schemas/matterDetailView.json | Generated contract | +16 | -0 |
| src/gen/schemas/matterListItem.json | Generated contract | +8 | -0 |
| src/gen/schemas/matterListResponse.json | Generated contract | +8 | -0 |
| src/gen/schemas/recordBootstrapResponse.json | Generated contract | +16 | -0 |
| src/gen/schemas/representingSide.json | Generated contract | +7 | -0 |
| src/gen/types/MatterCreateRequest.ts | Generated contract | +6 | -0 |
| src/gen/types/MatterDetailView.ts | Generated contract | +6 | -0 |
| src/gen/types/MatterListItem.ts | Generated contract | +6 | -0 |
| src/gen/types/RepresentingSide.ts | Generated contract | +13 | -0 |
| src/gen/types/index.ts | Generated contract | +4 | -0 |
| src/gen/zod/index.ts | Generated contract | +1 | -0 |
| src/gen/zod/matterCreateRequestSchema.ts | Generated contract | +6 | -0 |
| src/gen/zod/matterDetailViewSchema.ts | Generated contract | +6 | -0 |
| src/gen/zod/matterListItemSchema.ts | Generated contract | +6 | -0 |
| src/gen/zod/representingSideSchema.ts | Generated contract | +17 | -0 |
| src/lib/agents/__tests__/atlas-rail-store.test.ts | Library | +1 | -0 |
| src/lib/agents/atlas-rail.test.ts | Library | +1 | -0 |
| src/lib/agents/dock-render-bridge.test.ts | Library | +1 | -0 |
| src/lib/matters/optimistic.test.ts | Library | +1 | -0 |
| src/lib/matters/optimistic.ts | Library | +1 | -0 |
| tests/unit/live-matters-wizard-payload.test.ts | Test | +23 | -5 |
| tests/unit/matter-shell-chrome.test.tsx | Test | +1 | -0 |
| tests/unit/matters-contract.test.ts | Test | +1 | -0 |
| tests/unit/record-bootstrap-contract.test.ts | Test | +1 | -0 |
The Add-Matter drawer now permanently captures
who our counsel acts for — the durable
representing_side orientation from Spike-2628 — as a required
dropdown placed directly under Matter Type. It is the single source of
truth for Matter Significance: the adversary is derived at render, never
stored a second time.
Add-Matter drawer order Client → Matter Type → Who we represent → Title Who we represent (required dropdown) • the principal adversarial side → representing_side = principal • the opposing side → representing_side = opposing • Advisory — no single adverse side → representing_side = advisory • + Add new participant label → type a label + pick its side
On Create, the drawer sends
{ title, clientId, matterTypeId, representingSide, parties: [us] }. Only the closed enum principal | opposing | advisory is
persisted. No adversary or duplicate participant-role is sent — the
opposing label is computed at render from the stored side + forum via the
existing forumAwareRoleLabel(). A regression test asserts the
exact body shape and that parties stays [us].
| Forum | principal | opposing |
|---|---|---|
| arbitration | Claimant | Respondent |
| civil | Plaintiff | Defendant |
| writ | Petitioner | Respondent |
| criminal | Complainant/Prosecution | Accused/Defense |
| none captured (live drawer) | The party bringing the case | The responding party |
The firm forum venue catalog (ForumView) carries a
name, not the MatterForum kind (the ADR-090 split flagged in
the design note §2.3), so there is no live source for the forum kind at
creation. The field is forum-aware by prop — the Storybook story
proves every forum's words — and the live drawer shows neutral wording,
with "+ Add new participant label" letting counsel type their own term
(Claimant, Petitioner, …) and set the side directly. Advisory is always
offered so Matter Significance never manufactures a false for/against
(pramaan-docs ADR-175).
AddMatter/RepresentingSideField / Neutral Words OpenAddMatter/RepresentingSideField / Arbitration · Civil · Writ ·
Criminal Open
AddMatter/RepresentingSideField / Advisory SelectedAddMatter/RepresentingSideField / Add New Participant Label
AddMatter/RepresentingSideField / Error StateMatters/AddMatterDrawer / Representing Side Open · Add New
The vendored openapi/app-api.json was synced to
pramaan-functions main (Story-2629, PR #729) and pnpm codegen
regenerated src/gen. MatterCreateRequest,
MatterDetailView, and MatterListItem now carry
the required representingSide; fixtures and the optimistic
pending row were updated to match.
en.json and hi.json; forum words reuse the existing Matters.role.* keys.DrawerPopover, DrawerAddNewRow, DrawerFieldError) and token-backed utilities only — check:css-tokens passes.pnpm lint pnpm test # 1418 passed pnpm build pnpm check:routes pnpm check:css-tokens pnpm storybook:build git diff --check