Skip to content

Add document content hash support - #224

Merged
kmandryk merged 6 commits into
developfrom
AI-1616
Jul 7, 2026
Merged

Add document content hash support#224
kmandryk merged 6 commits into
developfrom
AI-1616

Conversation

@kmandryk

@kmandryk kmandryk commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Introduce SHA-256 content_hash generation from original upload bytes and persist it for both documents and labeling_documents, including Prisma schema updates, migration, and DB indexes. Wire the field through backend services/DTOs, add content_hash filtering to GET /api/documents, and expand tests across document, OCR, and benchmark flows. Update the frontend document list with a new hash column using an interactive truncated/expandable copyable cell, and add docs describing behavior and normalization interplay.

Summary

AI-1616

Changes

Testing

Checklist

By submitting this pull request, I acknowledge that I have attempted to meet the following:

  • a self-review of my code
  • commented code particularly in hard-to-understand areas
  • corresponding changes to the documentation where required
  • changes tested to the best of my ability
  • no new errors or non-functional code

kmandryk added 2 commits July 2, 2026 10:36
Introduce SHA-256 `content_hash` generation from original upload bytes and persist it for both `documents` and `labeling_documents`, including Prisma schema updates, migration, and DB indexes. Wire the field through backend services/DTOs, add `content_hash` filtering to `GET /api/documents`, and expand tests across document, OCR, and benchmark flows. Update the frontend document list with a new hash column using an interactive truncated/expandable copyable cell, and add docs describing behavior and normalization interplay.
Expanded document search to include `content_hash` (Content ID) alongside title and filename in the backend query logic. Updated API query docs, added a service test for hash-based search filtering, and aligned the frontend by renaming hash labels to “Content ID,” updating search placeholder text, and showing the Content ID column earlier in the table. Documentation was updated to reflect the new search behavior and terminology.
kmandryk added 3 commits July 2, 2026 13:31
Update test fixtures in hitl.service.spec.ts and upload.controller.spec.ts to include the content_hash field in mock document objects.

@dbarkowsky dbarkowsky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yep, working as expected. No concerns after review.

@kmandryk
kmandryk merged commit b011e72 into develop Jul 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants