PR: #687: feat(clients): add related matters register [Story-2688] by @ayush-pramaan
View PR →
Story 2688

Client detail now shows the client's related matters

The client detail page now fetches this client's matters through the generated matters list cache and renders them below the header as a searchable, status-filtered register.

What changed

States covered

State Expected result
Default Rows render with matter references, status badges, document counts, toolbar counts, and matter links.
Empty A zero-matter client sees the dedicated “No matters yet” empty state.
Filtered empty Changing status/search can show a separate no-match state without replacing the zero-data empty copy.

Review path

  1. Open Clients/ClientRelatedMattersRegister in Storybook.
  2. Confirm the Default story shows Discovery and Active rows with correct tab counts.
  3. Switch tabs and search for a matter title or reference.
  4. Open the Empty story and confirm the copy is “No matters yet”.
  5. Open a real client detail page and confirm the table sits directly under the header, with no divider.

Files changed

18 file(s), +749 / -49 lines

Path Role + -
messages/en.jsonConfig+19-0
messages/hi.jsonConfig+19-0
openapi/permission-map.jsonConfig+35-0
src/app/[locale]/(workspace)/clients/[clientId]/page.tsxApp route+34-7
src/app/[locale]/(workspace)/clients/client-related-matters-presentation.test.tsApp route+66-0
src/app/[locale]/(workspace)/clients/presentation.tsApp route+65-0
src/components/clients/client-detail-header.tsxComponent+5-3
src/components/clients/client-related-matters-fixtures.tsComponent+63-0
src/components/clients/client-related-matters-register.stories.tsxComponent+60-0
src/components/clients/client-related-matters-register.tsxComponent+93-0
src/components/clients/client-related-matters-row.tsxComponent+77-0
src/components/clients/client-related-matters-table.tsxComponent+68-0
src/components/clients/client-sheet.tsxComponent+5-4
src/components/clients/empty-state.stories.tsxComponent+57-3
src/components/clients/empty-state.tsxComponent+40-25
src/components/clients/pages/client-detail-page.stories.tsxComponent+35-2
src/components/clients/pages/client-detail-page.tsxComponent+7-4
src/lib/surface-registry/route-registry.tsLibrary+1-1