14 file(s), +329 / -43 lines
| Path | Role | + | - |
|---|---|---|---|
| messages/en.json | Config | +2 | -0 |
| messages/hi.json | Config | +2 | -0 |
| src/app/[locale]/(workspace)/matters/[matterId]/record/doc/[documentId]/insights/page.test.tsx | App route | +99 | -0 |
| src/app/[locale]/(workspace)/matters/[matterId]/record/doc/[documentId]/insights/page.tsx | App route | +8 | -7 |
| src/app/[locale]/(workspace)/matters/[matterId]/record/doc/[documentId]/layout.tsx | App route | +28 | -3 |
| src/components/documents/viewer/document-insights-dossier.stories.tsx | Component | +1 | -1 |
| src/components/documents/viewer/document-permalink-shell.test.tsx | Component | +2 | -7 |
| src/components/documents/viewer/document-permalink-shell.tsx | Component | +9 | -1 |
| src/components/documents/viewer/document-strip.stories.tsx | Component | +21 | -1 |
| src/components/documents/viewer/document-strip.test.tsx | Component | +75 | -0 |
| src/components/documents/viewer/document-strip.tsx | Component | +51 | -9 |
| src/lib/documents/deep-read-errors.test.ts | Library | +16 | -7 |
| src/lib/documents/deep-read-errors.ts | Library | +4 | -7 |
| src/lib/documents/get-anchor-view.ts | Library | +11 | -0 |
Insights remains discoverable in the document lens strip, but it is not a destination until the document's current extraction has a completed Deep Read envelope.
document route layout → current Anchor view supplies extractionVersion → exact-version Deep Read envelope succeeds → Insights renders as a link no extraction or no envelope → Insights stays visible, greyed, and non-navigable → “Available after Deep Read” explains why availability check fails unexpectedly → Original and Text stay usable → Insights says it is temporarily unavailable
| State | Result |
|---|---|
| Completed Deep Read envelope | Insights is enabled and navigates to the routed Insights lens. |
| No completed envelope |
Insights is a token-coloured disabled element with no
href, a not-allowed cursor, and the translated readiness
hint.
|
| Defensive direct visit | Typed no-extraction and no-envelope 404s render THE DEEP READ — Not yet read. Authentication, transport, and server failures remain real errors. |
| Availability service failure | Insights remains disabled but uses the truthful temporary-unavailable hint instead of claiming that no Deep Read exists. |
| Original and Text | Their routes and existing availability behaviour are unchanged. |
Digest 552518606 was traced to typed 404
pramaan.document.view_not_found before the envelope request.
The route now treats that exact no-extraction result, and only the
existing pramaan.deep_read.envelope_not_found result, as not
ready.
DocumentStrip / Insights EnabledDocumentStrip / Insights DisabledDocumentStrip / Insights UnavailableInsightsDossier / Not Ready Emptytext-ink-disabled token.
pnpm lint pnpm test pnpm build pnpm check:routes pnpm storybook:build git diff --check