Skip to content

transitory documents - display data recency. - #1287

Open
devinleighsmith wants to merge 3 commits into
masterfrom
td-refresh
Open

transitory documents - display data recency.#1287
devinleighsmith wants to merge 3 commits into
masterfrom
td-refresh

Conversation

@devinleighsmith

Copy link
Copy Markdown
Contributor

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.

image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@devinleighsmith devinleighsmith self-assigned this Aug 12, 2026
@devinleighsmith devinleighsmith added the enhancement New feature or request label Aug 12, 2026
sanitizedLocationId,
sanitizedRoomCd,
date);
date,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably use the SanitizeForLog extension method to resolve this.

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TransitoryDocumentSearchResponse payload (documents + retrievedAtUtc/isCached) across API and web client.
  • Adds a UI banner in TransitoryDocumentsTable.vue showing “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.

Comment thread api/Services/TransitoryDocumentsService.cs
[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.")]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants