PR: #517: feat(filings): split Filings into routed subpages [Story-2032] by @ankitmaheshwari-com
View PR →

Files changed

14 file(s), +519 / -268 lines

Path Role + -
messages/en.jsonConfig+3-1
messages/hi.jsonConfig+3-1
src/app/[locale]/(workspace)/matters/[matterId]/filings/annexures/page.tsxApp route+60-0
src/app/[locale]/(workspace)/matters/[matterId]/filings/exhibits/page.tsxApp route+88-0
src/app/[locale]/(workspace)/matters/[matterId]/filings/layout.tsxApp route+33-0
src/app/[locale]/(workspace)/matters/[matterId]/filings/main/page.tsxApp route+74-0
src/app/[locale]/(workspace)/matters/[matterId]/filings/page.tsxApp route+14-106
src/components/matter-detail/matter-worknav.tsxComponent+7-2
src/components/matters/filings/annexure-register-panel.tsxComponent+34-0
src/components/matters/filings/exhibit-register-panel.tsxComponent+79-0
src/components/matters/filings/filings-subnav.tsxComponent+62-0
src/components/matters/filings/filings-tab.tsxComponent+0-150
src/components/matters/filings/main-filings-panel.tsxComponent+34-0
src/lib/surface-registry/route-registry.tsLibrary+28-8

Story-2032: Split Filings into routed subpages — Main / Annexures / Exhibits

The Filings tab's three registers — Main Filings, Annexure Register, Exhibit Register — were a useState<Subtab> inside a single client component. A subtab was browser state, not a URL: it could not be deep-linked, opened in a new tab, or reached by back/forward. Each register is now its own real route under /matters/[matterId]/filings/, continuing EPIC-2018 (route-per-mode) on top of the fat layout from S1 (Story-2019) and the Brief route from S2 (Story-2029). The register bodies are unchanged.

The new route tree

What changed in the components

Per-subpage prefetch: no count badges on the subnav

The old SegmentedFilter showed a count on each subtab, which was cheap only because the single tab component ran all three queries at once. With each register on its own route, a page prefetches only its own register (RFD §4 — smaller prefetch). Showing counts for the two inactive tabs would force loading their data on every subpage, defeating the split. So the subnav shows labels only. The counts were informational, not load-bearing.

Surface-key migration: matter.filings → three keys

The old single matter.filings surface is gone; three new surfaces (matter.filings.main, matter.filings.annexures, matter.filings.exhibits) replace it, each with a brain-facing description + capabilities and a presence key present in both locales (en + hi). The Worknav's "Filings" tab now links to matter.filings.main (skipping the redirect hop), and its active-mode map recognises any filings subpage key as the filings mode. pnpm gen:routes regenerated the registry (32 surfaces); pnpm check:routes and the route-registry.test.ts freshness test are green.

Verification