transitory documents - display data recency. - #1287
Conversation
15c401b to
eac95db
Compare
| sanitizedLocationId, | ||
| sanitizedRoomCd, | ||
| date); | ||
| date, |
There was a problem hiding this comment.
Can probably use the SanitizeForLog extension method to resolve this.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the transitory-documents search contract end-to-end to include “data recency” metadata (retrieved time + whether the result was cached) so the UI can display when the current list was fetched and provide a refresh affordance.
Changes:
- Introduces a
TransitoryDocumentSearchResponsepayload (documents +retrievedAtUtc/isCached) across API and web client. - Adds a UI banner in
TransitoryDocumentsTable.vueshowing “Results as of …” / “Cached results as of …” plus a refresh button. - Updates/extends unit tests on both the API and web sides for the new response shape and caching behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/tests/components/courtList/TransitoryDocumentsDialog.test.ts | Updates component tests to match the new search response shape and asserts banner/refresh behavior. |
| web/src/types/transitory-documents.ts | Adds the TransitoryDocumentSearchResponse TypeScript type used by the web client. |
| web/src/services/TransitoryDocumentsService.ts | Changes searchDocuments to return the new response DTO from the API. |
| web/src/components/courtlist/TransitoryDocumentsTable.vue | Adds the freshness banner and stores the full search response for display. |
| tests/api/Services/TransitoryDocumentsServiceTests.cs | Updates API service tests for the new response type and adds caching/refresh behavior tests. |
| tests/api/Documents/DocumentMergerTests.cs | Disables a license-dependent PDF merge test and removes license registration from unit tests. |
| tests/api/Controllers/TransitoryDocumentsControllerTests.cs | Updates controller tests to assert the controller returns the new response shape. |
| models/Document/TransitoryDocumentSearchResponse.cs | Adds the server-side response model returned by the API. |
| api/Services/TransitoryDocumentsService.cs | Changes service to cache a (documents, retrievedAt) value and return metadata (IsCached, RetrievedAtUtc) in the response. |
| api/Services/ITransitoryDocumentsService.cs | Updates service interface contract to return TransitoryDocumentSearchResponse. |
| api/Controllers/TransitoryDocumentsController.cs | Returns the new response from DocumentGet and adjusts merge flow to use response.Documents. |
| api/appsettings.json | Reduces TdSearchExpiryMinutes to 60. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| [Fact] | ||
| // This test creates and merges PDFs through GdPicture's licensed PDFProcessing feature. | ||
| // Re-enable it in a licensed integration-test suite once the PDF engine is abstracted from unit tests. | ||
| [Fact(Skip = "Requires GdPicture PDFProcessing license; run as a licensed integration test.")] |
There was a problem hiding this comment.
Ah, nice update!



Pull Request for JIRA Ticket: ----jasper-858----
Issue ticket number and link
https://jira.justice.gov.bc.ca/browse/JASPER-858
Description
Further changes, displays date/time of previously retrieved data.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Tested all requirements independently against Q drive.
Was unable to validate if the refresh button bypasses issues with caching search results, requires tester with q drive write access.
Test Configuration:
If applicable
Checklist: