PR: #322: [Story-1190] Matters list shared chrome + pagination by @ayush-pramaan
View PR →

Matters list adopts shared chrome

Story-1190 · pramaan-app · app-lane implementation. Backend numbered-list contract work remains tracked separately in pramaan-spec #1216.

Files changed

14 file(s), +352 / -287 lines

Path Role + -
messages/en.jsonConfig+0-1
messages/hi.jsonConfig+0-1
src/components/matters/matters-demo-filters.tsComponent+17-1
src/components/matters/matters-demo-list-view-types.tsComponent+20-0
src/components/matters/matters-demo-list-view.stories.tsxComponent+67-0
src/components/matters/matters-demo-list-view.tsxComponent+86-0
src/components/matters/matters-demo-presentation.tsComponent+42-0
src/components/matters/matters-filter-row.tsxComponent+0-59
src/components/matters/matters-list-page.tsxComponent+44-54
src/components/matters/matters-live-filter-row.tsxComponent+0-59
src/components/matters/matters-query-filter-controls.tsxComponent+0-91
src/components/matters/matters-register.tsxComponent+11-21
src/components/matters/use-highlighted-matter-scroll.tsComponent+19-0
src/components/matters/use-matters-demo-url-state.tsComponent+46-0

1 · What changed

The demo-mode matters list now composes the same chrome as Clients and Settings catalogs: SettingsPageHeader, SettingsToolbar, SegmentedFilter, SettingsSearch, table/register surface, and shared Pagination. The live matters page was already on these primitives; this closes the remaining demo-mode drift.

2 · Removed bespoke matters chrome

Old file / behavior Replacement
matters-filter-row.tsx Deleted; status/search now live in shared toolbar slots.
matters-query-filter-controls.tsx Deleted; search uses SettingsSearch.
matters-live-filter-row.tsx Deleted as orphaned chrome.
Matters.loadMore copy + button Removed; demo-mode list now uses numbered Pagination.

3 · Component split

MattersListPage stays an orchestrator: demo rows, URL filters, highlight behavior, and the add-matter sheet. The rendered chrome is in MattersDemoListView, with URL and presentation helpers split into sibling modules so component files remain under the repo line caps.

4 · Storybook

Added Matters/MattersDemoListView with Default and Empty stories. The full page still owns MatterSheet, whose import chain brings server-only correlation context into Storybook; the pure view story is the deterministic visual catalog surface for this chrome.

5 · Verification

Check Result
pnpm typecheck Passed.
pnpm lint Passed with four pre-existing unrelated warnings.
pnpm test 86 files / 496 tests passed.
pnpm storybook:build Passed.
NEXT_PUBLIC_ENV=local pnpm build Passed.
Storybook visual smoke Default + Empty MattersDemoListView stories rendered through Playwright fallback. The in-app Browser endpoint was not available in this workspace.

6 · Backend handoff

Numbered pagination against the live backend still requires the matter list contract to expose page/offset and total count. That backend-lane work is already split to pramaan-spec #1216, so this PR does not hand-edit generated API contracts.