14 file(s), +519 / -268 lines
| Path | Role | + | - |
|---|---|---|---|
| messages/en.json | Config | +3 | -1 |
| messages/hi.json | Config | +3 | -1 |
| src/app/[locale]/(workspace)/matters/[matterId]/filings/annexures/page.tsx | App route | +60 | -0 |
| src/app/[locale]/(workspace)/matters/[matterId]/filings/exhibits/page.tsx | App route | +88 | -0 |
| src/app/[locale]/(workspace)/matters/[matterId]/filings/layout.tsx | App route | +33 | -0 |
| src/app/[locale]/(workspace)/matters/[matterId]/filings/main/page.tsx | App route | +74 | -0 |
| src/app/[locale]/(workspace)/matters/[matterId]/filings/page.tsx | App route | +14 | -106 |
| src/components/matter-detail/matter-worknav.tsx | Component | +7 | -2 |
| src/components/matters/filings/annexure-register-panel.tsx | Component | +34 | -0 |
| src/components/matters/filings/exhibit-register-panel.tsx | Component | +79 | -0 |
| src/components/matters/filings/filings-subnav.tsx | Component | +62 | -0 |
| src/components/matters/filings/filings-tab.tsx | Component | +0 | -150 |
| src/components/matters/filings/main-filings-panel.tsx | Component | +34 | -0 |
| src/lib/surface-registry/route-registry.ts | Library | +28 | -8 |
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.
filings/page.tsx — a thin server redirect to Main Filings
via the durable surface key
(redirect(localizeHref(locale, buildSurfacePath("matter.filings.main", { matterId })))),
exporting agentSurface = null with a // no-agent:
reason. The bare /filings URL never renders naked.
filings/layout.tsx — hosts the register subtab row ONCE
above all three subpages (<FilingsSubnav>). Switching
registers is now URL navigation, not client state. The fat matter layout
above still owns the shared matter chrome (Ribbon + Worknav + Rail); this
layout adds only the filings-scoped subnav.
filings/main/page.tsx — key
matter.filings.main; prefetches
appListMatterProceedingFilings only.
filings/annexures/page.tsx — key
matter.filings.annexures; keeps ?doc=<uuid>
(the contract has no proceeding-level annexure enumeration, so the
register is keyed per parent document). Prefetches
appListDocumentAnnexures(doc) only when ?doc is
present; absent doc is the honest empty state.
filings/exhibits/page.tsx — key
matter.filings.exhibits; prefetches
appGetProceedingExhibitRegister and loads the markable
(non-privileged) documents for the "Mark as exhibit" picker. Keeps the
renumber write and the Blake run banner.
filings-tab.tsx (the useState<Subtab>
host) is deleted. Its three branches became three
self-contained client panels — MainFilingsPanel,
AnnexureRegisterPanel, ExhibitRegisterPanel —
each reading the warm cache its page seeded (forum pattern: server
prefetch → hydrate → generated TanStack hook) and rendering the same
four register states (loading / error / empty / table) as before.
FilingsSubnav is a new client component: the three
registers as real <Link>s (right-clickable,
open-in-new-tab), with the active tab derived from the
pathname, never threaded as a prop. It reuses the existing
SegmentedFilter visual (container + active pill) and the
existing Filings.subtabs.* labels.
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.
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.
pnpm gen:routes + pnpm check:routes — registry fresh, 32 surfaces.pnpm lint — clean (one pre-existing unrelated <img> warning).pnpm test — 1001 passing, including the surface-registry freshness + description-cap tests.pnpm build — green; all four filings routes compile.