PR: #717: [Story-2794] Add two-radio who-we-represent flow by @ayush-pramaan
View PR →
Story-2794 · Add matter

Two honest questions replace one ambiguous dropdown

Counsel first records whether the matter is adversarial. Only then, when needed, counsel chooses the represented party label supplied by the selected matter type.

Interaction states

Is there an opposing side?
AdversarialThere is a single opposing side.
AdvisoryNo single opponent.

Lock · Permanent orientation

→
Is there an opposing side?
Adversarial
Who we represent
Claimant
Respondent

Behavior and contract

Choice UI behavior Create payload
Unanswered Q2 is absent; Create explains that Q1 is required. No request is sent.
Adversarial Q2 reveals labels from GET /app/matter-types/{id}/participant-labels. representingSide: adversarial plus the selected label id and name on the us party.
Advisory Q2 stays absent. representingSide: advisory; participant-label fields are omitted.
Labels unavailable Q2 shows an honest loading, empty, no-type, or retryable error state instead of an empty radio group. Create remains blocked until a configured label can be selected.

Storybook proof

Deliberate follow-up boundary

Story-2795 owns the richer matter-type-change refetch experience. This story includes explicit loading, empty, error, and no-type states at the participant-label boundary.

Files changed

54 file(s), +1723 / -622 lines

Path Role + -
messages/en.jsonConfig+12-13
messages/hi.jsonConfig+12-13
openapi/app-api.jsonConfig+160-0
openapi/permission-map.jsonConfig+9-0
src/app/[locale]/(workspace)/clients/client-related-matters-presentation.test.tsApp route+0-2
src/app/api/internal/matter-types/[matterTypeId]/participant-labels/route.tsApp route+20-0
src/components/add-matter/AGENTS.mdComponent+8-4
src/components/add-matter/add-matter-drawer-types.tsComponent+20-20
src/components/add-matter/add-matter-drawer.stories.tsxComponent+6-53
src/components/add-matter/add-matter-drawer.tsxComponent+7-10
src/components/add-matter/representing-side-field.stories.tsxComponent+62-73
src/components/add-matter/representing-side-field.tsxComponent+249-295
src/components/add-matter/use-add-matter-drawer-form.tsComponent+24-5
src/components/agents/agent-chat-panel.render.test.tsxComponent+0-2
src/components/agents/agent-dock-mount.render.test.tsxComponent+0-2
src/components/agents/render-catalog/render-catalog.fixtures.tsComponent+0-2
src/components/clients/client-related-matters-fixtures.tsComponent+0-2
src/components/matter-detail/brief/matter-brief-page.stories.tsxComponent+0-2
src/components/matters/add-matter-launcher.tsxComponent+56-24
src/components/matters/live-matters-wizard-payload.tsComponent+28-14
src/components/matters/matters-live-register-row.stories.tsxComponent+0-2
src/components/route-loading.stories.tsxComponent+29-0
src/components/route-loading.tsxComponent+15-3
src/gen/client/appListMatterTypeParticipantLabels.tsGenerated contract+65-0
src/gen/client/index.tsGenerated contract+1-0
src/gen/hooks/index.tsGenerated contract+8-0
src/gen/hooks/useAppListMatterTypeParticipantLabels.tsGenerated contract+141-0
src/gen/hooks/useAppListMatterTypeParticipantLabelsSuspense.tsGenerated contract+141-0
src/gen/index.tsGenerated contract+36-0
src/gen/schemas/matterTypeParticipantLabelListItem.jsonGenerated contract+43-0
src/gen/schemas/matterTypeParticipantLabelListResponse.jsonGenerated contract+56-0
src/gen/types/AppListMatterTypeParticipantLabels.tsGenerated contract+71-0
src/gen/types/MatterTypeParticipantLabelListItem.tsGenerated contract+39-0
src/gen/types/MatterTypeParticipantLabelListResponse.tsGenerated contract+18-0
src/gen/types/index.tsGenerated contract+14-0
src/gen/zod/appListMatterTypeParticipantLabelsSchema.tsGenerated contract+86-0
src/gen/zod/index.tsGenerated contract+13-0
src/gen/zod/matterTypeParticipantLabelListItemSchema.tsGenerated contract+29-0
src/gen/zod/matterTypeParticipantLabelListResponseSchema.tsGenerated contract+17-0
src/lib/agents/__tests__/atlas-rail-store.test.tsLibrary+0-2
src/lib/agents/atlas-rail.test.tsLibrary+0-2
src/lib/agents/dock-render-bridge.test.tsLibrary+0-2
src/lib/matter-types/gateway.tsLibrary+29-0
src/lib/matter-types/types.tsLibrary+1-0
src/lib/matters/format.test.tsLibrary+0-27
src/lib/matters/format.tsLibrary+0-31
src/lib/matters/optimistic.test.tsLibrary+0-2
tests/unit/live-matters-wizard-payload.test.tsTest+19-5
tests/unit/matter-shell-chrome.test.tsxTest+0-2
tests/unit/matter-type-participant-label-contract.test.tsTest+23-0
tests/unit/matters-contract.test.tsTest+0-2
tests/unit/record-bootstrap-contract.test.tsTest+0-2
tests/unit/representing-side-field.test.tsxTest+95-0
tests/unit/use-add-matter-drawer-form.test.tsxTest+61-4